Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
feat: gemini-jump hero rework, 3d-home overlay canvas, sitidle clip + transparent-bg viewer fix
nirholas7a22e5993b3b
diff --git a/a-embed.html b/a-embed.htmlindex 2dc2a66d6..b81723388 100644--- a/a-embed.html+++ b/a-embed.html@@ -243,8 +243,8 @@const stage = document.getElementById('stage');const viewer = new Viewer(stage, { kiosk: true, postToParent });if (bg === 'transparent') {- viewer.renderer?.setClearAlpha(0);- if (viewer.scene) viewer.scene.background = null;+ viewer.state.transparentBg = true;+ viewer.updateBackground();}if (plateOn && a?.name) {@@ -303,8 +303,8 @@const stage = document.getElementById('stage');const viewer = new Viewer(stage, { kiosk: true, postToParent });if (bg === 'transparent') {- viewer.renderer?.setClearAlpha(0);- if (viewer.scene) viewer.scene.background = null;+ viewer.state.transparentBg = true;+ viewer.updateBackground();}const candidates = resolveUrlCandidates(bodyURI);diff --git a/public/animations/clips/sitidle.json b/public/animations/clips/sitidle.jsonnew file mode 100644index 000000000..3a1b21516--- /dev/null+++ b/public/animations/clips/sitidle.json@@ -0,0 +1 @@+{"name":"sitidle","duration":1,"tracks":[{"name":"Hips.position","type":"vector","times":[0,1],"values":[-0.0003007067134603858,0.616661548614502,0.03541681915521622,-0.0003007067134603858,0.616661548614502,0.03541681915521622]},{"name":"Hips.quaternion","type":"quaternion","times":[0,1],"values":[0.007717160042375326,0.0006047349888831377,0.008668392896652222,0.9999324679374695,0.007717160042375326,0.0006047349888831377,0.008668392896652222,0.9999324679374695]},{"name":"Spine.quaternion","type":"quaternion","times":[0,1],"values":[0.010784502141177654,0.001855966867879033,-0.013760516420006752,0.9998454451560974,0.010784502141177654,0.001855966867879033,-0.013760516420006752,0.9998454451560974]},{"name":"Spine1.quaternion","type":"quaternion","times":[0,1],"values":[-0.0017435818444937468,0.0020713522098958492,-0.0027721028309315443,0.9999924898147583,-0.0017435818444937468,0.0020713522098958492,-0.0027721028309315443,0.9999924898147583]},{"name":"Spine2.quaternion","type":"quaternion","times":[0,1],"values":[0.011138699017465115,0.002368954010307789,-0.0024182521738111973,0.9999322295188904,0.011138699017465115,0.002368954010307789,-0.0024182521738111973,0.9999322295188904]},{"name":"Neck.quaternion","type":"quaternion","times":[0,1],"values":[-0.008787269704043865,-0.011598835699260235,0.002805812982842326,0.9998902082443237,-0.008787269704043865,-0.011598835699260235,0.002805812982842326,0.9998902082443237]},{"name":"Head.quaternion","type":"quaternion","times":[0,1],"values":[-0.07555954158306122,-0.035621628165245056,-0.048013415187597275,0.9953474402427673,-0.07555954158306122,-0.035621628165245056,-0.048013415187597275,0.9953474402427673]},{"name":"RightShoulder.quaternion","type":"quaternion","times":[0,1],"values":[-0.506586492061615,0.567542552947998,-0.5619873404502869,-0.3247087895870209,-0.506586492061615,0.567542552947998,-0.5619873404502869,-0.3247087895870209]},{"name":"RightArm.quaternion","type":"quaternion","times":[0,1],"values":[0.45261016488075256,-0.19579263031482697,-0.36834535002708435,0.7881186604499817,0.45261016488075256,-0.19579263031482697,-0.36834535002708435,0.7881186604499817]},{"name":"RightForeArm.quaternion","type":"quaternion","times":[0,1],"values":[-6.048264111768731e-8,8.744397916871094e-8,-0.4628143310546875,0.886455237865448,-6.048264111768731e-8,8.744397916871094e-8,-0.4628143310546875,0.886455237865448]},{"name":"RightHand.quaternion","type":"quaternion","times":[0,1],"values":[-0.27429959177970886,-0.34016501903533936,-0.15186142921447754,0.8865582942962646,-0.27429959177970886,-0.34016501903533936,-0.15186142921447754,0.8865582942962646]},{"name":"RightHandThumb1.quaternion","type":"quaternion","times":[0,1],"values":[0.08698797225952148,0.10642802715301514,-0.22253477573394775,0.9651862382888794,0.08698797225952148,0.10642802715301514,-0.22253477573394775,0.9651862382888794]},{"name":"RightHandThumb2.quaternion","type":"quaternion","times":[0,1],"values":[0.19453103840351105,0.246421217918396,0.16522035002708435,0.9349526762962341,0.19453103840351105,0.246421217918396,0.16522035002708435,0.9349526762962341]},{"name":"RightHandThumb3.quaternion","type":"quaternion","times":[0,1],"values":[-0.1470026671886444,0.12938666343688965,0.269844651222229,0.9427794814109802,-0.1470026671886444,0.12938666343688965,0.269844651222229,0.9427794814109802]},{"name":"RightHandIndex1.quaternion","type":"quaternion","times":[0,1],"values":[0.11798009276390076,-0.026669103652238846,-0.005733484402298927,0.9926412105560303,0.11798009276390076,-0.026669103652238846,-0.005733484402298927,0.9926412105560303]},{"name":"RightHandIndex2.quaternion","type":"quaternion","times":[0,1],"values":[0.22489862143993378,-9.43236102557421e-8,0.018322255462408066,0.9742099046707153,0.22489862143993378,-9.43236102557421e-8,0.018322255462408066,0.9742099046707153]},{"name":"RightHandIndex3.quaternion","type":"quaternion","times":[0,1],"values":[0.08000072836875916,-1.7195345591858313e-8,0.006517508532851934,0.9967734813690186,0.08000072836875916,-1.7195345591858313e-8,0.006517508532851934,0.9967734813690186]},{"name":"RightHandMiddle1.quaternion","type":"quaternion","times":[0,1],"values":[0.02199513651430607,-0.0002157018316211179,0.03199075907468796,0.9992461204528809,0.02199513651430607,-0.0002157018316211179,0.03199075907468796,0.9992461204528809]},{"name":"RightHandMiddle2.quaternion","type":"quaternion","times":[0,1],"values":[0.25023525953292847,-2.858036918240714e-9,0.020386213436722755,0.9679704308509827,0.25023525953292847,-2.858036918240714e-9,0.020386213436722755,0.9679704308509827]},{"name":"RightHandMiddle3.quaternion","type":"quaternion","times":[0,1],"values":[0.04681898653507233,-3.0566258857334105e-8,0.0038142313715070486,0.9988961219787598,0.04681898653507233,-3.0566258857334105e-8,0.0038142313715070486,0.9988961219787598]},{"name":"RightHandRing1.quaternion","type":"quaternion","times":[0,1],"values":[0.03721777722239494,-0.0014672368997707963,0.0667622834444046,0.9970734715461731,0.03721777722239494,-0.0014672368997707963,0.0667622834444046,0.9970734715461731]},{"name":"RightHandRing2.quaternion","type":"quaternion","times":[0,1],"values":[0.10728458315134048,-6.153101139716455e-8,0.008740259334445,0.9941899180412292,0.10728458315134048,-6.153101139716455e-8,0.008740259334445,0.9941899180412292]},{"name":"RightHandRing3.quaternion","type":"quaternion","times":[0,1],"values":[0.08805711567401886,-1.2599309151539728e-8,0.007173886988312006,0.9960895776748657,0.08805711567401886,-1.2599309151539728e-8,0.007173886988312006,0.9960895776748657]},{"name":"RightHandPinky1.quaternion","type":"quaternion","times":[0,1],"values":[0.07063508778810501,0.10222619026899338,0.08248411118984222,0.9888159036636353,0.07063508778810501,0.10222619026899338,0.08248411118984222,0.9888159036636353]},{"name":"RightHandPinky2.quaternion","type":"quaternion","times":[0,1],"values":[0.055846408009529114,-4.410116716258017e-8,0.0045497845858335495,0.998429000377655,0.055846408009529114,-4.410116716258017e-8,0.0045497845858335495,0.998429000377655]},{"name":"RightHandPinky3.quaternion","type":"quaternion","times":[0,1],"values":[0.05539507418870926,-6.527643137133055e-8,0.004513130988925695,0.9984543323516846,0.05539507418870926,-6.527643137133055e-8,0.004513130988925695,0.9984543323516846]},{"name":"LeftShoulder.quaternion","type":"quaternion","times":[0,1],"values":[-0.5982335209846497,-0.48270347714424133,0.4856187403202057,-0.41627922654151917,-0.5982335209846497,-0.48270347714424133,0.4856187403202057,-0.41627922654151917]},{"name":"LeftArm.quaternion","type":"quaternion","times":[0,1],"values":[0.42233359813690186,0.1690346747636795,0.2317366898059845,0.8598603010177612,0.42233359813690186,0.1690346747636795,0.2317366898059845,0.8598603010177612]},{"name":"LeftForeArm.quaternion","type":"quaternion","times":[0,1],"values":[3.4011855554183512e-9,-8.770536652491501e-8,0.5165185928344727,0.8562759757041931,3.4011855554183512e-9,-8.770536652491501e-8,0.5165185928344727,0.8562759757041931]},{"name":"LeftHand.quaternion","type":"quaternion","times":[0,1],"values":[-0.35264939069747925,0.2629314363002777,0.06149889528751373,0.8959482908248901,-0.35264939069747925,0.2629314363002777,0.06149889528751373,0.8959482908248901]},{"name":"LeftHandThumb1.quaternion","type":"quaternion","times":[0,1],"values":[0.09009416401386261,0.03579211235046387,0.2088557779788971,0.9731296300888062,0.09009416401386261,0.03579211235046387,0.2088557779788971,0.9731296300888062]},{"name":"LeftHandThumb2.quaternion","type":"quaternion","times":[0,1],"values":[0.13740670680999756,-0.17987670004367828,-0.14544923603534698,0.9631242156028748,0.13740670680999756,-0.17987670004367828,-0.14544923603534698,0.9631242156028748]},{"name":"LeftHandThumb3.quaternion","type":"quaternion","times":[0,1],"values":[-0.09837567806243896,-0.12890447676181793,-0.20686224102973938,0.9648388028144836,-0.09837567806243896,-0.12890447676181793,-0.20686224102973938,0.9648388028144836]},{"name":"LeftHandIndex1.quaternion","type":"quaternion","times":[0,1],"values":[0.23268304765224457,-0.007605001796036959,-0.02332974597811699,0.9722430109977722,0.23268304765224457,-0.007605001796036959,-0.02332974597811699,0.9722430109977722]},{"name":"LeftHandIndex2.quaternion","type":"quaternion","times":[0,1],"values":[0.1837639957666397,-2.3392745163164363e-7,-0.01883143186569214,0.9827899932861328,0.1837639957666397,-2.3392745163164363e-7,-0.01883143186569214,0.9827899932861328]},{"name":"LeftHandIndex3.quaternion","type":"quaternion","times":[0,1],"values":[0.08413059264421463,-1.230301478472029e-7,-0.008621425367891788,0.9964174628257751,0.08413059264421463,-1.230301478472029e-7,-0.008621425367891788,0.9964174628257751]},{"name":"LeftHandMiddle1.quaternion","type":"quaternion","times":[0,1],"values":[0.14256758987903595,0.0020128560718148947,-0.06491809338331223,0.9876518249511719,0.14256758987903595,0.0020128560718148947,-0.06491809338331223,0.9876518249511719]},{"name":"LeftHandMiddle2.quaternion","type":"quaternion","times":[0,1],"values":[0.16757552325725555,-1.528318165355813e-7,-0.017172539606690407,0.9857096672058105,0.16757552325725555,-1.528318165355813e-7,-0.017172539606690407,0.9857096672058105]},{"name":"LeftHandMiddle3.quaternion","type":"quaternion","times":[0,1],"values":[0.1408686637878418,-2.3212852795495564e-7,-0.014435834251344204,0.9899230599403381,0.1408686637878418,-2.3212852795495564e-7,-0.014435834251344204,0.9899230599403381]},{"name":"LeftHandRing1.quaternion","type":"quaternion","times":[0,1],"values":[0.12166228145360947,0.004953564144670963,-0.08675211668014526,0.988760769367218,0.12166228145360947,0.004953564144670963,-0.08675211668014526,0.988760769367218]},{"name":"LeftHandRing2.quaternion","type":"quaternion","times":[0,1],"values":[0.13239885866641998,-2.2915905617537646e-7,-0.01356782391667366,0.9911036491394043,0.13239885866641998,-2.2915905617537646e-7,-0.01356782391667366,0.9911036491394043]},{"name":"LeftHandRing3.quaternion","type":"quaternion","times":[0,1],"values":[0.15027698874473572,-2.1197493538238632e-7,-0.015399886295199394,0.9885239601135254,0.15027698874473572,-2.1197493538238632e-7,-0.015399886295199394,0.9885239601135254]},{"name":"LeftHandPinky1.quaternion","type":"quaternion","times":[0,1],"values":[0.1189286932349205,0.006131096743047237,-0.0961347222328186,0.9882188439369202,0.1189286932349205,0.006131096743047237,-0.0961347222328186,0.9882188439369202]},{"name":"LeftHandPinky2.quaternion","type":"quaternion","times":[0,1],"values":[0.11977499723434448,-1.788268662039627e-7,-0.012274118140339851,0.9927251935005188,0.11977499723434448,-1.788268662039627e-7,-0.012274118140339851,0.9927251935005188]},{"name":"LeftHandPinky3.quaternion","type":"quaternion","times":[0,1],"values":[0.09551839530467987,-1.1729491689038696e-7,-0.009788455441594124,0.9953795075416565,0.09551839530467987,-1.1729491689038696e-7,-0.009788455441594124,0.9953795075416565]},{"name":"RightUpLeg.quaternion","type":"quaternion","times":[0,1],"values":[-0.005508720874786377,0.6927937865257263,0.7157312631607056,0.0879497230052948,-0.005508720874786377,0.6927937865257263,0.7157312631607056,0.0879497230052948]},{"name":"RightLeg.quaternion","type":"quaternion","times":[0,1],"values":[-0.6856150031089783,0.031210703775286674,-0.046664658933877945,0.7257963418960571,-0.6856150031089783,0.031210703775286674,-0.046664658933877945,0.7257963418960571]},{"name":"RightFoot.quaternion","type":"quaternion","times":[0,1],"values":[0.4159928262233734,0.027253152802586555,0.055000189691782,0.9072939157485962,0.4159928262233734,0.027253152802586555,0.055000189691782,0.9072939157485962]},{"name":"RightToeBase.quaternion","type":"quaternion","times":[0,1],"values":[0.3368167579174042,-1.2475813271350944e-8,-4.2812242639911346e-8,0.9415702223777771,0.3368167579174042,-1.2475813271350944e-8,-4.2812242639911346e-8,0.9415702223777771]},{"name":"LeftUpLeg.quaternion","type":"quaternion","times":[0,1],"values":[0.03658316656947136,0.6874494552612305,0.7183312773704529,-0.10037470608949661,0.03658316656947136,0.6874494552612305,0.7183312773704529,-0.10037470608949661]},{"name":"LeftLeg.quaternion","type":"quaternion","times":[0,1],"values":[-0.6864414811134338,-0.04204167053103447,0.03733198344707489,0.7250081896781921,-0.6864414811134338,-0.04204167053103447,0.03733198344707489,0.7250081896781921]},{"name":"LeftFoot.quaternion","type":"quaternion","times":[0,1],"values":[0.4215811789035797,0.03223156929016113,-0.07426898926496506,0.9031691551208496,0.4215811789035797,0.03223156929016113,-0.07426898926496506,0.9031691551208496]},{"name":"LeftToeBase.quaternion","type":"quaternion","times":[0,1],"values":[0.33608874678611755,3.719247487765642e-8,-4.899893113474718e-8,0.9418303370475769,0.33608874678611755,3.719247487765642e-8,-4.899893113474718e-8,0.9418303370475769]}],"uuid":"b5260a4f-d2de-443f-b904-4e0caa332ee0","blendMode":2500}\ No newline at end of filediff --git a/public/demos/3d-home.html b/public/demos/3d-home.htmlindex b0117749a..9844d01b1 100644--- a/public/demos/3d-home.html+++ b/public/demos/3d-home.html@@ -9,33 +9,27 @@<style>:root { color-scheme: dark; }*, *::before, *::after { box-sizing: border-box; }- html, body { height: 100%; margin: 0; overflow: hidden; }- body {- background: #04050d;- color: #eee;- font: 15px/1.5 'Inter', -apple-system, system-ui, sans-serif;+ html, body { height: 100%; margin: 0; background: #04050d; color: #eee; font: 15px/1.5 'Inter', -apple-system, system-ui, sans-serif; }++ /* Canvas sits above all HTML — pointer-events:none so clicks pass through */+ #avatar-canvas {+ position: fixed;+ top: 0; left: 0;+ width: 100vw; height: 100vh;+ pointer-events: none;+ z-index: 999;}- /* ── Layout ──────────────────────────────────────────────── */- .hero {- display: grid;- grid-template-columns: 1fr 1.15fr;- height: 100vh;- }- @media (max-width: 768px) {- .hero { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }- .scene-col { min-height: 55vw; }- }-- /* ── Left column ─────────────────────────────────────────── */- .text-col {+ /* Page content — left column, visible through transparent canvas */+ .page {+ position: relative;+ z-index: 10;+ min-height: 100vh;display: flex;flex-direction: column;justify-content: center;- padding: 60px 52px 60px 56px;- position: relative;- z-index: 2;- background: linear-gradient(to right, #04050d 70%, transparent);+ padding: 100px 56px 60px;+ max-width: 520px;}.eyebrow {@@ -47,42 +41,35 @@}.eyebrow-dot {width: 7px; height: 7px; border-radius: 50%;- background: #d6ff3d;- box-shadow: 0 0 8px rgba(214,255,61,0.7);+ background: #d6ff3d; box-shadow: 0 0 8px rgba(214,255,61,0.7);animation: blink 2.2s ease-in-out infinite;}- @keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.25} }+ @keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.2} }.hero-title {font-family: 'Space Grotesk', 'Inter', sans-serif;- font-size: clamp(36px, 4.2vw, 66px);- font-weight: 800;- letter-spacing: -0.03em;- line-height: 1.04;- margin: 0 0 20px;- color: #fff;+ font-size: clamp(38px, 4.5vw, 68px);+ font-weight: 800; letter-spacing: -0.03em;+ line-height: 1.04; margin: 0 0 20px; color: #fff;}.hero-title em { color: #d6ff3d; font-style: normal; }.hero-sub {- color: #5a5d72;- font-size: 15.5px;- line-height: 1.68;- max-width: 40ch;- margin: 0 0 44px;+ color: #555870; font-size: 15.5px; line-height: 1.7;+ max-width: 38ch; margin: 0 0 44px;}- /* ── 3D physical CTA buttons ─────────────────────────────── */+ /* Physical 3D buttons */.cta-row { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }- .btn-3d {+ .btn {display: inline-flex; align-items: center; gap: 10px;padding: 16px 32px; border: none; border-radius: 14px;- font: 700 15px/1 'Inter', inherit;- cursor: pointer; text-decoration: none;- transform: translateY(0);- transition: filter 0.12s;+ font: 700 15px/1 'Inter', inherit; cursor: pointer; text-decoration: none;user-select: none;+ /* GSAP squishes downward into the page, not into its own center */+ transform-origin: bottom center;+ will-change: transform;}.btn-primary {background: linear-gradient(160deg, #e2ff5a, #c8ef2c);@@ -91,304 +78,326 @@}.btn-primary:hover { filter: brightness(1.07); }.btn-ghost {- background: rgba(255,255,255,0.05);- color: #bbb;+ background: rgba(255,255,255,0.05); color: #bbb;border: 1.5px solid rgba(255,255,255,0.1);- box-shadow: 0 5px 0 0 rgba(255,255,255,0.04), 0 7px 18px rgba(0,0,0,0.4);- }-- /* Physical landing animation — fired from JS when avatar touches 3D button */- @keyframes btn-land {- 0% { transform: translateY(0); box-shadow: 0 8px 0 0 #7a9600, 0 10px 28px rgba(214,255,61,0.28); }- 13% { transform: translateY(9px); box-shadow: 0 0 0 0 #7a9600, 0 4px 14px rgba(214,255,61,0.50); }- 30% { transform: translateY(-3px); box-shadow: 0 11px 0 0 #7a9600, 0 14px 32px rgba(214,255,61,0.26); }- 50% { transform: translateY(2px); box-shadow: 0 6px 0 0 #7a9600, 0 8px 22px rgba(214,255,61,0.20); }- 68% { transform: translateY(-1px); box-shadow: 0 9px 0 0 #7a9600, 0 11px 26px rgba(214,255,61,0.24); }- 84% { transform: translateY(0.5px); box-shadow: 0 7.5px 0 0 #7a9600, 0 10px 27px rgba(214,255,61,0.26); }- 100% { transform: translateY(0); box-shadow: 0 8px 0 0 #7a9600, 0 10px 28px rgba(214,255,61,0.28); }- }- .btn-primary.landed {- animation: btn-land 0.78s cubic-bezier(0.22, 1, 0.36, 1) forwards;- }-- /* ── Right column: 3D scene ──────────────────────────────── */- .scene-col { position: relative; }- .scene-col canvas {- display: block; width: 100%; height: 100%;+ box-shadow: 0 5px 0 0 rgba(255,255,255,0.04);}/* Nav */- .nav-bar {+ .nav {position: fixed; top: 0; left: 0; right: 0; z-index: 20;- display: flex; align-items: center; gap: 16px;- padding: 14px 28px;- background: rgba(4,5,13,0.6); backdrop-filter: blur(14px);+ display: flex; align-items: center; gap: 16px; padding: 14px 28px;+ background: rgba(4,5,13,0.55); backdrop-filter: blur(14px);border-bottom: 1px solid rgba(255,255,255,0.04);}- .nav-bar .brand {- font: 700 15px/1 'Space Grotesk', 'Inter', sans-serif;- color: #fff; text-decoration: none;- display: flex; align-items: center; gap: 7px;- }- .brand-dot {- width: 8px; height: 8px; border-radius: 50%;- background: linear-gradient(135deg, #d6ff3d, #aacc00);- box-shadow: 0 0 10px rgba(214,255,61,0.6);- }- .nav-bar a.nav-link { color: #5a5d72; text-decoration: none; font-size: 13px; }- .nav-bar a.nav-link:hover { color: #d6ff3d; }- .nav-spacer { flex: 1; }+ .nav .brand { font: 700 15px/1 'Space Grotesk','Inter',sans-serif; color:#fff; text-decoration:none; display:flex; align-items:center; gap:7px; }+ .brand-dot { width:8px; height:8px; border-radius:50%; background:linear-gradient(135deg,#d6ff3d,#aacc00); box-shadow:0 0 10px rgba(214,255,61,0.6); }+ .nav a.link { color:#555870; text-decoration:none; font-size:13px; margin-left:auto; }+ .nav a.link:hover { color:#d6ff3d; }</style></head><body>- <div class="nav-bar">+ <div class="nav"><a href="/" class="brand"><img src="/three.svg" width="20" height="20" alt="" /><span class="brand-dot"></span>three.ws</a>- <div class="nav-spacer"></div>- <a href="/demos/" class="nav-link">← lab</a>+ <a href="/demos/" class="link">← lab</a></div>- <section class="hero" style="padding-top: 52px;">- <!-- Left: copy + CTAs -->- <div class="text-col">- <div class="eyebrow">- <span class="eyebrow-dot"></span>- <span>The 3D layer for onchain AI agents</span>- </div>- <h1 class="hero-title">- Give your AI<br />a <em>body.</em>- </h1>- <p class="hero-sub">- Born in 3D. Raised on-chain. Yours forever.- Your AI has been a chatbox long enough —- give it a body, a personality, and a permanent home.- </p>- <div class="cta-row">- <a href="/create" class="btn-3d btn-primary" id="cta-primary">- <span>Build your agent — free</span>- <span>→</span>- </a>- <a href="#" class="btn-3d btn-ghost">- <span>Watch it live</span>- <span style="opacity:.4">↓</span>- </a>- </div>+ <div class="page">+ <div class="eyebrow">+ <span class="eyebrow-dot"></span>+ <span>The 3D layer for onchain AI agents</span></div>-- <!-- Right: WebGL scene -->- <div class="scene-col">- <canvas id="c"></canvas>+ <h1 class="hero-title"><span id="sit-line">Give your AI</span><br />a <em>body.</em></h1>+ <p class="hero-sub">+ Born in 3D. Raised on-chain. Yours forever.+ Your AI has been a chatbox long enough — give it a body,+ a personality, and a permanent home.+ </p>+ <div class="cta-row">+ <a href="/create" class="btn btn-primary" id="cta-btn">+ <span>Build your agent — free</span>+ <span>→</span>+ </a>+ <a href="#" class="btn btn-ghost">+ <span>Watch it live</span>+ <span style="opacity:.4">↓</span>+ </a></div>- </section>+ </div>++ <!-- Transparent overlay canvas — avatar renders above all HTML -->+ <canvas id="avatar-canvas"></canvas><script type="module">import * as THREE from 'three';import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';- import { RoomEnvironment } from 'three/addons/environments/RoomEnvironment.js';- import { OrbitControls } from 'three/addons/controls/OrbitControls.js';+ import { gsap } from 'https://cdn.jsdelivr.net/npm/[email protected]/+esm';- const canvas = document.getElementById('c');- const ctaPrimary = document.getElementById('cta-primary');+ const canvas = document.getElementById('avatar-canvas');+ const ctaBtn = document.getElementById('cta-btn');+ const sitLine = document.getElementById('sit-line');- // ── Renderer ──────────────────────────────────────────────────────+ // ── Renderer: alpha:true → transparent background ─────────────────const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: true });renderer.setPixelRatio(Math.min(devicePixelRatio, 2));renderer.outputColorSpace = THREE.SRGBColorSpace;renderer.toneMapping = THREE.ACESFilmicToneMapping;renderer.toneMappingExposure = 1.1;- renderer.shadowMap.enabled = true;- renderer.shadowMap.type = THREE.PCFSoftShadowMap;const scene = new THREE.Scene();- scene.fog = new THREE.FogExp2(0x02030a, 0.024);+ // scene.background intentionally NOT set → transparent- const pmrem = new THREE.PMREMGenerator(renderer);- scene.environment = pmrem.fromScene(new RoomEnvironment(), 0.04).texture;+ // ── OrthographicCamera: 1 world unit = PX_PER_UNIT pixels ────────+ // This makes screen→world mapping trivially exact: no perspective math.+ const PX_PER_UNIT = 120; // avatar (1.8u tall) = 216px on screen- // ── Camera ────────────────────────────────────────────────────────- const camera = new THREE.PerspectiveCamera(40, 1, 0.05, 80);- camera.position.set(0.5, 2.8, 8.0);- camera.lookAt(0, 0.9, 0);+ const camera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0.1, 100);+ camera.position.z = 10;- const controls = new OrbitControls(camera, canvas);- controls.target.set(0, 0.9, 0);- controls.enableDamping = true;- controls.dampingFactor = 0.07;- controls.minDistance = 2;- controls.maxDistance = 22;- controls.maxPolarAngle = Math.PI / 2 - 0.02;- controls.update();-- function resize() {- const w = canvas.clientWidth, h = canvas.clientHeight;- if (!w || !h) return;- renderer.setSize(w, h, false);- camera.aspect = w / h;+ function updateFrustum() {+ const hw = window.innerWidth / PX_PER_UNIT / 2;+ const hh = window.innerHeight / PX_PER_UNIT / 2;+ camera.left = -hw; camera.right = hw;+ camera.top = hh; camera.bottom = -hh;camera.updateProjectionMatrix();}- new ResizeObserver(resize).observe(canvas);- resize();- // ── Star skybox ───────────────────────────────────────────────────- const skyC = document.createElement('canvas');- skyC.width = 2048; skyC.height = 1024;- const sc = skyC.getContext('2d');- sc.fillStyle = '#02030b'; sc.fillRect(0, 0, 2048, 1024);- const neb = sc.createRadialGradient(900,400,0,900,400,600);- neb.addColorStop(0,'rgba(40,20,90,0.15)'); neb.addColorStop(1,'rgba(0,0,0,0)');- sc.fillStyle = neb; sc.fillRect(0,0,2048,1024);- for (let i=0;i<2000;i++){- const x=Math.random()*2048,y=Math.random()*1024,r=Math.random()*1.2+0.2,a=Math.random()*0.8+0.15;- const t=Math.random();- sc.fillStyle=t>0.7?`rgba(160,200,255,${a})`:t>0.45?`rgba(255,220,180,${a})`:`rgba(255,255,255,${a})`;- sc.beginPath();sc.arc(x,y,r,0,Math.PI*2);sc.fill();+ // Screen pixel → world unit (exact, no approximation)+ function px2world(screenX, screenY) {+ const hw = window.innerWidth / PX_PER_UNIT / 2;+ const hh = window.innerHeight / PX_PER_UNIT / 2;+ return {+ x: (screenX / window.innerWidth - 0.5) * hw * 2,+ y: -(screenY / window.innerHeight - 0.5) * hh * 2,+ };}- scene.add(new THREE.Mesh(- new THREE.SphereGeometry(70,32,16),- new THREE.MeshBasicMaterial({map:new THREE.CanvasTexture(skyC),side:THREE.BackSide})- ));++ function resize() {+ renderer.setSize(window.innerWidth, window.innerHeight, false);+ updateFrustum();+ }+ window.addEventListener('resize', () => { resize(); placeAtStart(); });+ resize();// ── Lights ────────────────────────────────────────────────────────- scene.add(new THREE.AmbientLight(0x4050aa, 0.18));- const key = new THREE.DirectionalLight(0xfff4dc, 2.2);- key.position.set(4,9,6); key.castShadow=true;- key.shadow.mapSize.setScalar(2048);- key.shadow.camera.left=-7;key.shadow.camera.right=7;- key.shadow.camera.top=7;key.shadow.camera.bottom=-2;- key.shadow.camera.near=1;key.shadow.camera.far=22;+ scene.add(new THREE.AmbientLight(0xffffff, 0.6));+ const key = new THREE.DirectionalLight(0xfff4dc, 2.0);+ key.position.set(3, 6, 5);scene.add(key);- const rim=new THREE.DirectionalLight(0x2040ff,1.1);rim.position.set(-5,3,-5);scene.add(rim);- const glow=new THREE.PointLight(0xd6ff3d,0.8,9);glow.position.set(0,1.5,0);scene.add(glow);- const pf=new THREE.PointLight(0xff2060,0.5,16);pf.position.set(-7,2,2);scene.add(pf);- const cf=new THREE.PointLight(0x00e5ff,0.4,16);cf.position.set(7,2,-3);scene.add(cf);-- // ── Tron floor ────────────────────────────────────────────────────- const gC=document.createElement('canvas');gC.width=gC.height=512;- const gx=gC.getContext('2d');- gx.fillStyle='#04050f';gx.fillRect(0,0,512,512);- gx.strokeStyle='#0d0f22';gx.lineWidth=1;- for(let i=0;i<=512;i+=32){gx.beginPath();gx.moveTo(i,0);gx.lineTo(i,512);gx.stroke();gx.beginPath();gx.moveTo(0,i);gx.lineTo(512,i);gx.stroke();}- gx.strokeStyle='#1a2a6c';gx.lineWidth=2;- for(let i=0;i<=512;i+=128){gx.beginPath();gx.moveTo(i,0);gx.lineTo(i,512);gx.stroke();gx.beginPath();gx.moveTo(0,i);gx.lineTo(512,i);gx.stroke();}- const gTex=new THREE.CanvasTexture(gC);- gTex.wrapS=gTex.wrapT=THREE.RepeatWrapping;gTex.repeat.set(14,14);- const floor=new THREE.Mesh(new THREE.PlaneGeometry(32,32),new THREE.MeshStandardMaterial({map:gTex,roughness:0.08,metalness:0.6}));- floor.rotation.x=-Math.PI/2;floor.receiveShadow=true;scene.add(floor);-- // ── 3D Button ─────────────────────────────────────────────────────- const base=new THREE.Mesh(new THREE.CylinderGeometry(2.05,2.25,0.85,64),new THREE.MeshStandardMaterial({color:0x0a0b1a,roughness:0.25,metalness:0.92}));- base.position.y=0.425;base.castShadow=true;base.receiveShadow=true;scene.add(base);-- const ledRing=new THREE.Mesh(new THREE.TorusGeometry(1.88,0.045,8,80),new THREE.MeshStandardMaterial({color:0xd6ff3d,emissive:0xd6ff3d,emissiveIntensity:1.0,roughness:0.2,metalness:0}));- ledRing.position.y=0.84;ledRing.rotation.x=Math.PI/2;scene.add(ledRing);-- // Cap texture: "GET STARTED"- const cc=document.createElement('canvas');cc.width=cc.height=512;- const cx2=cc.getContext('2d');- const cg=cx2.createRadialGradient(256,256,0,256,256,222);- cg.addColorStop(0,'#eeff66');cg.addColorStop(0.65,'#d6ff3d');cg.addColorStop(1,'#aecf20');- cx2.fillStyle=cg;cx2.beginPath();cx2.arc(256,256,222,0,Math.PI*2);cx2.fill();- cx2.fillStyle='rgba(8,9,15,0.88)';cx2.font='bold 58px -apple-system,system-ui,sans-serif';- cx2.textAlign='center';cx2.textBaseline='middle';- cx2.fillText('GET',256,210);cx2.fillText('STARTED',256,290);-- const CAP_H=0.38,CAP_HALF=0.19,BASE_TOP=0.85;- const CAP_REST=BASE_TOP+CAP_HALF,BTN_TOP=BASE_TOP+CAP_H;- const capSide=new THREE.MeshStandardMaterial({color:0xc8ef38,emissive:0xd6ff3d,emissiveIntensity:0.12,roughness:0.4,metalness:0});- const capTop=new THREE.MeshStandardMaterial({map:new THREE.CanvasTexture(cc),emissive:0xd6ff3d,emissiveIntensity:0.08,roughness:0.35,metalness:0});- const cap=new THREE.Mesh(new THREE.CylinderGeometry(1.74,1.74,CAP_H,64),[capSide,capTop,capSide]);- cap.position.y=CAP_REST;cap.castShadow=true;cap.receiveShadow=true;scene.add(cap);-- // ── Spring physics + squash-stretch ───────────────────────────────- let sY=0,sV=0,springing=false;- function triggerSpring(){- sY=-0.88;sV=0;springing=true;- capSide.emissiveIntensity=0.8;capTop.emissiveIntensity=0.6;- ledRing.material.emissiveIntensity=3.5;glow.intensity=7.0;- // Sync DOM CTA button- ctaPrimary.classList.remove('landed');- void ctaPrimary.offsetWidth;- ctaPrimary.classList.add('landed');- }- function updateSpring(dt){- if(!springing)return;- sV+=(-270*sY-9*sV)*dt;sY+=sV*dt;- const s=Math.max(0.04,1+sY),xz=1+(1-s)*0.19;- cap.scale.set(xz,s,xz);cap.position.y=BASE_TOP+CAP_HALF*s;- const m=Math.abs(sY);- capSide.emissiveIntensity=0.12+m*0.55;capTop.emissiveIntensity=0.08+m*0.4;- ledRing.material.emissiveIntensity=1.0+m*2.5;glow.intensity=0.8+m*5.5;- if(m<0.003&&Math.abs(sV)<0.003){- springing=false;sY=0;sV=0;cap.scale.set(1,1,1);cap.position.y=CAP_REST;- capSide.emissiveIntensity=0.12;capTop.emissiveIntensity=0.08;- ledRing.material.emissiveIntensity=1.0;glow.intensity=0.8;+ const rim = new THREE.DirectionalLight(0x4060ff, 0.6);+ rim.position.set(-4, 3, -2);+ scene.add(rim);+ const fill = new THREE.DirectionalLight(0xffeedd, 0.4);+ fill.position.set(0, 2, 7);+ scene.add(fill);++ // ── Avatar ────────────────────────────────────────────────────────+ let avatar = null, mixer = null, rootBone = null, baseRootPos = null;+ let sitAction = null, standupAction = null, fallAction = null;+ let phase = 'loading'; // loading → sitting → standingUp → jumping → resting+ let startW = { x: 0, y: 0 }; // sit/stand anchor (above the text)+ let seqT = 0, landed = false, jumpTarget = { x: 0, y: 0 };++ const SIT_S = 1.0; // sitidle loops at 1s+ const STAND_S = 2.566; // standup duration+ const JUMP_S = 2.933; // jumpdown3 duration+ const SIT_DWELL_S = 2.4; // how long he sits before standing+ const LAND_P = 0.84; // jump fraction where feet make contact+ const PEAK_U = 0.55; // arc peak in world units+ // Sit pose: avatar root (floor reference) sits below the seat by ~half a body.+ // Nudge the floor reference down so his butt visually rests ON the text.+ const SIT_OFFSET_PX = 60;++ function smoothstep(t) { return t * t * (3 - 2 * t); }++ // Anchor the avatar above the "Give your AI" text line+ function placeAtStart() {+ if (!avatar) return;+ const rect = sitLine.getBoundingClientRect();+ // Horizontally: end of the text line (perched on the right edge of "AI")+ const sx = rect.right - rect.height * 0.4;+ // Vertically: text top - offset, so butt rests on the text after sit animation+ const sy = rect.top + SIT_OFFSET_PX;+ startW = px2world(sx, sy);+ if (phase === 'sitting' || phase === 'loading') {+ avatar.position.set(startW.x, startW.y, 0);}}- // ── Particles ─────────────────────────────────────────────────────- const pool=[];- function burst(y){- const N=90,pos=new Float32Array(N*3),vel=[];- for(let i=0;i<N;i++){const a=Math.random()*Math.PI*2;pos[i*3]=Math.cos(a)*Math.random()*0.4;pos[i*3+1]=y;pos[i*3+2]=Math.sin(a)*Math.random()*0.4;vel.push({x:Math.cos(a)*(1.5+Math.random()*3),y:1.5+Math.random()*4.5,z:Math.sin(a)*(1.5+Math.random()*3)});}- const geo=new THREE.BufferGeometry();geo.setAttribute('position',new THREE.BufferAttribute(pos,3));- const mat=new THREE.PointsMaterial({color:0xd6ff3d,size:0.07,transparent:true});- const pts=new THREE.Points(geo,mat);scene.add(pts);pool.push({pts,geo,mat,vel,age:0,life:1.4});+ function fireSquish() {+ // Kill any in-flight tween so rapid re-fires don't stack+ gsap.killTweensOf(ctaBtn);+ // Compress: fast slam downward, transform-origin:bottom center → squishes into page+ gsap.to(ctaBtn, {+ scaleY: 0.7,+ scaleX: 1.05,+ duration: 0.1,+ ease: 'power4.out',+ onComplete: () => {+ // Recoil: elastic bounce back to rest+ gsap.to(ctaBtn, {+ scaleY: 1,+ scaleX: 1,+ duration: 0.8,+ ease: 'elastic.out(1.2, 0.3)',+ });+ },+ });}- function updateParticles(dt){- for(let i=pool.length-1;i>=0;i--){- const p=pool[i];p.age+=dt;- if(p.age>=p.life){scene.remove(p.pts);p.geo.dispose();p.mat.dispose();pool.splice(i,1);continue;}- const buf=p.geo.attributes.position.array;- for(let j=0;j<p.vel.length;j++){buf[j*3]+=p.vel[j].x*dt;buf[j*3+1]+=p.vel[j].y*dt;buf[j*3+2]+=p.vel[j].z*dt;p.vel[j].y-=9.8*dt;}- p.geo.attributes.position.needsUpdate=true;p.mat.opacity=1-p.age/p.life;- }++ function startSit() {+ if (!sitAction) return;+ phase = 'sitting';+ placeAtStart();+ fallAction?.stop();+ standupAction?.stop();+ // Reset yaw: facing the camera while seated+ gsap.killTweensOf(avatar.rotation);+ avatar.rotation.y = 0;+ sitAction.reset().play();+ setTimeout(startStandup, SIT_DWELL_S * 1000);}- // ── Avatar ────────────────────────────────────────────────────────- let avatar=null,mixer=null,rootBone=null,baseRootPos=null,fallAction=null;- const FALL_DUR=2.933,LAND_AT=2.35,DROP_FROM=BTN_TOP+3.8;- let seqT=0,landed=false;-- function runSeq(){seqT=0;landed=false;if(avatar)avatar.position.set(0,DROP_FROM,0);fallAction?.reset().play();}- function updateSeq(dt){- if(!avatar)return;seqT+=dt;- if(seqT<=LAND_AT){const p=seqT/LAND_AT;avatar.position.y=DROP_FROM+(BTN_TOP-DROP_FROM)*(p*p);}- else{avatar.position.y=cap.position.y+CAP_HALF*cap.scale.y;if(!landed){landed=true;triggerSpring();burst(BTN_TOP);}}- if(seqT>=FALL_DUR+1.2)runSeq();+ function startStandup() {+ if (!standupAction || phase !== 'sitting') return;+ phase = 'standingUp';+ // Crossfade sit → standup+ standupAction.reset();+ standupAction.crossFadeFrom(sitAction, 0.2, false).play();+ // As he stands, rotate to face the jump direction (toward the button)+ gsap.to(avatar.rotation, {+ y: Math.PI,+ duration: STAND_S - 0.3,+ ease: 'power2.inOut',+ });+ // Trigger jump just before standup finishes so motion blends into takeoff+ setTimeout(triggerJump, (STAND_S - 0.15) * 1000);+ }++ function triggerJump() {+ if (!avatar || !fallAction || phase === 'jumping') return;++ // Feet land precisely on the top edge of the button+ const rect = ctaBtn.getBoundingClientRect();+ jumpTarget = px2world(rect.left + rect.width / 2, rect.top);++ phase = 'jumping'; seqT = 0; landed = false;+ fallAction.reset();+ fallAction.crossFadeFrom(standupAction, 0.15, false).play();}- new GLTFLoader().load('/avatars/cz.glb',gltf=>{- avatar=gltf.scene;- avatar.traverse(n=>{if(n.isMesh){n.castShadow=true;n.receiveShadow=true;}if(!rootBone&&/^(Hips|Root|mixamorig:?Hips)$/i.test(n.name))rootBone=n;});- avatar.rotation.y=Math.PI;scene.add(avatar);- mixer=new THREE.AnimationMixer(avatar);- fetch('/animations/clips/jumpdown3.json').then(r=>r.json()).then(json=>{- fallAction=mixer.clipAction(THREE.AnimationClip.parse(json));- fallAction.setLoop(THREE.LoopOnce,1);fallAction.clampWhenFinished=true;- if(rootBone)baseRootPos=rootBone.position.clone();- const _r=renderer.render.bind(renderer);- renderer.render=(sc,cam)=>{- try{if(rootBone&&baseRootPos)rootBone.position.copy(baseRootPos);}catch(_){}- _r(sc,cam);+ function updateSeq(dt) {+ if (phase !== 'jumping' || !avatar) return;+ seqT += dt;+ const p = Math.min(seqT / JUMP_S, 1);+ const ease = smoothstep(p);++ // Linear interpolation in screen space (ortho camera = exact pixel mapping)+ const x = startW.x + (jumpTarget.x - startW.x) * ease;+ const arc = PEAK_U * 4 * p * (1 - p);+ const y = startW.y + (jumpTarget.y - startW.y) * ease + arc;++ avatar.position.set(x, y, 0);++ if (!landed && p >= LAND_P) {+ landed = true;+ fireSquish();+ }++ if (p >= 1) {+ phase = 'resting';+ // Hold 1.6s on the button, then return to sit-on-text and loop+ setTimeout(() => {+ const fromX = avatar.position.x;+ const fromY = avatar.position.y;+ // Re-read text position (resize-safe)+ const rect = sitLine.getBoundingClientRect();+ const back = px2world(rect.right - rect.height * 0.4, rect.top + SIT_OFFSET_PX);+ startW = back;+ // Turn back to face the camera as he slides up to re-sit+ gsap.killTweensOf(avatar.rotation);+ gsap.to(avatar.rotation, { y: 0, duration: 0.7, ease: 'power2.inOut' });+ const t0 = performance.now();+ (function slide(now) {+ const sp = Math.min((now - t0) / 700, 1);+ avatar.position.x = fromX + (back.x - fromX) * smoothstep(sp);+ avatar.position.y = fromY + (back.y - fromY) * smoothstep(sp);+ if (sp < 1) requestAnimationFrame(slide);+ else {+ avatar.position.set(back.x, back.y, 0);+ startSit();+ }+ })(performance.now());+ }, 1600);+ }+ }++ // Click skips straight to the jump (still must crossfade from current pose)+ ctaBtn.addEventListener('click', e => {+ e.preventDefault();+ if (phase === 'sitting' || phase === 'standingUp') triggerJump();+ });++ // ── Load avatar + animations ──────────────────────────────────────+ new GLTFLoader().load('/avatars/cz.glb', gltf => {+ avatar = gltf.scene;+ avatar.traverse(n => {+ if (!rootBone && /^(Hips|Root|mixamorig:?Hips)$/i.test(n.name))+ rootBone = n;+ });+ // Yaw is choreographed per-phase: facing camera while seated, rotates+ // toward the jump direction during standup.+ avatar.rotation.y = 0;+ scene.add(avatar);++ mixer = new THREE.AnimationMixer(avatar);++ Promise.all([+ fetch('/animations/clips/sitidle.json').then(r => r.json()),+ fetch('/animations/clips/standup.json').then(r => r.json()),+ fetch('/animations/clips/jumpdown3.json').then(r => r.json()),+ ]).then(([sitJson, standJson, jumpJson]) => {+ sitAction = mixer.clipAction(THREE.AnimationClip.parse(sitJson));+ sitAction.setLoop(THREE.LoopRepeat, Infinity);++ standupAction = mixer.clipAction(THREE.AnimationClip.parse(standJson));+ standupAction.setLoop(THREE.LoopOnce, 1);+ standupAction.clampWhenFinished = true;++ fallAction = mixer.clipAction(THREE.AnimationClip.parse(jumpJson));+ fallAction.setLoop(THREE.LoopOnce, 1);+ fallAction.clampWhenFinished = true;++ if (rootBone) baseRootPos = rootBone.position.clone();++ // Lock root bone every frame so animation root motion never drifts the avatar+ const _r = renderer.render.bind(renderer);+ renderer.render = (sc, cam) => {+ try {+ if (rootBone && baseRootPos) rootBone.position.copy(baseRootPos);+ } catch (_) {}+ _r(sc, cam);};- runSeq();++ // Begin the cycle: sit on the text, stand up, jump to the button+ startSit();});});// ── Render loop ───────────────────────────────────────────────────- const clock=new THREE.Clock();- (function tick(){+ const clock = new THREE.Clock();+ (function tick() {requestAnimationFrame(tick);try {- const dt=Math.min(clock.getDelta(),0.05);- controls.update();+ const dt = Math.min(clock.getDelta(), 0.05);mixer?.update(dt);- updateSpring(dt);updateSeq(dt);updateParticles(dt);- renderer.render(scene,camera);- } catch(_) {}+ updateSeq(dt);+ renderer.render(scene, camera);+ } catch (_) {}})();</script></body>diff --git a/public/demos/gemini-jump.html b/public/demos/gemini-jump.htmlindex 8c350cf51..926bdec3e 100644--- a/public/demos/gemini-jump.html+++ b/public/demos/gemini-jump.html@@ -22,12 +22,23 @@.crumb a { color: #8a8d98; text-decoration: none; }.crumb a:hover { color: #d6ff3d; }+ .hero {+ max-width: 760px;+ margin: 0 auto;+ padding: 8px 24px 56px;+ display: flex;+ flex-direction: column;+ align-items: center;+ text-align: center;+ }+.stage-wrap {position: relative;- width: 100vw;- height: calc(100vh - 60px);- min-height: 540px;+ width: 100%;+ height: clamp(360px, 58vh, 560px);overflow: hidden;+ border-radius: 18px;+ background: radial-gradient(ellipse at center bottom, #0d1018 0%, #05060a 70%);}#stage-canvas {display: block;@@ -58,41 +69,35 @@pointer-events: none;}- /* Floating headline + CTA */- .overlay {- position: absolute;- inset: 0;+ .text-block {+ margin-top: 32px;display: flex;flex-direction: column;- justify-content: center;- align-items: flex-start;- padding: 0 8vw;- pointer-events: none;+ align-items: center;+ gap: 14px;}.eyebrow {display: inline-flex; align-items: center; gap: 8px;font-size: 11.5px; letter-spacing: 0.15em; text-transform: uppercase;- color: #d6ff3d; margin-bottom: 14px;+ color: #d6ff3d;}.eyebrow-dot {display: inline-block; width: 6px; height: 6px;border-radius: 50%; background: #d6ff3d;}.title {- font-size: clamp(34px, 5.4vw, 64px);+ font-size: clamp(40px, 6vw, 72px);font-weight: 700; letter-spacing: -0.025em;- line-height: 1.04; margin: 0 0 18px;- max-width: 14ch;+ line-height: 1.04; margin: 0;}.title em { color: #d6ff3d; font-style: normal; }.sub {color: #8a8d98; font-size: 16px; line-height: 1.55;- max-width: 42ch; margin: 0 0 28px;+ max-width: 44ch; margin: 0;}- /* Heavy CTA with DOM-side depth (matches the 3D button feel) */#trigger-btn {- pointer-events: auto;+ margin-top: 10px;background: #d6ff3d;color: #0a0b0f;border: none;@@ -110,10 +115,7 @@}.hint {- position: absolute;- bottom: 18px;- left: 0; right: 0;- text-align: center;+ margin-top: 8px;font-size: 12px;color: #4a4b5a;}@@ -123,31 +125,30 @@<header><div id="nav-container"></div></header><p class="crumb"><a href="/demos/">← lab</a></p>- <div class="stage-wrap">- <canvas id="stage-canvas"></canvas>+ <section class="hero">+ <div class="stage-wrap">+ <canvas id="stage-canvas"></canvas>+ <div class="loading-veil" id="loading-veil">+ <div class="spinner"></div>+ <span>loading avatar…</span>+ </div>+ <div class="status-pill" id="status"></div>+ </div>- <div class="overlay">+ <div class="text-block"><div class="eyebrow"><span class="eyebrow-dot"></span><span>three.ws · tactile concept</span></div>- <h1 class="title">Click. <em>Watch it land.</em></h1>+ <h1 class="title">Give your AI<br />a <em>body.</em></h1><p class="sub">- A heavy 3D button, a real avatar with a real jump clip, and a- volume-preserving squish on impact. Shockwave ring optional —- but it's there.+ Click the button. The avatar leaps onto a heavy 3D target, with+ a volume-preserving squish on impact and an elastic recoil.</p><button id="trigger-btn" type="button">Trigger jump →</button>+ <p class="hint">Click to send the avatar in</p></div>-- <div class="loading-veil" id="loading-veil">- <div class="spinner"></div>- <span>loading avatar…</span>- </div>- <div class="status-pill" id="status"></div>-- <p class="hint">Click the button to send the avatar in</p>- </div>+ </section><script src="/nav.js" defer></script><script type="module" src="/src/gemini-jump.js"></script>diff --git a/rider/assets/clips/sitidle.json b/rider/assets/clips/sitidle.jsonnew file mode 100644index 000000000..3a1b21516--- /dev/null+++ b/rider/assets/clips/sitidle.json@@ -0,0 +1 @@+{"name":"sitidle","duration":1,"tracks":[{"name":"Hips.position","type":"vector","times":[0,1],"values":[-0.0003007067134603858,0.616661548614502,0.03541681915521622,-0.0003007067134603858,0.616661548614502,0.03541681915521622]},{"name":"Hips.quaternion","type":"quaternion","times":[0,1],"values":[0.007717160042375326,0.0006047349888831377,0.008668392896652222,0.9999324679374695,0.007717160042375326,0.0006047349888831377,0.008668392896652222,0.9999324679374695]},{"name":"Spine.quaternion","type":"quaternion","times":[0,1],"values":[0.010784502141177654,0.001855966867879033,-0.013760516420006752,0.9998454451560974,0.010784502141177654,0.001855966867879033,-0.013760516420006752,0.9998454451560974]},{"name":"Spine1.quaternion","type":"quaternion","times":[0,1],"values":[-0.0017435818444937468,0.0020713522098958492,-0.0027721028309315443,0.9999924898147583,-0.0017435818444937468,0.0020713522098958492,-0.0027721028309315443,0.9999924898147583]},{"name":"Spine2.quaternion","type":"quaternion","times":[0,1],"values":[0.011138699017465115,0.002368954010307789,-0.0024182521738111973,0.9999322295188904,0.011138699017465115,0.002368954010307789,-0.0024182521738111973,0.9999322295188904]},{"name":"Neck.quaternion","type":"quaternion","times":[0,1],"values":[-0.008787269704043865,-0.011598835699260235,0.002805812982842326,0.9998902082443237,-0.008787269704043865,-0.011598835699260235,0.002805812982842326,0.9998902082443237]},{"name":"Head.quaternion","type":"quaternion","times":[0,1],"values":[-0.07555954158306122,-0.035621628165245056,-0.048013415187597275,0.9953474402427673,-0.07555954158306122,-0.035621628165245056,-0.048013415187597275,0.9953474402427673]},{"name":"RightShoulder.quaternion","type":"quaternion","times":[0,1],"values":[-0.506586492061615,0.567542552947998,-0.5619873404502869,-0.3247087895870209,-0.506586492061615,0.567542552947998,-0.5619873404502869,-0.3247087895870209]},{"name":"RightArm.quaternion","type":"quaternion","times":[0,1],"values":[0.45261016488075256,-0.19579263031482697,-0.36834535002708435,0.7881186604499817,0.45261016488075256,-0.19579263031482697,-0.36834535002708435,0.7881186604499817]},{"name":"RightForeArm.quaternion","type":"quaternion","times":[0,1],"values":[-6.048264111768731e-8,8.744397916871094e-8,-0.4628143310546875,0.886455237865448,-6.048264111768731e-8,8.744397916871094e-8,-0.4628143310546875,0.886455237865448]},{"name":"RightHand.quaternion","type":"quaternion","times":[0,1],"values":[-0.27429959177970886,-0.34016501903533936,-0.15186142921447754,0.8865582942962646,-0.27429959177970886,-0.34016501903533936,-0.15186142921447754,0.8865582942962646]},{"name":"RightHandThumb1.quaternion","type":"quaternion","times":[0,1],"values":[0.08698797225952148,0.10642802715301514,-0.22253477573394775,0.9651862382888794,0.08698797225952148,0.10642802715301514,-0.22253477573394775,0.9651862382888794]},{"name":"RightHandThumb2.quaternion","type":"quaternion","times":[0,1],"values":[0.19453103840351105,0.246421217918396,0.16522035002708435,0.9349526762962341,0.19453103840351105,0.246421217918396,0.16522035002708435,0.9349526762962341]},{"name":"RightHandThumb3.quaternion","type":"quaternion","times":[0,1],"values":[-0.1470026671886444,0.12938666343688965,0.269844651222229,0.9427794814109802,-0.1470026671886444,0.12938666343688965,0.269844651222229,0.9427794814109802]},{"name":"RightHandIndex1.quaternion","type":"quaternion","times":[0,1],"values":[0.11798009276390076,-0.026669103652238846,-0.005733484402298927,0.9926412105560303,0.11798009276390076,-0.026669103652238846,-0.005733484402298927,0.9926412105560303]},{"name":"RightHandIndex2.quaternion","type":"quaternion","times":[0,1],"values":[0.22489862143993378,-9.43236102557421e-8,0.018322255462408066,0.9742099046707153,0.22489862143993378,-9.43236102557421e-8,0.018322255462408066,0.9742099046707153]},{"name":"RightHandIndex3.quaternion","type":"quaternion","times":[0,1],"values":[0.08000072836875916,-1.7195345591858313e-8,0.006517508532851934,0.9967734813690186,0.08000072836875916,-1.7195345591858313e-8,0.006517508532851934,0.9967734813690186]},{"name":"RightHandMiddle1.quaternion","type":"quaternion","times":[0,1],"values":[0.02199513651430607,-0.0002157018316211179,0.03199075907468796,0.9992461204528809,0.02199513651430607,-0.0002157018316211179,0.03199075907468796,0.9992461204528809]},{"name":"RightHandMiddle2.quaternion","type":"quaternion","times":[0,1],"values":[0.25023525953292847,-2.858036918240714e-9,0.020386213436722755,0.9679704308509827,0.25023525953292847,-2.858036918240714e-9,0.020386213436722755,0.9679704308509827]},{"name":"RightHandMiddle3.quaternion","type":"quaternion","times":[0,1],"values":[0.04681898653507233,-3.0566258857334105e-8,0.0038142313715070486,0.9988961219787598,0.04681898653507233,-3.0566258857334105e-8,0.0038142313715070486,0.9988961219787598]},{"name":"RightHandRing1.quaternion","type":"quaternion","times":[0,1],"values":[0.03721777722239494,-0.0014672368997707963,0.0667622834444046,0.9970734715461731,0.03721777722239494,-0.0014672368997707963,0.0667622834444046,0.9970734715461731]},{"name":"RightHandRing2.quaternion","type":"quaternion","times":[0,1],"values":[0.10728458315134048,-6.153101139716455e-8,0.008740259334445,0.9941899180412292,0.10728458315134048,-6.153101139716455e-8,0.008740259334445,0.9941899180412292]},{"name":"RightHandRing3.quaternion","type":"quaternion","times":[0,1],"values":[0.08805711567401886,-1.2599309151539728e-8,0.007173886988312006,0.9960895776748657,0.08805711567401886,-1.2599309151539728e-8,0.007173886988312006,0.9960895776748657]},{"name":"RightHandPinky1.quaternion","type":"quaternion","times":[0,1],"values":[0.07063508778810501,0.10222619026899338,0.08248411118984222,0.9888159036636353,0.07063508778810501,0.10222619026899338,0.08248411118984222,0.9888159036636353]},{"name":"RightHandPinky2.quaternion","type":"quaternion","times":[0,1],"values":[0.055846408009529114,-4.410116716258017e-8,0.0045497845858335495,0.998429000377655,0.055846408009529114,-4.410116716258017e-8,0.0045497845858335495,0.998429000377655]},{"name":"RightHandPinky3.quaternion","type":"quaternion","times":[0,1],"values":[0.05539507418870926,-6.527643137133055e-8,0.004513130988925695,0.9984543323516846,0.05539507418870926,-6.527643137133055e-8,0.004513130988925695,0.9984543323516846]},{"name":"LeftShoulder.quaternion","type":"quaternion","times":[0,1],"values":[-0.5982335209846497,-0.48270347714424133,0.4856187403202057,-0.41627922654151917,-0.5982335209846497,-0.48270347714424133,0.4856187403202057,-0.41627922654151917]},{"name":"LeftArm.quaternion","type":"quaternion","times":[0,1],"values":[0.42233359813690186,0.1690346747636795,0.2317366898059845,0.8598603010177612,0.42233359813690186,0.1690346747636795,0.2317366898059845,0.8598603010177612]},{"name":"LeftForeArm.quaternion","type":"quaternion","times":[0,1],"values":[3.4011855554183512e-9,-8.770536652491501e-8,0.5165185928344727,0.8562759757041931,3.4011855554183512e-9,-8.770536652491501e-8,0.5165185928344727,0.8562759757041931]},{"name":"LeftHand.quaternion","type":"quaternion","times":[0,1],"values":[-0.35264939069747925,0.2629314363002777,0.06149889528751373,0.8959482908248901,-0.35264939069747925,0.2629314363002777,0.06149889528751373,0.8959482908248901]},{"name":"LeftHandThumb1.quaternion","type":"quaternion","times":[0,1],"values":[0.09009416401386261,0.03579211235046387,0.2088557779788971,0.9731296300888062,0.09009416401386261,0.03579211235046387,0.2088557779788971,0.9731296300888062]},{"name":"LeftHandThumb2.quaternion","type":"quaternion","times":[0,1],"values":[0.13740670680999756,-0.17987670004367828,-0.14544923603534698,0.9631242156028748,0.13740670680999756,-0.17987670004367828,-0.14544923603534698,0.9631242156028748]},{"name":"LeftHandThumb3.quaternion","type":"quaternion","times":[0,1],"values":[-0.09837567806243896,-0.12890447676181793,-0.20686224102973938,0.9648388028144836,-0.09837567806243896,-0.12890447676181793,-0.20686224102973938,0.9648388028144836]},{"name":"LeftHandIndex1.quaternion","type":"quaternion","times":[0,1],"values":[0.23268304765224457,-0.007605001796036959,-0.02332974597811699,0.9722430109977722,0.23268304765224457,-0.007605001796036959,-0.02332974597811699,0.9722430109977722]},{"name":"LeftHandIndex2.quaternion","type":"quaternion","times":[0,1],"values":[0.1837639957666397,-2.3392745163164363e-7,-0.01883143186569214,0.9827899932861328,0.1837639957666397,-2.3392745163164363e-7,-0.01883143186569214,0.9827899932861328]},{"name":"LeftHandIndex3.quaternion","type":"quaternion","times":[0,1],"values":[0.08413059264421463,-1.230301478472029e-7,-0.008621425367891788,0.9964174628257751,0.08413059264421463,-1.230301478472029e-7,-0.008621425367891788,0.9964174628257751]},{"name":"LeftHandMiddle1.quaternion","type":"quaternion","times":[0,1],"values":[0.14256758987903595,0.0020128560718148947,-0.06491809338331223,0.9876518249511719,0.14256758987903595,0.0020128560718148947,-0.06491809338331223,0.9876518249511719]},{"name":"LeftHandMiddle2.quaternion","type":"quaternion","times":[0,1],"values":[0.16757552325725555,-1.528318165355813e-7,-0.017172539606690407,0.9857096672058105,0.16757552325725555,-1.528318165355813e-7,-0.017172539606690407,0.9857096672058105]},{"name":"LeftHandMiddle3.quaternion","type":"quaternion","times":[0,1],"values":[0.1408686637878418,-2.3212852795495564e-7,-0.014435834251344204,0.9899230599403381,0.1408686637878418,-2.3212852795495564e-7,-0.014435834251344204,0.9899230599403381]},{"name":"LeftHandRing1.quaternion","type":"quaternion","times":[0,1],"values":[0.12166228145360947,0.004953564144670963,-0.08675211668014526,0.988760769367218,0.12166228145360947,0.004953564144670963,-0.08675211668014526,0.988760769367218]},{"name":"LeftHandRing2.quaternion","type":"quaternion","times":[0,1],"values":[0.13239885866641998,-2.2915905617537646e-7,-0.01356782391667366,0.9911036491394043,0.13239885866641998,-2.2915905617537646e-7,-0.01356782391667366,0.9911036491394043]},{"name":"LeftHandRing3.quaternion","type":"quaternion","times":[0,1],"values":[0.15027698874473572,-2.1197493538238632e-7,-0.015399886295199394,0.9885239601135254,0.15027698874473572,-2.1197493538238632e-7,-0.015399886295199394,0.9885239601135254]},{"name":"LeftHandPinky1.quaternion","type":"quaternion","times":[0,1],"values":[0.1189286932349205,0.006131096743047237,-0.0961347222328186,0.9882188439369202,0.1189286932349205,0.006131096743047237,-0.0961347222328186,0.9882188439369202]},{"name":"LeftHandPinky2.quaternion","type":"quaternion","times":[0,1],"values":[0.11977499723434448,-1.788268662039627e-7,-0.012274118140339851,0.9927251935005188,0.11977499723434448,-1.788268662039627e-7,-0.012274118140339851,0.9927251935005188]},{"name":"LeftHandPinky3.quaternion","type":"quaternion","times":[0,1],"values":[0.09551839530467987,-1.1729491689038696e-7,-0.009788455441594124,0.9953795075416565,0.09551839530467987,-1.1729491689038696e-7,-0.009788455441594124,0.9953795075416565]},{"name":"RightUpLeg.quaternion","type":"quaternion","times":[0,1],"values":[-0.005508720874786377,0.6927937865257263,0.7157312631607056,0.0879497230052948,-0.005508720874786377,0.6927937865257263,0.7157312631607056,0.0879497230052948]},{"name":"RightLeg.quaternion","type":"quaternion","times":[0,1],"values":[-0.6856150031089783,0.031210703775286674,-0.046664658933877945,0.7257963418960571,-0.6856150031089783,0.031210703775286674,-0.046664658933877945,0.7257963418960571]},{"name":"RightFoot.quaternion","type":"quaternion","times":[0,1],"values":[0.4159928262233734,0.027253152802586555,0.055000189691782,0.9072939157485962,0.4159928262233734,0.027253152802586555,0.055000189691782,0.9072939157485962]},{"name":"RightToeBase.quaternion","type":"quaternion","times":[0,1],"values":[0.3368167579174042,-1.2475813271350944e-8,-4.2812242639911346e-8,0.9415702223777771,0.3368167579174042,-1.2475813271350944e-8,-4.2812242639911346e-8,0.9415702223777771]},{"name":"LeftUpLeg.quaternion","type":"quaternion","times":[0,1],"values":[0.03658316656947136,0.6874494552612305,0.7183312773704529,-0.10037470608949661,0.03658316656947136,0.6874494552612305,0.7183312773704529,-0.10037470608949661]},{"name":"LeftLeg.quaternion","type":"quaternion","times":[0,1],"values":[-0.6864414811134338,-0.04204167053103447,0.03733198344707489,0.7250081896781921,-0.6864414811134338,-0.04204167053103447,0.03733198344707489,0.7250081896781921]},{"name":"LeftFoot.quaternion","type":"quaternion","times":[0,1],"values":[0.4215811789035797,0.03223156929016113,-0.07426898926496506,0.9031691551208496,0.4215811789035797,0.03223156929016113,-0.07426898926496506,0.9031691551208496]},{"name":"LeftToeBase.quaternion","type":"quaternion","times":[0,1],"values":[0.33608874678611755,3.719247487765642e-8,-4.899893113474718e-8,0.9418303370475769,0.33608874678611755,3.719247487765642e-8,-4.899893113474718e-8,0.9418303370475769]}],"uuid":"b5260a4f-d2de-443f-b904-4e0caa332ee0","blendMode":2500}\ No newline at end of filediff --git a/rider/build/build.js b/rider/build/build.jsindex 52cd37a1a..ecba37cbe 100644--- a/rider/build/build.js+++ b/rider/build/build.js@@ -1,4 +1,4 @@-!function(e){var t=this.webpackHotUpdate;this.webpackHotUpdate=function(e,n){!function(e,t){if(!w[e]||!_[e])return;for(var n in _[e]=!1,t)Object.prototype.hasOwnProperty.call(t,n)&&(f[n]=t[n]);0==--y&&0===v&&S()}(e,n),t&&t(e,n)};var n,r=!0,i="b6816b72f4b52c110a25",o={},a=[],s=[];function c(e){var t=C[e];if(!t)return k;var r=function(r){return t.hot.active?(C[r]?-1===C[r].parents.indexOf(e)&&C[r].parents.push(e):(a=[e],n=r),-1===t.children.indexOf(r)&&t.children.push(r)):(console.warn("[HMR] unexpected require("+r+") from disposed module "+e),a=[]),k(r)},i=function(e){return{configurable:!0,enumerable:!0,get:function(){return k[e]},set:function(t){k[e]=t}}};for(var o in k)Object.prototype.hasOwnProperty.call(k,o)&&"e"!==o&&"t"!==o&&Object.defineProperty(r,o,i(o));return r.e=function(e){return"ready"===h&&d("prepare"),v++,k.e(e).then(t,(function(e){throw t(),e}));function t(){v--,"prepare"===h&&(b[e]||x(e),0===v&&0===y&&S())}},r.t=function(e,t){return 1&t&&(e=r(e)),k.t(e,-2&t)},r}function l(t){var r={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:n!==t,active:!0,accept:function(e,t){if(void 0===e)r._selfAccepted=!0;else if("function"==typeof e)r._selfAccepted=e;else if("object"==typeof e)for(var n=0;n<e.length;n++)r._acceptedDependencies[e[n]]=t||function(){};else r._acceptedDependencies[e]=t||function(){}},decline:function(e){if(void 0===e)r._selfDeclined=!0;else if("object"==typeof e)for(var t=0;t<e.length;t++)r._declinedDependencies[e[t]]=!0;else r._declinedDependencies[e]=!0},dispose:function(e){r._disposeHandlers.push(e)},addDisposeHandler:function(e){r._disposeHandlers.push(e)},removeDisposeHandler:function(e){var t=r._disposeHandlers.indexOf(e);t>=0&&r._disposeHandlers.splice(t,1)},invalidate:function(){switch(this._selfInvalidated=!0,h){case"idle":(f={})[t]=e[t],d("ready");break;case"ready":R(t);break;case"prepare":case"check":case"dispose":case"apply":(g=g||[]).push(t)}},check:A,apply:T,status:function(e){if(!e)return h;u.push(e)},addStatusHandler:function(e){u.push(e)},removeStatusHandler:function(e){var t=u.indexOf(e);t>=0&&u.splice(t,1)},data:o[t]};return n=void 0,r}var u=[],h="idle";function d(e){h=e;for(var t=0;t<u.length;t++)u[t].call(null,e)}var p,f,m,g,y=0,v=0,b={},_={},w={};function E(e){return+e+""===e?+e:e}function A(e){if("idle"!==h)throw new Error("check() is only allowed in idle status");return r=e,d("check"),(t=1e4,t=t||1e4,new Promise((function(e,n){if("undefined"==typeof XMLHttpRequest)return n(new Error("No browser support"));try{var r=new XMLHttpRequest,o=k.p+""+i+".hot-update.json";r.open("GET",o,!0),r.timeout=t,r.send(null)}catch(e){return n(e)}r.onreadystatechange=function(){if(4===r.readyState)if(0===r.status)n(new Error("Manifest request to "+o+" timed out."));else if(404===r.status)e();else if(200!==r.status&&304!==r.status)n(new Error("Manifest request to "+o+" failed."));else{try{var t=JSON.parse(r.responseText)}catch(e){return void n(e)}e(t)}}}))).then((function(e){if(!e)return d(M()?"ready":"idle"),null;_={},b={},w=e.c,m=e.h,d("prepare");var t=new Promise((function(e,t){p={resolve:e,reject:t}}));f={};return x(0),"prepare"===h&&0===v&&0===y&&S(),t}));var t}function x(e){w[e]?(_[e]=!0,y++,function(e){var t=document.createElement("script");t.charset="utf-8",t.src=k.p+""+e+"."+i+".hot-update.js",document.head.appendChild(t)}(e)):b[e]=!0}function S(){d("ready");var e=p;if(p=null,e)if(r)Promise.resolve().then((function(){return T(r)})).then((function(t){e.resolve(t)}),(function(t){e.reject(t)}));else{var t=[];for(var n in f)Object.prototype.hasOwnProperty.call(f,n)&&t.push(E(n));e.resolve(t)}}function T(t){if("ready"!==h)throw new Error("apply() is only allowed in ready status");return function t(r){var s,c,l,u,h;function p(e){for(var t=[e],n={},r=t.map((function(e){return{chain:[e],id:e}}));r.length>0;){var i=r.pop(),o=i.id,a=i.chain;if((u=C[o])&&(!u.hot._selfAccepted||u.hot._selfInvalidated)){if(u.hot._selfDeclined)return{type:"self-declined",chain:a,moduleId:o};if(u.hot._main)return{type:"unaccepted",chain:a,moduleId:o};for(var s=0;s<u.parents.length;s++){var c=u.parents[s],l=C[c];if(l){if(l.hot._declinedDependencies[o])return{type:"declined",chain:a.concat([c]),moduleId:o,parentId:c};-1===t.indexOf(c)&&(l.hot._acceptedDependencies[o]?(n[c]||(n[c]=[]),y(n[c],[o])):(delete n[c],t.push(c),r.push({chain:a.concat([c]),id:c})))}}}}return{type:"accepted",moduleId:e,outdatedModules:t,outdatedDependencies:n}}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];-1===e.indexOf(r)&&e.push(r)}}M();var v={},b=[],_={},A=function(){console.warn("[HMR] unexpected require("+S.moduleId+") to disposed module")};for(var x in f)if(Object.prototype.hasOwnProperty.call(f,x)){var S;h=E(x),S=f[x]?p(h):{type:"disposed",moduleId:x};var T=!1,R=!1,I=!1,P="";switch(S.chain&&(P="\nUpdate propagation: "+S.chain.join(" -> ")),S.type){case"self-declined":r.onDeclined&&r.onDeclined(S),r.ignoreDeclined||(T=new Error("Aborted because of self decline: "+S.moduleId+P));break;case"declined":r.onDeclined&&r.onDeclined(S),r.ignoreDeclined||(T=new Error("Aborted because of declined dependency: "+S.moduleId+" in "+S.parentId+P));break;case"unaccepted":r.onUnaccepted&&r.onUnaccepted(S),r.ignoreUnaccepted||(T=new Error("Aborted because "+h+" is not accepted"+P));break;case"accepted":r.onAccepted&&r.onAccepted(S),R=!0;break;case"disposed":r.onDisposed&&r.onDisposed(S),I=!0;break;default:throw new Error("Unexception type "+S.type)}if(T)return d("abort"),Promise.reject(T);if(R)for(h in _[h]=f[h],y(b,S.outdatedModules),S.outdatedDependencies)Object.prototype.hasOwnProperty.call(S.outdatedDependencies,h)&&(v[h]||(v[h]=[]),y(v[h],S.outdatedDependencies[h]));I&&(y(b,[S.moduleId]),_[h]=A)}var O,N=[];for(c=0;c<b.length;c++)h=b[c],C[h]&&C[h].hot._selfAccepted&&_[h]!==A&&!C[h].hot._selfInvalidated&&N.push({module:h,parents:C[h].parents.slice(),errorHandler:C[h].hot._selfAccepted});d("dispose"),Object.keys(w).forEach((function(e){!1===w[e]&&function(e){delete installedChunks[e]}(e)}));var D,L,F=b.slice();for(;F.length>0;)if(h=F.pop(),u=C[h]){var j={},U=u.hot._disposeHandlers;for(l=0;l<U.length;l++)(s=U[l])(j);for(o[h]=j,u.hot.active=!1,delete C[h],delete v[h],l=0;l<u.children.length;l++){var B=C[u.children[l]];B&&((O=B.parents.indexOf(h))>=0&&B.parents.splice(O,1))}}for(h in v)if(Object.prototype.hasOwnProperty.call(v,h)&&(u=C[h]))for(L=v[h],l=0;l<L.length;l++)D=L[l],(O=u.children.indexOf(D))>=0&&u.children.splice(O,1);d("apply"),void 0!==m&&(i=m,m=void 0);for(h in f=void 0,_)Object.prototype.hasOwnProperty.call(_,h)&&(e[h]=_[h]);var V=null;for(h in v)if(Object.prototype.hasOwnProperty.call(v,h)&&(u=C[h])){L=v[h];var H=[];for(c=0;c<L.length;c++)if(D=L[c],s=u.hot._acceptedDependencies[D]){if(-1!==H.indexOf(s))continue;H.push(s)}for(c=0;c<H.length;c++){s=H[c];try{s(L)}catch(e){r.onErrored&&r.onErrored({type:"accept-errored",moduleId:h,dependencyId:L[c],error:e}),r.ignoreErrored||V||(V=e)}}}for(c=0;c<N.length;c++){var z=N[c];h=z.module,a=z.parents,n=h;try{k(h)}catch(e){if("function"==typeof z.errorHandler)try{z.errorHandler(e)}catch(t){r.onErrored&&r.onErrored({type:"self-accept-error-handler-errored",moduleId:h,error:t,originalError:e}),r.ignoreErrored||V||(V=t),V||(V=e)}else r.onErrored&&r.onErrored({type:"self-accept-errored",moduleId:h,error:e}),r.ignoreErrored||V||(V=e)}}if(V)return d("fail"),Promise.reject(V);if(g)return t(r).then((function(e){return b.forEach((function(t){e.indexOf(t)<0&&e.push(t)})),e}));return d("idle"),new Promise((function(e){e(b)}))}(t=t||{})}function M(){if(g)return f||(f={}),g.forEach(R),g=void 0,!0}function R(t){Object.prototype.hasOwnProperty.call(f,t)||(f[t]=e[t])}var C={};function k(t){if(C[t])return C[t].exports;var n=C[t]={i:t,l:!1,exports:{},hot:l(t),parents:(s=a,a=[],s),children:[]};return e[t].call(n.exports,n,n.exports,c(t)),n.l=!0,n.exports}k.m=e,k.c=C,k.d=function(e,t,n){k.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},k.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},k.t=function(e,t){if(1&t&&(e=k(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(k.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)k.d(n,r,function(t){return e[t]}.bind(null,r));return n},k.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return k.d(t,"a",t),t},k.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},k.p="",k.h=function(){return i},c(41)(k.s=41)}([function(e,t){const n={OFF:"#111",WHITE:"#f0f0f0",DARKRED:"#5A354B",RED:"#f971c3",BRIGHTRED:"#ffd3ee",DARKBLUE:"#2B4D4C",BLUE:"#6ff9ea",BRIGHTBLUE:"#d7fdf9",YELLOW:"#fff568",UI_ACCENT:"#08bfa2",UI_ACCENT2:"#f01978"};n.schemes={default:{name:"Super Medium",off:"#111",primary:n.RED,primarybright:n.BRIGHTRED,secondary:n.BLUE,secondarybright:n.BRIGHTBLUE,tertiary:n.YELLOW},blue:{name:"Star Warrior",off:"#111",primary:"#1e4482",primarybright:"#0B4BB3",secondary:"#c27727",secondarybright:"#FFD840",tertiary:"#d7fdf9"},purple:{name:"Galactic Royal",off:"#111",primary:"#6A39B3",primarybright:"#B685FF",secondary:"#FAF239",secondarybright:"#FFFC9E",tertiary:"#50FFF2"},green:{name:"Space Joker",off:"#111",primary:"#779E37",primarybright:"#C0FF59",secondary:"#6A39B3",secondarybright:"#B685FF",tertiary:"#FAFAFA"},yellow:{name:"Solar Flare",off:"#111",primary:"#C2C04C",primarybright:"#FAF761",secondary:"#E03A3E",secondarybright:"#FA7578",tertiary:"#278ECC"},red:{name:"Trail Blazer",off:"#111",primary:"#E03A3E",primarybright:"#FA7578",secondary:"#DADADA",secondarybright:"#EFEFEF",tertiary:"#666"},rgb:{name:"Mint Choco",off:"#111",primary:"#34eb89",primarYBRIGht:"#40fb95",secondary:"#34ebd8",secondarybright:"#40fbeA",tertiary:"#eb3434"},cheetah:{name:"Cheetah SoL",off:"#111",primary:"#c27727",primarYBright:"#e68319",secondary:"#635c54",secondarybright:"#8a857f",tertiary:"#ebebeb"},black:{name:"Ash Nova",off:"#111",primary:"#555",primarybright:"#808080",secondary:"#FFF",secondarybright:"#FFF",tertiary:"#B8B8B8"}},n.options=Object.keys(n.schemes),"undefined"==typeof localStorage?n.initial="default":n.initial=n.schemes[localStorage.getItem("colorScheme")||"blue"],e.exports=n},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,l=[],u=!1,h=-1;function d(){u&&c&&(u=!1,c.length?l=c.concat(l):h=-1,l.length&&p())}function p(){if(!u){var e=s(d);u=!0;for(var t=l.length;t;){for(c=l,l=[];++h<t;)c&&c[h].run();h=-1,t=l.length}c=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function m(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new f(e,t)),1!==l.length||u||s(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},,,,function(e,t){var n;e.exports.getS3FileUrl=function(e,t){return`https://previews.three.ws/${e}-${t}?v=2`},console.line=(n={},function(e,t,r,i){i=i||"#FFF",n[r=r||"default"]||(n[r]=document.createElement("a-entity"),n[r].setAttribute("line","color",i||"#FFF"),n[r].setAttribute("id",r),AFRAME.scenes[0].appendChild(n[r])),n[r].setAttribute("line","start",e.clone()),n[r].setAttribute("line","end",t.clone())}),console.vec3=function(){const e={},t={primitive:"box",width:.05,height:.05,depth:.05},n={shader:"flat"};return function(r,i,o){o=o||"#FFF",e[i=i||"default"]||(e[i]=document.createElement("a-entity"),n.color=o||"#FFF",e[i].setAttribute("geometry",t),e[i].setAttribute("material",n),e[i].setAttribute("id",i),e[i].setAttribute("text",{align:"center",value:i,side:"double"}),AFRAME.scenes[0].appendChild(e[i])),e[i].object3D.position.copy(r)}}()},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return i})),n.d(t,"__assign",(function(){return o})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return s})),n.d(t,"__param",(function(){return c})),n.d(t,"__metadata",(function(){return l})),n.d(t,"__awaiter",(function(){return u})),n.d(t,"__generator",(function(){return h})),n.d(t,"__exportStar",(function(){return d})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return f})),n.d(t,"__spread",(function(){return m})),n.d(t,"__spreadArrays",(function(){return g})),n.d(t,"__await",(function(){return y})),n.d(t,"__asyncGenerator",(function(){return v})),n.d(t,"__asyncDelegator",(function(){return b})),n.d(t,"__asyncValues",(function(){return _})),n.d(t,"__makeTemplateObject",(function(){return w})),n.d(t,"__importStar",(function(){return E})),n.d(t,"__importDefault",(function(){return A}));+!function(e){var t=this.webpackHotUpdate;this.webpackHotUpdate=function(e,n){!function(e,t){if(!w[e]||!_[e])return;for(var n in _[e]=!1,t)Object.prototype.hasOwnProperty.call(t,n)&&(f[n]=t[n]);0==--y&&0===v&&S()}(e,n),t&&t(e,n)};var n,r=!0,i="e05106e39985d875d321",o={},a=[],s=[];function c(e){var t=C[e];if(!t)return k;var r=function(r){return t.hot.active?(C[r]?-1===C[r].parents.indexOf(e)&&C[r].parents.push(e):(a=[e],n=r),-1===t.children.indexOf(r)&&t.children.push(r)):(console.warn("[HMR] unexpected require("+r+") from disposed module "+e),a=[]),k(r)},i=function(e){return{configurable:!0,enumerable:!0,get:function(){return k[e]},set:function(t){k[e]=t}}};for(var o in k)Object.prototype.hasOwnProperty.call(k,o)&&"e"!==o&&"t"!==o&&Object.defineProperty(r,o,i(o));return r.e=function(e){return"ready"===h&&d("prepare"),v++,k.e(e).then(t,(function(e){throw t(),e}));function t(){v--,"prepare"===h&&(b[e]||x(e),0===v&&0===y&&S())}},r.t=function(e,t){return 1&t&&(e=r(e)),k.t(e,-2&t)},r}function l(t){var r={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:n!==t,active:!0,accept:function(e,t){if(void 0===e)r._selfAccepted=!0;else if("function"==typeof e)r._selfAccepted=e;else if("object"==typeof e)for(var n=0;n<e.length;n++)r._acceptedDependencies[e[n]]=t||function(){};else r._acceptedDependencies[e]=t||function(){}},decline:function(e){if(void 0===e)r._selfDeclined=!0;else if("object"==typeof e)for(var t=0;t<e.length;t++)r._declinedDependencies[e[t]]=!0;else r._declinedDependencies[e]=!0},dispose:function(e){r._disposeHandlers.push(e)},addDisposeHandler:function(e){r._disposeHandlers.push(e)},removeDisposeHandler:function(e){var t=r._disposeHandlers.indexOf(e);t>=0&&r._disposeHandlers.splice(t,1)},invalidate:function(){switch(this._selfInvalidated=!0,h){case"idle":(f={})[t]=e[t],d("ready");break;case"ready":R(t);break;case"prepare":case"check":case"dispose":case"apply":(g=g||[]).push(t)}},check:A,apply:T,status:function(e){if(!e)return h;u.push(e)},addStatusHandler:function(e){u.push(e)},removeStatusHandler:function(e){var t=u.indexOf(e);t>=0&&u.splice(t,1)},data:o[t]};return n=void 0,r}var u=[],h="idle";function d(e){h=e;for(var t=0;t<u.length;t++)u[t].call(null,e)}var p,f,m,g,y=0,v=0,b={},_={},w={};function E(e){return+e+""===e?+e:e}function A(e){if("idle"!==h)throw new Error("check() is only allowed in idle status");return r=e,d("check"),(t=1e4,t=t||1e4,new Promise((function(e,n){if("undefined"==typeof XMLHttpRequest)return n(new Error("No browser support"));try{var r=new XMLHttpRequest,o=k.p+""+i+".hot-update.json";r.open("GET",o,!0),r.timeout=t,r.send(null)}catch(e){return n(e)}r.onreadystatechange=function(){if(4===r.readyState)if(0===r.status)n(new Error("Manifest request to "+o+" timed out."));else if(404===r.status)e();else if(200!==r.status&&304!==r.status)n(new Error("Manifest request to "+o+" failed."));else{try{var t=JSON.parse(r.responseText)}catch(e){return void n(e)}e(t)}}}))).then((function(e){if(!e)return d(M()?"ready":"idle"),null;_={},b={},w=e.c,m=e.h,d("prepare");var t=new Promise((function(e,t){p={resolve:e,reject:t}}));f={};return x(0),"prepare"===h&&0===v&&0===y&&S(),t}));var t}function x(e){w[e]?(_[e]=!0,y++,function(e){var t=document.createElement("script");t.charset="utf-8",t.src=k.p+""+e+"."+i+".hot-update.js",document.head.appendChild(t)}(e)):b[e]=!0}function S(){d("ready");var e=p;if(p=null,e)if(r)Promise.resolve().then((function(){return T(r)})).then((function(t){e.resolve(t)}),(function(t){e.reject(t)}));else{var t=[];for(var n in f)Object.prototype.hasOwnProperty.call(f,n)&&t.push(E(n));e.resolve(t)}}function T(t){if("ready"!==h)throw new Error("apply() is only allowed in ready status");return function t(r){var s,c,l,u,h;function p(e){for(var t=[e],n={},r=t.map((function(e){return{chain:[e],id:e}}));r.length>0;){var i=r.pop(),o=i.id,a=i.chain;if((u=C[o])&&(!u.hot._selfAccepted||u.hot._selfInvalidated)){if(u.hot._selfDeclined)return{type:"self-declined",chain:a,moduleId:o};if(u.hot._main)return{type:"unaccepted",chain:a,moduleId:o};for(var s=0;s<u.parents.length;s++){var c=u.parents[s],l=C[c];if(l){if(l.hot._declinedDependencies[o])return{type:"declined",chain:a.concat([c]),moduleId:o,parentId:c};-1===t.indexOf(c)&&(l.hot._acceptedDependencies[o]?(n[c]||(n[c]=[]),y(n[c],[o])):(delete n[c],t.push(c),r.push({chain:a.concat([c]),id:c})))}}}}return{type:"accepted",moduleId:e,outdatedModules:t,outdatedDependencies:n}}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];-1===e.indexOf(r)&&e.push(r)}}M();var v={},b=[],_={},A=function(){console.warn("[HMR] unexpected require("+S.moduleId+") to disposed module")};for(var x in f)if(Object.prototype.hasOwnProperty.call(f,x)){var S;h=E(x),S=f[x]?p(h):{type:"disposed",moduleId:x};var T=!1,R=!1,I=!1,P="";switch(S.chain&&(P="\nUpdate propagation: "+S.chain.join(" -> ")),S.type){case"self-declined":r.onDeclined&&r.onDeclined(S),r.ignoreDeclined||(T=new Error("Aborted because of self decline: "+S.moduleId+P));break;case"declined":r.onDeclined&&r.onDeclined(S),r.ignoreDeclined||(T=new Error("Aborted because of declined dependency: "+S.moduleId+" in "+S.parentId+P));break;case"unaccepted":r.onUnaccepted&&r.onUnaccepted(S),r.ignoreUnaccepted||(T=new Error("Aborted because "+h+" is not accepted"+P));break;case"accepted":r.onAccepted&&r.onAccepted(S),R=!0;break;case"disposed":r.onDisposed&&r.onDisposed(S),I=!0;break;default:throw new Error("Unexception type "+S.type)}if(T)return d("abort"),Promise.reject(T);if(R)for(h in _[h]=f[h],y(b,S.outdatedModules),S.outdatedDependencies)Object.prototype.hasOwnProperty.call(S.outdatedDependencies,h)&&(v[h]||(v[h]=[]),y(v[h],S.outdatedDependencies[h]));I&&(y(b,[S.moduleId]),_[h]=A)}var O,N=[];for(c=0;c<b.length;c++)h=b[c],C[h]&&C[h].hot._selfAccepted&&_[h]!==A&&!C[h].hot._selfInvalidated&&N.push({module:h,parents:C[h].parents.slice(),errorHandler:C[h].hot._selfAccepted});d("dispose"),Object.keys(w).forEach((function(e){!1===w[e]&&function(e){delete installedChunks[e]}(e)}));var D,L,F=b.slice();for(;F.length>0;)if(h=F.pop(),u=C[h]){var j={},U=u.hot._disposeHandlers;for(l=0;l<U.length;l++)(s=U[l])(j);for(o[h]=j,u.hot.active=!1,delete C[h],delete v[h],l=0;l<u.children.length;l++){var B=C[u.children[l]];B&&((O=B.parents.indexOf(h))>=0&&B.parents.splice(O,1))}}for(h in v)if(Object.prototype.hasOwnProperty.call(v,h)&&(u=C[h]))for(L=v[h],l=0;l<L.length;l++)D=L[l],(O=u.children.indexOf(D))>=0&&u.children.splice(O,1);d("apply"),void 0!==m&&(i=m,m=void 0);for(h in f=void 0,_)Object.prototype.hasOwnProperty.call(_,h)&&(e[h]=_[h]);var V=null;for(h in v)if(Object.prototype.hasOwnProperty.call(v,h)&&(u=C[h])){L=v[h];var H=[];for(c=0;c<L.length;c++)if(D=L[c],s=u.hot._acceptedDependencies[D]){if(-1!==H.indexOf(s))continue;H.push(s)}for(c=0;c<H.length;c++){s=H[c];try{s(L)}catch(e){r.onErrored&&r.onErrored({type:"accept-errored",moduleId:h,dependencyId:L[c],error:e}),r.ignoreErrored||V||(V=e)}}}for(c=0;c<N.length;c++){var z=N[c];h=z.module,a=z.parents,n=h;try{k(h)}catch(e){if("function"==typeof z.errorHandler)try{z.errorHandler(e)}catch(t){r.onErrored&&r.onErrored({type:"self-accept-error-handler-errored",moduleId:h,error:t,originalError:e}),r.ignoreErrored||V||(V=t),V||(V=e)}else r.onErrored&&r.onErrored({type:"self-accept-errored",moduleId:h,error:e}),r.ignoreErrored||V||(V=e)}}if(V)return d("fail"),Promise.reject(V);if(g)return t(r).then((function(e){return b.forEach((function(t){e.indexOf(t)<0&&e.push(t)})),e}));return d("idle"),new Promise((function(e){e(b)}))}(t=t||{})}function M(){if(g)return f||(f={}),g.forEach(R),g=void 0,!0}function R(t){Object.prototype.hasOwnProperty.call(f,t)||(f[t]=e[t])}var C={};function k(t){if(C[t])return C[t].exports;var n=C[t]={i:t,l:!1,exports:{},hot:l(t),parents:(s=a,a=[],s),children:[]};return e[t].call(n.exports,n,n.exports,c(t)),n.l=!0,n.exports}k.m=e,k.c=C,k.d=function(e,t,n){k.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},k.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},k.t=function(e,t){if(1&t&&(e=k(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(k.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)k.d(n,r,function(t){return e[t]}.bind(null,r));return n},k.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return k.d(t,"a",t),t},k.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},k.p="",k.h=function(){return i},c(41)(k.s=41)}([function(e,t){const n={OFF:"#111",WHITE:"#f0f0f0",DARKRED:"#5A354B",RED:"#f971c3",BRIGHTRED:"#ffd3ee",DARKBLUE:"#2B4D4C",BLUE:"#6ff9ea",BRIGHTBLUE:"#d7fdf9",YELLOW:"#fff568",UI_ACCENT:"#08bfa2",UI_ACCENT2:"#f01978"};n.schemes={default:{name:"Super Medium",off:"#111",primary:n.RED,primarybright:n.BRIGHTRED,secondary:n.BLUE,secondarybright:n.BRIGHTBLUE,tertiary:n.YELLOW},blue:{name:"Star Warrior",off:"#111",primary:"#1e4482",primarybright:"#0B4BB3",secondary:"#c27727",secondarybright:"#FFD840",tertiary:"#d7fdf9"},purple:{name:"Galactic Royal",off:"#111",primary:"#6A39B3",primarybright:"#B685FF",secondary:"#FAF239",secondarybright:"#FFFC9E",tertiary:"#50FFF2"},green:{name:"Space Joker",off:"#111",primary:"#779E37",primarybright:"#C0FF59",secondary:"#6A39B3",secondarybright:"#B685FF",tertiary:"#FAFAFA"},yellow:{name:"Solar Flare",off:"#111",primary:"#C2C04C",primarybright:"#FAF761",secondary:"#E03A3E",secondarybright:"#FA7578",tertiary:"#278ECC"},red:{name:"Trail Blazer",off:"#111",primary:"#E03A3E",primarybright:"#FA7578",secondary:"#DADADA",secondarybright:"#EFEFEF",tertiary:"#666"},rgb:{name:"Mint Choco",off:"#111",primary:"#34eb89",primarYBRIGht:"#40fb95",secondary:"#34ebd8",secondarybright:"#40fbeA",tertiary:"#eb3434"},cheetah:{name:"Cheetah SoL",off:"#111",primary:"#c27727",primarYBright:"#e68319",secondary:"#635c54",secondarybright:"#8a857f",tertiary:"#ebebeb"},black:{name:"Ash Nova",off:"#111",primary:"#555",primarybright:"#808080",secondary:"#FFF",secondarybright:"#FFF",tertiary:"#B8B8B8"}},n.options=Object.keys(n.schemes),"undefined"==typeof localStorage?n.initial="default":n.initial=n.schemes[localStorage.getItem("colorScheme")||"blue"],e.exports=n},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,l=[],u=!1,h=-1;function d(){u&&c&&(u=!1,c.length?l=c.concat(l):h=-1,l.length&&p())}function p(){if(!u){var e=s(d);u=!0;for(var t=l.length;t;){for(c=l,l=[];++h<t;)c&&c[h].run();h=-1,t=l.length}c=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function m(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new f(e,t)),1!==l.length||u||s(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},,,,function(e,t){var n;e.exports.getS3FileUrl=function(e,t){return`https://previews.three.ws/${e}-${t}?v=2`},console.line=(n={},function(e,t,r,i){i=i||"#FFF",n[r=r||"default"]||(n[r]=document.createElement("a-entity"),n[r].setAttribute("line","color",i||"#FFF"),n[r].setAttribute("id",r),AFRAME.scenes[0].appendChild(n[r])),n[r].setAttribute("line","start",e.clone()),n[r].setAttribute("line","end",t.clone())}),console.vec3=function(){const e={},t={primitive:"box",width:.05,height:.05,depth:.05},n={shader:"flat"};return function(r,i,o){o=o||"#FFF",e[i=i||"default"]||(e[i]=document.createElement("a-entity"),n.color=o||"#FFF",e[i].setAttribute("geometry",t),e[i].setAttribute("material",n),e[i].setAttribute("id",i),e[i].setAttribute("text",{align:"center",value:i,side:"double"}),AFRAME.scenes[0].appendChild(e[i])),e[i].object3D.position.copy(r)}}()},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return i})),n.d(t,"__assign",(function(){return o})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return s})),n.d(t,"__param",(function(){return c})),n.d(t,"__metadata",(function(){return l})),n.d(t,"__awaiter",(function(){return u})),n.d(t,"__generator",(function(){return h})),n.d(t,"__exportStar",(function(){return d})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return f})),n.d(t,"__spread",(function(){return m})),n.d(t,"__spreadArrays",(function(){return g})),n.d(t,"__await",(function(){return y})),n.d(t,"__asyncGenerator",(function(){return v})),n.d(t,"__asyncDelegator",(function(){return b})),n.d(t,"__asyncValues",(function(){return _})),n.d(t,"__makeTemplateObject",(function(){return w})),n.d(t,"__importStar",(function(){return E})),n.d(t,"__importDefault",(function(){return A}));/*! *****************************************************************************Copyright (c) Microsoft Corporation. All rights reserved.Licensed under the Apache License, Version 2.0 (the "License"); you may not use@@ -357,7 +357,7 @@ function r(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;v* See the License for the specific language governing permissions and* limitations under the License.*/-i.registerVersion("firebase","7.19.0","app"),e.exports=i},function(e,t){e.exports="#define T time * 0.06\nvarying vec2 uvs;\nuniform float time;\nuniform float thickness;\nvoid main() {\n uvs.xy = uv.xy;\n vec3 pos = position;\n\n pos.x *= thickness + sin(T) * ((0.1 + uv.x) * 16.0 + uv.y * 4.9) * thickness * 0.005;\n pos.z *= thickness + cos(T) * ((0.1 + uv.x) * 13.0 + uv.y * 14.9) * thickness * 0.005;\n\n gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);\n}"},function(e,t){e.exports="varying vec2 uvs;\nuniform sampler2D src;\nuniform vec3 color;\nuniform float time;\n\n#define T time * 0.04\n\nvoid main() {\n vec2 uv = uvs;\n uv += T * 0.05;\n vec3 col = texture2D(src, uv).xyz;\n float core = step(0.125, uvs.x);\n gl_FragColor = vec4(col * color, mix(1.0, 0.07, core));\n}"},function(e,t){e.exports="varying vec2 uvs;\nuniform sampler2D src;\nuniform vec3 color;\nuniform float time;\n\n#define T time * 0.03\n\nvoid main() {\n vec3 col = texture2D(src, uvs * vec2(1.0, 0.7) + vec2(T * 0.01, T * 0.05)).xyz;\n gl_FragColor = vec4(col * color, 0.4 * uvs.y);\n}\n"},function(e,t){e.exports=function(e){if(e.converted)return e;e.map&&(e=e.map),e.version=e.versions[0].hash,e.directDownload=e.versions[0].downloadURL,e.coverURL=e.versions[0].coverURL.replace(/^https?:\/\/[^/]+\//,"https://eu.cdn.beatsaver.com/");let t=e.versions[0].diffs;e.metadata.characteristics={};for(const n of t)void 0===e.metadata.characteristics[n.characteristic]&&(e.metadata.characteristics[n.characteristic]={}),e.metadata.characteristics[n.characteristic][n.difficulty]=n;return e.metadata.characteristics=JSON.stringify(e.metadata.characteristics),e.converted=!0,e}},,,,,,,,,,,,function(e,t,n){function r(e){e.keys().forEach(e)}console.time=()=>{},console.timeEnd=()=>{},n(42),n(43),n(44),n(45),n(46),n(47),n(49),n(50),AFRAME.log=()=>{},n(52),n(54),n(55),n(56),n(57),n(58),r(n(59)),r(n(197)),n(201),n(208),e.hot.accept(),"http:"!==window.location.protocol||window.location.host.startsWith("localhost")||window.location.replace("https:"+location.href.substring(location.protocol.length))},function(e,t){THREE.BufferGeometryUtils={computeTangents:function(e){var t=e.index,n=e.attributes;if(null!==t&&void 0!==n.position&&void 0!==n.normal&&void 0!==n.uv){var r=t.array,i=n.position.array,o=n.normal.array,a=n.uv.array,s=i.length/3;void 0===n.tangent&&e.addAttribute("tangent",new THREE.BufferAttribute(new Float32Array(4*s),4));for(var c=n.tangent.array,l=[],u=[],h=0;h<s;h++)l[h]=new THREE.Vector3,u[h]=new THREE.Vector3;var d=new THREE.Vector3,p=new THREE.Vector3,f=new THREE.Vector3,m=new THREE.Vector2,g=new THREE.Vector2,y=new THREE.Vector2,v=new THREE.Vector3,b=new THREE.Vector3,_=e.groups;0===_.length&&(_=[{start:0,count:r.length}]);for(var w=0,E=_.length;w<E;++w)for(var A=O=(P=_[w]).start,x=O+P.count;A<x;A+=3)N(r[A+0],r[A+1],r[A+2]);var S,T,M,R=new THREE.Vector3,C=new THREE.Vector3,k=new THREE.Vector3,I=new THREE.Vector3;for(w=0,E=_.length;w<E;++w){var P,O;for(A=O=(P=_[w]).start,x=O+P.count;A<x;A+=3)D(r[A+0]),D(r[A+1]),D(r[A+2])}}else console.warn("THREE.BufferGeometry: Missing required attributes (index, position, normal or uv) in BufferGeometry.computeTangents()");function N(e,t,n){d.fromArray(i,3*e),p.fromArray(i,3*t),f.fromArray(i,3*n),m.fromArray(a,2*e),g.fromArray(a,2*t),y.fromArray(a,2*n);var r=p.x-d.x,o=f.x-d.x,s=p.y-d.y,c=f.y-d.y,h=p.z-d.z,_=f.z-d.z,w=g.x-m.x,E=y.x-m.x,A=g.y-m.y,x=y.y-m.y,S=1/(w*x-E*A);v.set((x*r-A*o)*S,(x*s-A*c)*S,(x*h-A*_)*S),b.set((w*o-E*r)*S,(w*c-E*s)*S,(w*_-E*h)*S),l[e].add(v),l[t].add(v),l[n].add(v),u[e].add(b),u[t].add(b),u[n].add(b)}function D(e){k.fromArray(o,3*e),I.copy(k),T=l[e],R.copy(T),R.sub(k.multiplyScalar(k.dot(T))).normalize(),C.crossVectors(I,T),M=C.dot(u[e]),S=M<0?-1:1,c[4*e]=R.x,c[4*e+1]=R.y,c[4*e+2]=R.z,c[4*e+3]=S}},mergeBufferGeometries:function(e,t){for(var n=null!==e[0].index,r=new Set(Object.keys(e[0].attributes)),i=new Set(Object.keys(e[0].morphAttributes)),o={},a={},s=new THREE.BufferGeometry,c=0,l=0;l<e.length;++l){var u=e[l];if(n!==(null!==u.index))return null;for(var h in u.attributes){if(!r.has(h))return null;void 0===o[h]&&(o[h]=[]),o[h].push(u.attributes[h])}for(var h in u.morphAttributes){if(!i.has(h))return null;void 0===a[h]&&(a[h]=[]),a[h].push(u.morphAttributes[h])}if(s.userData.mergedUserData=s.userData.mergedUserData||[],s.userData.mergedUserData.push(u.userData),t){var d;if(n)d=u.index.count;else{if(void 0===u.attributes.position)return null;d=u.attributes.position.count}s.addGroup(c,d,l),c+=d}}if(n){var p=0,f=[];for(l=0;l<e.length;++l){var m=e[l].index;if(p>0){m=m.clone();for(var g=0;g<m.count;++g)m.setX(g,m.getX(g)+p)}f.push(m),p+=e[l].attributes.position.count}var y=this.mergeBufferAttributes(f);if(!y)return null;s.index=y}for(var h in o){var v=this.mergeBufferAttributes(o[h]);if(!v)return null;s.addAttribute(h,v)}for(var h in a){var b=a[h][0].length;if(0===b)break;s.morphAttributes=s.morphAttributes||{},s.morphAttributes[h]=[];for(l=0;l<b;++l){var _=[];for(g=0;g<a[h].length;++g)_.push(a[h][g][l]);var w=this.mergeBufferAttributes(_);if(!w)return null;s.morphAttributes[h].push(w)}}return s},mergeBufferAttributes:function(e){for(var t,n,r,i=0,o=0;o<e.length;++o){var a=e[o];if(a.isInterleavedBufferAttribute)return null;if(void 0===t&&(t=a.array.constructor),t!==a.array.constructor)return null;if(void 0===n&&(n=a.itemSize),n!==a.itemSize)return null;if(void 0===r&&(r=a.normalized),r!==a.normalized)return null;i+=a.array.length}for(var s=new t(i),c=0,l=0;l<e.length;++l)s.set(e[l].array,c),c+=e[l].array.length;return new THREE.BufferAttribute(s,n,r)},toTrianglesDrawMode:function(e,t){if(t===THREE.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),e;if(t===THREE.TriangleFanDrawMode||t===THREE.TriangleStripDrawMode){var n=e.getIndex();if(null===n){var r=[],i=e.getAttribute("position");if(void 0===i)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e;for(var o=0;o<i.count;o++)r.push(o);e.setIndex(r),n=e.getIndex()}var a=n.count-2,s=[];if(t===THREE.TriangleFanDrawMode)for(o=1;o<=a;o++)s.push(n.getX(0)),s.push(n.getX(o)),s.push(n.getX(o+1));else for(o=0;o<a;o++)o%2==0?(s.push(n.getX(o)),s.push(n.getX(o+1)),s.push(n.getX(o+2))):(s.push(n.getX(o+2)),s.push(n.getX(o+1)),s.push(n.getX(o)));s.length/3!==a&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");var c=e.clone();return c.setIndex(s),c.clearGroups(),c}return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",t),e}}},function(e,t){if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");const n={childList:!0,attributes:!0,subtree:!0};AFRAME.registerComponent("aabb-collider",{schema:{collideNonVisible:{default:!1},debug:{default:!1},enabled:{default:!0},interval:{default:80},objects:{default:""}},init:function(){this.centerDifferenceVec3=new THREE.Vector3,this.clearedIntersectedEls=[],this.closestIntersectedEl=null,this.boundingBox=new THREE.Box3,this.boxCenter=new THREE.Vector3,this.boxHelper=new THREE.BoxHelper,this.boxMax=new THREE.Vector3,this.boxMin=new THREE.Vector3,this.hitClosestClearEventDetail={},this.hitClosestEventDetail={},this.intersectedEls=[],this.objectEls=[],this.newIntersectedEls=[],this.prevCheckTime=void 0,this.previousIntersectedEls=[],this.setDirty=this.setDirty.bind(this),this.observer=new MutationObserver(this.setDirty),this.dirty=!0,this.hitStartEventDetail={intersectedEls:this.newIntersectedEls}},play:function(){this.observer.observe(this.el.sceneEl,n),this.el.sceneEl.addEventListener("object3dset",this.setDirty),this.el.sceneEl.addEventListener("object3dremove",this.setDirty)},remove:function(){this.observer.disconnect(),this.el.sceneEl.removeEventListener("object3dset",this.setDirty),this.el.sceneEl.removeEventListener("object3dremove",this.setDirty)},tick:function(e){const t=this.boundingBox,n=this.centerDifferenceVec3,r=this.clearedIntersectedEls,i=this.el,o=this.intersectedEls,a=this.newIntersectedEls,s=this.objectEls,c=this.prevCheckTime,l=this.previousIntersectedEls;let u,h,d;if(this.data.enabled&&!(c&&e-c<this.data.interval)){for(this.prevCheckTime=e,this.dirty&&this.refreshObjects(),t.setFromObject(i.object3D),this.boxMin.copy(t.min),this.boxMax.copy(t.max),t.getCenter(this.boxCenter),this.data.debug&&(this.boxHelper.setFromObject(i.object3D),this.boxHelper.parent||i.sceneEl.object3D.add(this.boxHelper)),function(e,t){e.length=0;for(let n=0;n<t.length;n++)e[n]=t[n]}(l,o),o.length=0,d=0;d<s.length;d++)if(s[d]!==this.el)if(this.data.collideNonVisible||s[d].getAttribute("visible"))this.isIntersecting(s[d])&&o.push(s[d]);else if(this.data.debug){const e=s[d].object3D.boxHelper;e&&(i.sceneEl.object3D.remove(e),s[d].object3D.boxHelper=null)}for(a.length=0,d=0;d<o.length;d++)-1===l.indexOf(o[d])&&a.push(o[d]);for(r.length=0,d=0;d<l.length;d++)-1===o.indexOf(l[d])&&(l[d].hasAttribute("aabb-collider")||l[d].emit("hitend"),r.push(l[d]));for(d=0;d<a.length;d++)a[d]!==this.el&&(a[d].hasAttribute("aabb-collider")||a[d].emit("hitstart"));for(d=0;d<o.length;d++)o[d]!==this.el&&(n.copy(o[d].object3D.boundingBoxCenter).sub(this.boxCenter),(void 0===u||n.length()<u)&&(u=n.length(),h=o[d]));!o.length&&this.closestIntersectedEl?(this.hitClosestClearEventDetail.el=this.closestIntersectedEl,this.closestIntersectedEl.emit("hitclosestclear"),this.closestIntersectedEl=null,i.emit("hitclosestclear",this.hitClosestClearEventDetail)):h!==this.closestIntersectedEl&&(this.closestIntersectedEl&&(this.hitClosestClearEventDetail.el=this.closestIntersectedEl,this.closestIntersectedEl.emit("hitclosestclear",this.hitClosestClearEventDetail)),h&&(h.emit("hitclosest"),this.closestIntersectedEl=h,this.hitClosestEventDetail.el=h,i.emit("hitclosest",this.hitClosestEventDetail))),r.length&&i.emit("hitend"),a.length&&i.emit("hitstart",this.hitStartEventDetail)}},isIntersecting:function(){const e=new THREE.Box3;return function(t){let n;t.dataset.aabbColliderDynamic&&(e.setFromObject(t.object3D),n=e,t.object3D.boundingBoxCenter=t.object3D.boundingBoxCenter||new THREE.Vector3,n.getCenter(t.object3D.boundingBoxCenter)),t.dataset.aabbColliderDynamic||(t.object3D.aabbBox||(t.object3D.aabbBox=(new THREE.Box3).setFromObject(t.object3D),t.object3D.boundingBoxCenter=new THREE.Vector3,t.object3D.aabbBox.getCenter(t.object3D.boundingBoxCenter)),n=t.object3D.aabbBox),this.data.debug&&(t.object3D.boxHelper||(t.object3D.boxHelper=new THREE.BoxHelper(t.object3D,new THREE.Color(Math.random(),Math.random(),Math.random())),t.sceneEl.object3D.add(t.object3D.boxHelper)),t.object3D.boxHelper.setFromObject(t.object3D));const r=n.min,i=n.max;return this.boxMin.x<=i.x&&this.boxMax.x>=r.x&&this.boxMin.y<=i.y&&this.boxMax.y>=r.y&&this.boxMin.z<=i.z&&this.boxMax.z>=r.z}}(),setDirty:function(){this.dirty=!0},refreshObjects:function(){const e=this.data;this.objectEls=e.objects?this.el.sceneEl.querySelectorAll(e.objects):this.el.sceneEl.children,this.dirty=!1}})},function(e,t){var n=[new THREE.Vector2,new THREE.Vector2,new THREE.Vector2,new THREE.Vector2];function r(e,t,r,i){const o=1/i,a=1/r;return n[0].set(o*t,a*e+a),n[1].set(o*t,a*e),n[2].set(o*t+o,a*e),n[3].set(o*t+o,a*e+a),n}AFRAME.registerComponent("atlas-uvs",{dependencies:["geometry"],schema:{totalColumns:{type:"int",default:1},totalRows:{type:"int",default:1},column:{type:"int",default:1},row:{type:"int",default:1}},update:function(){const e=this.data,t=r(e.row-1,e.column-1,e.totalRows,e.totalColumns),n=this.el.getObject3D("mesh").geometry;var i=new Float32Array([t[0].x,t[0].y,t[3].x,t[3].y,t[1].x,t[1].y,t[2].x,t[2].y]);n.setAttribute("uv",new THREE.BufferAttribute(i,2)),n.uvsNeedUpdate=!0}}),AFRAME.registerComponent("dynamic-texture-atlas",{schema:{canvasId:{default:"dynamicAtlas"},canvasHeight:{default:1024},canvasWidth:{default:1024},debug:{default:!1},numColumns:{default:8},numRows:{default:8}},multiple:!0,init:function(){const e=this.canvas=document.createElement("canvas");e.id=this.data.canvasId,e.height=this.data.canvasHeight,e.width=this.data.canvasWidth,this.ctx=e.getContext("2d"),document.body.appendChild(e),this.data.debug&&(e.style.left=0,e.style.top=0,e.style.position="fixed",e.style.zIndex=9999999999)},drawTexture:function(e,t,n,i,o){const a=this.canvas,s=this.data;e.complete||(e.onload=()=>{this.drawTexture(e,t,n)});const c=o||a.height/s.numRows,l=i||a.width/s.numColumns;return this.ctx.drawImage(e,l*t,l*n,l,c),r(t,n,s.numRows,s.numColumns)}}),e.exports.getGridUvs=r},function(e,t){if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");var n={};AFRAME.registerComponent("audioanalyser",{schema:{buffer:{default:!1},beatDetectionDecay:{default:.99},beatDetectionMinVolume:{default:15},beatDetectionThrottle:{default:250},cache:{default:!1},enabled:{default:!0},enableBeatDetection:{default:!0},enableLevels:{default:!0},enableWaveform:{default:!0},enableVolume:{default:!0},fftSize:{default:2048},smoothingTimeConstant:{default:.8},src:{parse:function(e){return e.constructor!==String?e:e.startsWith("#")||e.startsWith(".")?document.querySelector(e):e}},unique:{default:!1}},init:function(){this.audioEl=null,this.levels=null,this.waveform=null,this.volume=0,this.xhr=null,this.initContext()},update:function(e){var t=this.analyser,n=this.data;e.fftSize===n.fftSize&&e.smoothingTimeConstant===n.smoothingTimeConstant||(t.fftSize=n.fftSize,t.smoothingTimeConstant=n.smoothingTimeConstant,this.levels=new Uint8Array(t.frequencyBinCount),this.waveform=new Uint8Array(t.fftSize)),n.src&&this.refreshSource()},tick:function(e,t){var n,r=this.data;if(r.enabled){if((r.enableLevels||r.enableVolume)&&this.analyser.getByteFrequencyData(this.levels),r.enableWaveform&&this.analyser.getByteTimeDomainData(this.waveform),r.enableVolume||r.enableBeatDetection){for(var i=0,o=0;o<this.levels.length;o++)i+=this.levels[o];this.volume=i/this.levels.length}r.enableBeatDetection&&(n=this.volume,this.beatCutOff||(this.beatCutOff=n),n>this.beatCutOff&&n>this.data.beatDetectionMinVolume?(this.el.emit("audioanalyserbeat",null,!1),this.beatCutOff=1.5*n,this.beatTime=0):this.beatTime<=this.data.beatDetectionThrottle?this.beatTime+=t:(this.beatCutOff*=this.data.beatDetectionDecay,this.beatCutOff=Math.max(this.beatCutOff,this.data.beatDetectionMinVolume)))}},initContext:function(){var e,t=this.data;this.context=new(window.webkitAudioContext||window.AudioContext),e=this.analyser=this.context.createAnalyser(),(this.gainNode=this.context.createGain()).connect(e),e.connect(this.context.destination),e.fftSize=t.fftSize,e.smoothingTimeConstant=t.smoothingTimeConstant,this.levels=new Uint8Array(e.frequencyBinCount),this.waveform=new Uint8Array(e.fftSize)},refreshSource:function(){this.analyser;var e=this.data;e.buffer&&e.src.constructor===String?this.getBufferSource().then(e=>{this.source=e,this.source.connect(this.gainNode)}):(this.source=this.getMediaSource(),this.source.connect(this.gainNode))},suspendContext:function(){this.context.suspend()},resumeContext:function(){this.context.resume()},fetchAudioBuffer:function(e){return n[e]?n[e].constructor===Promise?n[e]:Promise.resolve(n[e]):(this.data.cache||Object.keys(n).forEach((function(e){delete n[e]})),n[e]=new Promise(t=>{const r=this.xhr=new XMLHttpRequest;r.open("GET",e),r.responseType="arraybuffer",r.addEventListener("load",()=>{function i(r){n[e]=r,t(r)}const o=this.context.decodeAudioData(r.response,i);o&&o.constructor===Promise&&o.then(i).catch(console.error)}),r.send()}),n[e])},getBufferSource:function(){var e=this.data;return this.fetchAudioBuffer(e.src).then(()=>{var t;return(t=this.context.createBufferSource()).buffer=n[e.src],this.el.emit("audioanalyserbuffersource",t,!1),t}).catch(console.error)},getMediaSource:function(){const e={};return function(){const t=this.data.src.constructor===String?this.data.src:this.data.src.src;if(e[t])return e[t];this.data.src.constructor===String?(this.audio=document.createElement("audio"),this.audio.crossOrigin="anonymous",this.audio.setAttribute("src",this.data.src)):this.audio=this.data.src;const n=this.context.createMediaElementSource(this.audio);return e[t]=n,n}}()})},function(e,t){var n=AFRAME.utils.styleParser;if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");AFRAME.registerComponent("event-set",{schema:{default:"",parse:function(e){return n.parse(e)}},multiple:!0,init:function(){this.eventHandler=null,this.eventName=null},update:function(e){this.removeEventListener(),this.updateEventListener(),this.addEventListener()},remove:function(){this.removeEventListener()},pause:function(){this.removeEventListener()},play:function(){this.addEventListener()},updateEventListener:function(){var e,t,n,r=this.data,i=this.el;e=r._event||this.id,t=r._target,n=t?i.sceneEl.querySelector(t):i,this.eventName=e;const o=()=>{var e;for(e in r)"_event"!==e&&"_target"!==e&&AFRAME.utils.entity.setComponentProperty.call(this,n,e,r[e])};isNaN(r._delay)?this.eventHandler=o:this.eventHandler=()=>{setTimeout(o,parseFloat(r._delay))}},addEventListener:function(){this.el.addEventListener(this.eventName,this.eventHandler)},removeEventListener:function(){this.el.removeEventListener(this.eventName,this.eventHandler)}})},function(e,t,n){THREE.BufferGeometryUtils||n(48),AFRAME.registerComponent("geometry-merger",{schema:{preserveOriginal:{default:!1}},init:function(){var e=this;this.geometry=new THREE.Geometry,this.mesh=new THREE.Mesh(this.geometry),this.el.setObject3D("mesh",this.mesh),this.faceIndex={},this.vertexIndex={},this.el.object3D.traverse((function(t){"Mesh"===t.type&&t!==e.mesh&&(e.faceIndex[t.parent.uuid]=[e.geometry.faces.length,e.geometry.faces.length+t.geometry.faces.length-1],e.vertexIndex[t.parent.uuid]=[e.geometry.vertices.length,e.geometry.vertices.length+t.geometry.vertices.length-1],t.parent.updateMatrix(),e.geometry.merge(t.geometry,t.parent.matrix),e.data.preserveOriginal||t.parent.remove(t))}))}}),AFRAME.registerComponent("buffer-geometry-merger",{schema:{preserveOriginal:{default:!1}},init:function(){var e=[];this.el.sceneEl.object3D.updateMatrixWorld(),this.el.object3D.traverse((function(t){"Mesh"===t.type&&t.el!==self.el&&(t.geometry.applyMatrix(t.matrixWorld),e.push(t.geometry.clone()),t.parent.remove(t))}));const t=THREE.BufferGeometryUtils.mergeBufferGeometries(e);this.mesh=new THREE.Mesh(t),this.el.setObject3D("mesh",this.mesh)}})},function(e,t){THREE.BufferGeometryUtils={computeTangents:function(e){var t=e.index,n=e.attributes;if(null!==t&&void 0!==n.position&&void 0!==n.normal&&void 0!==n.uv){var r=t.array,i=n.position.array,o=n.normal.array,a=n.uv.array,s=i.length/3;void 0===n.tangent&&e.addAttribute("tangent",new THREE.BufferAttribute(new Float32Array(4*s),4));for(var c=n.tangent.array,l=[],u=[],h=0;h<s;h++)l[h]=new THREE.Vector3,u[h]=new THREE.Vector3;var d=new THREE.Vector3,p=new THREE.Vector3,f=new THREE.Vector3,m=new THREE.Vector2,g=new THREE.Vector2,y=new THREE.Vector2,v=new THREE.Vector3,b=new THREE.Vector3,_=e.groups;0===_.length&&(_=[{start:0,count:r.length}]);h=0;for(var w=_.length;h<w;++h)for(var E=P=(I=_[h]).start,A=P+I.count;E<A;E+=3)O(r[E+0],r[E+1],r[E+2]);var x,S,T,M=new THREE.Vector3,R=new THREE.Vector3,C=new THREE.Vector3,k=new THREE.Vector3;for(h=0,w=_.length;h<w;++h){var I,P;for(E=P=(I=_[h]).start,A=P+I.count;E<A;E+=3)N(r[E+0]),N(r[E+1]),N(r[E+2])}}else console.warn("THREE.BufferGeometry: Missing required attributes (index, position, normal or uv) in BufferGeometry.computeTangents()");function O(e,t,n){d.fromArray(i,3*e),p.fromArray(i,3*t),f.fromArray(i,3*n),m.fromArray(a,2*e),g.fromArray(a,2*t),y.fromArray(a,2*n);var r=p.x-d.x,o=f.x-d.x,s=p.y-d.y,c=f.y-d.y,h=p.z-d.z,_=f.z-d.z,w=g.x-m.x,E=y.x-m.x,A=g.y-m.y,x=y.y-m.y,S=1/(w*x-E*A);v.set((x*r-A*o)*S,(x*s-A*c)*S,(x*h-A*_)*S),b.set((w*o-E*r)*S,(w*c-E*s)*S,(w*_-E*h)*S),l[e].add(v),l[t].add(v),l[n].add(v),u[e].add(b),u[t].add(b),u[n].add(b)}function N(e){C.fromArray(o,3*e),k.copy(C),S=l[e],M.copy(S),M.sub(C.multiplyScalar(C.dot(S))).normalize(),R.crossVectors(k,S),T=R.dot(u[e]),x=T<0?-1:1,c[4*e]=M.x,c[4*e+1]=M.y,c[4*e+2]=M.z,c[4*e+3]=x}},mergeBufferGeometries:function(e,t){for(var n=null!==e[0].index,r=new Set(Object.keys(e[0].attributes)),i=new Set(Object.keys(e[0].morphAttributes)),o={},a={},s=new THREE.BufferGeometry,c=0,l=0;l<e.length;++l){var u=e[l];if(n!==(null!==u.index))return null;for(var h in u.attributes){if(!r.has(h))return null;void 0===o[h]&&(o[h]=[]),o[h].push(u.attributes[h])}for(var h in u.morphAttributes){if(!i.has(h))return null;void 0===a[h]&&(a[h]=[]),a[h].push(u.morphAttributes[h])}if(s.userData&&(s.userData.mergedUserData=s.userData.mergedUserData||[],s.userData.mergedUserData.push(u.userData)),t){var d;if(n)d=u.index.count;else{if(void 0===u.attributes.position)return null;d=u.attributes.position.count}s.addGroup(c,d,l),c+=d}}if(n){var p=0,f=[];for(l=0;l<e.length;++l){for(var m=e[l].index,g=0;g<m.count;++g)f.push(m.getX(g)+p);p+=e[l].attributes.position.count}s.setIndex(f)}for(var h in o){var y=this.mergeBufferAttributes(o[h]);if(!y)return null;s.addAttribute(h,y)}for(var h in a){var v=a[h][0].length;if(0===v)break;s.morphAttributes=s.morphAttributes||{},s.morphAttributes[h]=[];for(l=0;l<v;++l){var b=[];for(g=0;g<a[h].length;++g)b.push(a[h][g][l]);var _=this.mergeBufferAttributes(b);if(!_)return null;s.morphAttributes[h].push(_)}}return s},mergeBufferAttributes:function(e){for(var t,n,r,i=0,o=0;o<e.length;++o){var a=e[o];if(a.isInterleavedBufferAttribute)return null;if(void 0===t&&(t=a.array.constructor),t!==a.array.constructor)return null;if(void 0===n&&(n=a.itemSize),n!==a.itemSize)return null;if(void 0===r&&(r=a.normalized),r!==a.normalized)return null;i+=a.array.length}var s=new t(i),c=0;for(o=0;o<e.length;++o)s.set(e[o].array,c),c+=e[o].array.length;return new THREE.BufferAttribute(s,n,r)}}},function(e,t){if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");AFRAME.registerComponent("haptics",{schema:{actuatorIndex:{default:0},dur:{default:100},enabled:{default:!0},events:{type:"array"},eventsFrom:{type:"string"},force:{default:1}},multiple:!0,init:function(){this.data;var e=this;this.callPulse=function(){e.pulse()};var t=function(){e.gamepad=e.el.components["tracked-controls"].controller,e.gamepad.gamepad&&(e.gamepad=e.gamepad.gamepad),e.gamepad&&e.gamepad.hapticActuators&&e.gamepad.hapticActuators.length&&e.addEventListeners()};this.el.components["tracked-controls"]&&this.el.components["tracked-controls"].controller?t():this.el.addEventListener("controllerconnected",(function(){t()}))},remove:function(){this.removeEventListeners()},pulse:function(e,t){var n=this.data;n.enabled&&this.gamepad&&this.gamepad.hapticActuators&&this.gamepad.hapticActuators[n.actuatorIndex].pulse(e||n.force,t||n.dur)},addEventListeners:function(){var e,t,n=this.data;for(t=n.eventsFrom?document.querySelector(n.eventsFrom):this.el,e=0;e<n.events.length;e++)t.addEventListener(n.events[e],this.callPulse)},removeEventListeners:function(){var e,t,n=this.data;for(t=n.eventsFrom?document.querySelector(n.eventsFrom):this.el,e=0;e<n.events.length;e++)t.removeEventListener(n.events[e],this.callPulse)}})},function(e,t){var n=[],r=new THREE.Vector3;function i(e,t,i){var o,a,s,c,l,h,d=Math.ceil(t/e.columns);for(a=e.marginColumn,s=e.marginRow,i&&(a=e.margin,s=e.margin),l=u(e.align,d),c=u(e.align,e.columns),h=0;h<d;h++)for(o=0;o<e.columns;o++)r.set(0,0,0),0===e.plane.indexOf("x")&&(r.x=(o-c)*a),0===e.plane.indexOf("y")&&(r.y=(o-c)*a),1===e.plane.indexOf("y")&&(r.y=(h-l)*s),1===e.plane.indexOf("z")&&(r.z=(h-l)*s),f(r);return n}function o(e,t){var i,o;for(i=0;i<t;i++)o=isNaN(e.angle)?i*(2*Math.PI)/t:i*e.angle*.01745329252,r.set(0,0,0),0===e.plane.indexOf("x")&&(r.x=e.radius*Math.cos(o)),0===e.plane.indexOf("y")&&(r.y=e.radius*Math.cos(o)),1===e.plane.indexOf("y")&&(r.y=e.radius*Math.sin(o)),1===e.plane.indexOf("z")&&(r.z=e.radius*Math.sin(o)),f(r);return n}function a(e,t){return e.columns=t,i(e,t,!0)}function s(e,t){return p(1,0,0,0,1,0,0,0,1,-1,0,0,0,-1,0,0,0,-1),h(e.radius/2),n}function c(e,t){var r=(1+Math.sqrt(5))/2,i=1/r,o=2-r,a=-1*i,s=-1*o;return p(-1,o,0,-1,s,0,0,-1,o,0,-1,s,0,1,o,0,1,s,1,o,0,1,s,0,i,i,i,i,i,a,i,a,i,i,a,a,o,0,1,o,0,-1,a,i,i,a,i,a,a,a,i,a,a,a,s,0,1,s,0,-1),h(e.radius/2),n}function l(e,t){var r=Math.sqrt(3),i=-1/Math.sqrt(3);return p(0,0,r+i,-1,0,i,1,0,i,0,2*Math.sqrt(2/3),0),h(e.radius/2),n}function u(e,t){switch(e){case"start":return t-1;case"center":return(t-1)/2;case"end":return 0}}function h(e){var t;for(t=0;t<n.length;t++)n[t]=n[t]*e}function d(e,t,n){var r,i,o;if(n)for(i=0;i<e.length;i++)null!=(r=e[i].getAttribute(n))&&(o=3*parseInt(r,10),e[i].object3D.position.set(t[o],t[o+1],t[o+2]));else for(i=0;i<t.length;i+=3){if(!e[i/3])return;e[i/3].object3D.position.set(t[i],t[i+1],t[i+2])}}function p(){var e;for(e=0;e<arguments.length;e++)n.push(e)}function f(e){n.push(e.x),n.push(e.y),n.push(e.z)}AFRAME.registerComponent("layout",{schema:{angle:{type:"number",default:!1,min:0,max:360,if:{type:["circle"]}},columns:{default:1,min:0,if:{type:["box"]}},margin:{default:1,min:0,if:{type:["box","line"]}},marginColumn:{default:1,min:0,if:{type:["box"]}},marginRow:{default:1,min:0,if:{type:["box"]}},orderAttribute:{default:""},plane:{default:"xy"},radius:{default:1,min:0,if:{type:["circle","cube","dodecahedron","pyramid"]}},reverse:{default:!1},type:{default:"line",oneOf:["box","circle","cube","dodecahedron","line","pyramid"]},fill:{default:!0,if:{type:["circle"]}},align:{default:"end",oneOf:["start","center","end"]}},init:function(){var e=this,t=this.el;this.children=t.getChildEntities(),this.initialPositions=[],this.children.forEach((function(t){if(t.hasLoaded)return n();function n(){e.initialPositions.push(t.object3D.position.x),e.initialPositions.push(t.object3D.position.y),e.initialPositions.push(t.object3D.position.z)}t.addEventListener("loaded",n)})),this.handleChildAttached=this.handleChildAttached.bind(this),this.handleChildDetached=this.handleChildDetached.bind(this),t.addEventListener("child-attached",this.handleChildAttached),t.addEventListener("child-detached",this.handleChildDetached),t.addEventListener("layoutrefresh",this.update.bind(this))},update:function(e){var t,r,u,h=this.children,p=this.data,f=this.el;switch(r=h.length,p.type){case"box":u=i;break;case"circle":u=o;break;case"cube":u=s;break;case"dodecahedron":u=c;break;case"pyramid":u=l;break;default:u=a}t=f.getDOMAttribute("layout"),n.length=0,n=u(p,r,"string"==typeof t?-1!==t.indexOf("margin"):"margin"in t),p.reverse&&n.reverse(),d(h,n,p.orderAttribute)},remove:function(){this.el.removeEventListener("child-attached",this.handleChildAttached),this.el.removeEventListener("child-detached",this.handleChildDetached),d(this.children,this.initialPositions)},handleChildAttached:function(e){var t=this.el;e.detail.el.parentNode===t&&(this.children.push(e.detail.el),this.update())},handleChildDetached:function(e){-1!==this.children.indexOf(e.detail.el)&&(this.children.splice(this.children.indexOf(e.detail.el),1),this.initialPositions.splice(this.children.indexOf(e.detail.el),1),this.update())}}),e.exports.getBoxPositions=i,e.exports.getCirclePositions=o,e.exports.getLinePositions=a,e.exports.getCubePositions=s,e.exports.getDodecahedronPositions=c,e.exports.getPyramidPositions=l},function(e,t){if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");AFRAME.registerPrimitive("a-log",{defaultComponents:{geometry:{primitive:"plane",height:5},log:{},material:{color:"#111",shader:"flat",side:"double"},text:{color:"lightgreen",baseline:"top",align:"center",height:5}},mappings:{channel:"log.channel"}}),AFRAME.registerSystem("log",{schema:{console:{default:!0}},init:function(){var e=this.data,t=this.logs=[],n=this.loggers=[];AFRAME.log=function(r,i){t.push([r,i]),n.forEach((function(e){e.receiveLog(r,i)})),e.console&&console.log("[log:"+(i||"")+"] "+r)}},registerLogger:function(e){this.loggers.push(e),this.logs.forEach((function(t){e.receiveLog.apply(e,t)}))},unregisterLogger:function(e){this.loggers.splice(this.loggers.indexOf(e),1)}}),AFRAME.registerComponent("log",{schema:{channel:{type:"string"},filter:{type:"string"},max:{default:100},showErrors:{default:!0}},init:function(){this.logs=[],this.system.registerLogger(this)},play:function(){var e=this;this.el.sceneEl.addEventListener("log",(function(t){t.detail&&e.receiveLog(t.detail.message,t.detail.channel)})),window.onerror=function(t,n,r,i,o){e.receiveLog("Error: "+t)}},receiveLog:function(e,t){var n=this.data;"string"!=typeof e&&(e=JSON.stringify(e)),n.channel&&t&&n.channel!==t||n.filter&&-1===e.indexOf(n.filter)||(this.logs.push(e),n.max&&this.logs.length>n.max&&this.logs.shift(),this.el.setAttribute("text",{value:this.logs.join("\n")}))},remove:function(){this.el.removeAttribute("text"),this.system.unregisterLogger(this)}})},function(e,t,n){n(53),AFRAME.registerComponent("orbit-controls",{dependencies:["camera"],schema:{autoRotate:{type:"boolean"},autoRotateSpeed:{default:2},dampingFactor:{default:.1},enabled:{default:!0},enableDamping:{default:!0},enableKeys:{default:!0},enablePan:{default:!0},enableRotate:{default:!0},enableZoom:{default:!0},initialPosition:{type:"vec3"},keyPanSpeed:{default:7},minAzimuthAngle:{type:"number",default:1/0},maxAzimuthAngle:{type:"number",default:1/0},maxDistance:{default:1e3},maxPolarAngle:{default:AFRAME.utils.device.isMobile()?90:120},minDistance:{default:1},minPolarAngle:{default:0},minZoom:{default:0},panSpeed:{default:1},rotateSpeed:{default:.05},screenSpacePanning:{default:!1},target:{type:"vec3"},zoomSpeed:{default:.5}},init:function(){var e,t=this.el;this.controls=new THREE.OrbitControls(t.getObject3D("camera"),t.sceneEl.renderer.domElement),e=new THREE.Vector3,t.sceneEl.addEventListener("enter-vr",()=>{(AFRAME.utils.device.checkHeadsetConnected()||AFRAME.utils.device.isMobile())&&(this.controls.enabled=!1,t.hasAttribute("look-controls")&&(t.setAttribute("look-controls","enabled",!0),e.copy(t.getObject3D("camera").position),t.getObject3D("camera").position.set(0,0,0)))}),t.sceneEl.addEventListener("exit-vr",()=>{(AFRAME.utils.device.checkHeadsetConnected()||AFRAME.utils.device.isMobile())&&(this.controls.enabled=!0,t.getObject3D("camera").position.copy(e),t.hasAttribute("look-controls")&&t.setAttribute("look-controls","enabled",!1))}),document.body.style.cursor="grab",document.addEventListener("mousedown",()=>{document.body.style.cursor="grabbing"}),document.addEventListener("mouseup",()=>{document.body.style.cursor="grab"}),this.target=new THREE.Vector3,t.getObject3D("camera").position.copy(this.data.initialPosition)},update:function(e){var t=this.controls,n=this.data;t.target=this.target.copy(n.target),t.autoRotate=n.autoRotate,t.autoRotateSpeed=n.autoRotateSpeed,t.dampingFactor=n.dampingFactor,t.enabled=n.enabled,t.enableDamping=n.enableDamping,t.enableKeys=n.enableKeys,t.enablePan=n.enablePan,t.enableRotate=n.enableRotate,t.enableZoom=n.enableZoom,t.keyPanSpeed=n.keyPanSpeed,t.maxPolarAngle=THREE.Math.degToRad(n.maxPolarAngle),t.maxDistance=n.maxDistance,t.minDistance=n.minDistance,t.minPolarAngle=THREE.Math.degToRad(n.minPolarAngle),t.minZoom=n.minZoom,t.panSpeed=n.panSpeed,t.rotateSpeed=n.rotateSpeed,t.screenSpacePanning=n.screenSpacePanning,t.zoomSpeed=n.zoomSpeed},tick:function(){var e=this.controls;this.data.enabled&&e.enabled&&(e.enableDamping||e.autoRotate)&&this.controls.update()}})},function(e,t){THREE.OrbitControls=function(e,t){var n,r,i,o,a;this.object=e,this.domElement=void 0!==t?t:document,this.enabled=!0,this.target=new THREE.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.25,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={ORBIT:THREE.MOUSE.LEFT,ZOOM:THREE.MOUSE.MIDDLE,PAN:THREE.MOUSE.RIGHT},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return f.phi},this.getAzimuthalAngle=function(){return f.theta},this.saveState=function(){s.target0.copy(s.target),s.position0.copy(s.object.position),s.zoom0=s.object.zoom},this.reset=function(){s.target.copy(s.target0),s.object.position.copy(s.position0),s.object.zoom=s.zoom0,s.object.updateProjectionMatrix(),s.dispatchEvent(c),s.update(),d=h.NONE},this.update=(n=new THREE.Vector3,r=(new THREE.Quaternion).setFromUnitVectors(e.up,new THREE.Vector3(0,1,0)),i=r.clone().inverse(),o=new THREE.Vector3,a=new THREE.Quaternion,function(){var e=s.object.position;return n.copy(e).sub(s.target),n.applyQuaternion(r),f.setFromVector3(n),s.autoRotate&&d===h.NONE&&C(2*Math.PI/60/60*s.autoRotateSpeed),f.theta+=m.theta,f.phi+=m.phi,f.theta=Math.max(s.minAzimuthAngle,Math.min(s.maxAzimuthAngle,f.theta)),f.phi=Math.max(s.minPolarAngle,Math.min(s.maxPolarAngle,f.phi)),f.makeSafe(),f.radius*=g,f.radius=Math.max(s.minDistance,Math.min(s.maxDistance,f.radius)),s.target.add(y),n.setFromSpherical(f),n.applyQuaternion(i),e.copy(s.target).add(n),s.object.lookAt(s.target),!0===s.enableDamping?(m.theta*=1-s.dampingFactor,m.phi*=1-s.dampingFactor):m.set(0,0,0),g=1,y.set(0,0,0),!!(v||o.distanceToSquared(s.object.position)>p||8*(1-a.dot(s.object.quaternion))>p)&&(s.dispatchEvent(c),o.copy(s.object.position),a.copy(s.object.quaternion),v=!1,!0)}),this.dispose=function(){s.domElement.removeEventListener("contextmenu",G,!1),s.domElement.removeEventListener("mousedown",F,!1),s.domElement.removeEventListener("wheel",B,!1),s.domElement.removeEventListener("touchstart",H,!1),s.domElement.removeEventListener("touchend",q,!1),s.domElement.removeEventListener("touchmove",z,!1),document.removeEventListener("mousemove",j,!1),document.removeEventListener("mouseup",U,!1),window.removeEventListener("keydown",V,!1)};var s=this,c={type:"change"},l={type:"start"},u={type:"end"},h={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY:4,TOUCH_PAN:5},d=h.NONE,p=1e-6,f=new THREE.Spherical,m=new THREE.Spherical,g=1,y=new THREE.Vector3,v=!1,b=new THREE.Vector2,_=new THREE.Vector2,w=new THREE.Vector2,E=new THREE.Vector2,A=new THREE.Vector2,x=new THREE.Vector2,S=new THREE.Vector2,T=new THREE.Vector2,M=new THREE.Vector2;function R(){return Math.pow(.95,s.zoomSpeed)}function C(e){m.theta-=e}function k(e){m.phi-=e}var I,P=(I=new THREE.Vector3,function(e,t){I.setFromMatrixColumn(t,0),I.multiplyScalar(-e),y.add(I)}),O=function(){var e=new THREE.Vector3;return function(t,n){e.setFromMatrixColumn(n,1),e.multiplyScalar(t),y.add(e)}}(),N=function(){var e=new THREE.Vector3;return function(t,n){var r=s.domElement===document?s.domElement.body:s.domElement;if(s.object.isPerspectiveCamera){var i=s.object.position;e.copy(i).sub(s.target);var o=e.length();o*=Math.tan(s.object.fov/2*Math.PI/180),P(2*t*o/r.clientHeight,s.object.matrix),O(2*n*o/r.clientHeight,s.object.matrix)}else s.object.isOrthographicCamera?(P(t*(s.object.right-s.object.left)/s.object.zoom/r.clientWidth,s.object.matrix),O(n*(s.object.top-s.object.bottom)/s.object.zoom/r.clientHeight,s.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),s.enablePan=!1)}}();function D(e){s.object.isPerspectiveCamera?g/=e:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom*e)),s.object.updateProjectionMatrix(),v=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function L(e){s.object.isPerspectiveCamera?g*=e:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom/e)),s.object.updateProjectionMatrix(),v=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function F(e){if(!1!==s.enabled){switch(e.preventDefault(),e.button){case s.mouseButtons.ORBIT:if(!1===s.enableRotate)return;!function(e){b.set(e.clientX,e.clientY)}(e),d=h.ROTATE;break;case s.mouseButtons.ZOOM:if(!1===s.enableZoom)return;!function(e){S.set(e.clientX,e.clientY)}(e),d=h.DOLLY;break;case s.mouseButtons.PAN:if(!1===s.enablePan)return;!function(e){E.set(e.clientX,e.clientY)}(e),d=h.PAN}d!==h.NONE&&(document.addEventListener("mousemove",j,!1),document.addEventListener("mouseup",U,!1),s.dispatchEvent(l))}}function j(e){if(!1!==s.enabled)switch(e.preventDefault(),d){case h.ROTATE:if(!1===s.enableRotate)return;!function(e){_.set(e.clientX,e.clientY),w.subVectors(_,b);var t=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*w.x/t.clientWidth*s.rotateSpeed),k(2*Math.PI*w.y/t.clientHeight*s.rotateSpeed),b.copy(_),s.update()}(e);break;case h.DOLLY:if(!1===s.enableZoom)return;!function(e){T.set(e.clientX,e.clientY),M.subVectors(T,S),M.y>0?D(R()):M.y<0&&L(R()),S.copy(T),s.update()}(e);break;case h.PAN:if(!1===s.enablePan)return;!function(e){A.set(e.clientX,e.clientY),x.subVectors(A,E),N(x.x,x.y),E.copy(A),s.update()}(e)}}function U(e){!1!==s.enabled&&(document.removeEventListener("mousemove",j,!1),document.removeEventListener("mouseup",U,!1),s.dispatchEvent(u),d=h.NONE)}function B(e){!1===s.enabled||!1===s.enableZoom||d!==h.NONE&&d!==h.ROTATE||(e.preventDefault(),e.stopPropagation(),s.dispatchEvent(l),function(e){e.deltaY<0?L(R()):e.deltaY>0&&D(R()),s.update()}(e),s.dispatchEvent(u))}function V(e){!1!==s.enabled&&!1!==s.enableKeys&&!1!==s.enablePan&&function(e){switch(e.keyCode){case s.keys.UP:N(0,s.keyPanSpeed),s.update();break;case s.keys.BOTTOM:N(0,-s.keyPanSpeed),s.update();break;case s.keys.LEFT:N(s.keyPanSpeed,0),s.update();break;case s.keys.RIGHT:N(-s.keyPanSpeed,0),s.update()}}(e)}function H(e){if(!1!==s.enabled){switch(e.touches.length){case 1:if(!1===s.enableRotate)return;!function(e){b.set(e.touches[0].pageX,e.touches[0].pageY)}(e),d=h.TOUCH_ROTATE;break;case 2:if(!1===s.enableZoom)return;!function(e){var t=e.touches[0].pageX-e.touches[1].pageX,n=e.touches[0].pageY-e.touches[1].pageY,r=Math.sqrt(t*t+n*n);S.set(0,r)}(e),d=h.TOUCH_DOLLY;break;case 3:if(!1===s.enablePan)return;!function(e){E.set(e.touches[0].pageX,e.touches[0].pageY)}(e),d=h.TOUCH_PAN;break;default:d=h.NONE}d!==h.NONE&&s.dispatchEvent(l)}}function z(e){if(!1!==s.enabled)switch(e.preventDefault(),e.stopPropagation(),e.touches.length){case 1:if(!1===s.enableRotate)return;if(d!==h.TOUCH_ROTATE)return;!function(e){_.set(e.touches[0].pageX,e.touches[0].pageY),w.subVectors(_,b);var t=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*w.x/t.clientWidth*s.rotateSpeed),k(2*Math.PI*w.y/t.clientHeight*s.rotateSpeed),b.copy(_),s.update()}(e);break;case 2:if(!1===s.enableZoom)return;if(d!==h.TOUCH_DOLLY)return;!function(e){var t=e.touches[0].pageX-e.touches[1].pageX,n=e.touches[0].pageY-e.touches[1].pageY,r=Math.sqrt(t*t+n*n);T.set(0,r),M.subVectors(T,S),M.y>0?L(R()):M.y<0&&D(R()),S.copy(T),s.update()}(e);break;case 3:if(!1===s.enablePan)return;if(d!==h.TOUCH_PAN)return;!function(e){A.set(e.touches[0].pageX,e.touches[0].pageY),x.subVectors(A,E),N(x.x,x.y),E.copy(A),s.update()}(e);break;default:d=h.NONE}}function q(e){!1!==s.enabled&&(s.dispatchEvent(u),d=h.NONE)}function G(e){!1!==s.enabled&&e.preventDefault()}s.domElement.addEventListener("contextmenu",G,!1),s.domElement.addEventListener("mousedown",F,!1),s.domElement.addEventListener("wheel",B,!1),s.domElement.addEventListener("touchstart",H,!1),s.domElement.addEventListener("touchend",q,!1),s.domElement.addEventListener("touchmove",z,!1),window.addEventListener("keydown",V,!1),this.update()},THREE.OrbitControls.prototype=Object.create(THREE.EventDispatcher.prototype),THREE.OrbitControls.prototype.constructor=THREE.OrbitControls,Object.defineProperties(THREE.OrbitControls.prototype,{center:{get:function(){return console.warn("THREE.OrbitControls: .center has been renamed to .target"),this.target}},noZoom:{get:function(){return console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),!this.enableZoom},set:function(e){console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),this.enableZoom=!e}},noRotate:{get:function(){return console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),!this.enableRotate},set:function(e){console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),this.enableRotate=!e}},noPan:{get:function(){return console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),!this.enablePan},set:function(e){console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),this.enablePan=!e}},noKeys:{get:function(){return console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),!this.enableKeys},set:function(e){console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),this.enableKeys=!e}},staticMoving:{get:function(){return console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),!this.enableDamping},set:function(e){console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),this.enableDamping=!e}},dynamicDampingFactor:{get:function(){return console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor},set:function(e){console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor=e}}})},function(e,t){AFRAME.registerComponent("proxy-event",{schema:{captureBubbles:{default:!1},enabled:{default:!0},event:{type:"string"},from:{type:"string"},to:{type:"string"},as:{type:"string"},bubbles:{default:!1}},multiple:!0,init:function(){var e,t,n,r=this.data,i=this.el,o=this;if(r.from?e="PARENT"===r.from?[i.parentNode]:document.querySelectorAll(r.from):n="CHILDREN"===r.to?i.querySelectorAll("*"):"SELF"===r.to?[i]:document.querySelectorAll(r.to),r.from)for(t=0;t<e.length;t++)this.addEventListenerFrom(e[t]);else i.addEventListener(r.event,(function(e){var r=o.data;if(r.enabled&&(r.captureBubbles||e.target===i))for(t=0;t<n.length;t++)n[t].emit(r.as||r.event,e.detail?e.detail:null,r.bubbles)}))},addEventListenerFrom:function(e){var t=this.data,n=this;e.addEventListener(t.event,(function(t){var r=n.data;r.enabled&&(r.captureBubbles||t.target===e)&&n.el.emit(r.as||r.event,t.detail?t.detail:null,!1)}))}})},function(e,t){AFRAME.registerSystem("render-order",{schema:{type:"array"},init:function(){this.el.renderer.sortObjects=!0},update:function(){for(this.order={},i=0;i<this.data.length;i++)this.order[this.data[i]]=i}}),AFRAME.registerComponent("render-order",{schema:{type:"string"},multiple:!0,init:function(){this.set=this.set.bind(this),this.el.addEventListener("object3dset",e=>{"nonrecursive"!==this.id&&e.detail.object.traverse(this.set)})},update:function(){"nonrecursive"===this.id?this.set(this.el.object3D):this.el.object3D.traverse(this.set)},set:function(e){isNaN(this.data)?e.renderOrder=this.system.order[this.data]:e.renderOrder=parseFloat(this.data)}}),AFRAME.registerComponent("render-order-recursive",{init:function(){this.el.addEventListener("child-attached",e=>{e.detail.el.setAttribute("render-order",this.el.getAttribute("render-order"))})}})},function(e,t,n){var r;"undefined"!=typeof self&&self,r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){"use strict";var r={};e.exports.select=function(e,t,n){return r[t]||(r[t]=new Function("state","item","return "+c(t)+";")),r[t](e,n)};var i=/\.([A-Za-z][\w_-]*)/g,o=/([=&|!?:+-])(\s*)([\(]?)([A-Za-z][\w_-]*)/g,a=/^([\(]?)([A-Za-z][\w_-]*)/g,s=/state\["item"\]/g;function c(e){return e=(e=(e=(e=e.replace(i,'["$1"]')).replace(a,'$1state["$2"]')).replace(o,'$1$2$3state["$4"]')).replace(s,"item")}function l(){var e=arguments;return function(){var t;for(t=0;t<e.length;t++)e[t].apply(this,arguments)}}e.exports.generateExpression=c,e.exports.clearObject=function(e){for(var t in e)delete e[t]},e.exports.composeHandlers=function(){var e,t,n,r=arguments;for(n={},t=0;t<r.length;t++)for(e in r[t])e in n?n[e].constructor===Array?n[e].push(r[t][e]):n[e]=[n[e],r[t][e]]:n[e]=r[t][e];for(e in n)n[e].constructor===Array&&(n[e]=l.apply(this,n[e]));return n},e.exports.composeFunctions=l;var u=["||","&&","!=","!==","==","===",">","<","<=",">="],h=/\s+/,d=/\(|\)|\!/g;function p(e){return-1===(e=function(e){return 0===e.indexOf("!!")?e.replace("!!",""):0===e.indexOf("!")?e.replace("!",""):e}(e.trim())).indexOf(".")?e:e.substring(0,e.indexOf("."))}e.exports.parseKeysToWatch=function(e,t,n){var r,i;for(i=m(t,h),r=0;r<i.length;r++)if(-1===u.indexOf(i[r])&&!i[r].startsWith("'")&&-1===e.indexOf(i[r])){if(n&&"item"===i[r])continue;e.push(p(i[r]).replace(d,""))}return e};var f={};function m(e,t){return f[t]||(f[t]={}),f[t][e]||(f[t][e]=e.split(t)),f[t][e]}e.exports.split=m,e.exports.copyArray=function(e,t){var n;for(e.length=0,n=0;n<t.length;n++)e[n]=t[n]}},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n(2);var i,o,a=n(3),s=n(0),c=n(4).wrapArray,l={initialState:{},nonBindedStateKeys:[],handlers:{},computeState:function(){}};AFRAME.registerState=function(e){AFRAME.utils.extend(l,e)},AFRAME.registerSystem("state",{init:function(){var e,t=this;for(e in this.arrays=[],this.dirtyArrays=[],this.diff={},this.state=AFRAME.utils.clone(l.initialState),this.subscriptions=[],this.initEventHandlers(),this.state)this.state[e]&&this.state[e].constructor===Array&&(this.arrays.push(e),this.state[e].__dirty=!0,c(this.state[e]));this.lastState=AFRAME.utils.clone(this.state),this.eventDetail={lastState:this.lastState,state:this.state},this.el.addEventListener("loaded",(function(){var e;for(l.computeState(t.state,"@@INIT"),e=0;e<t.subscriptions.length;e++)t.subscriptions[e].onStateUpdate(t.state)}))},dispatch:(o=[],function(e,t){var n,r;for(r in l.handlers[e](this.state,t),l.computeState(this.state,e,t),this.diff)delete this.diff[r];for(a(this.lastState,this.state,this.diff,l.nonBindedStateKeys),this.dirtyArrays.length=0,n=0;n<this.arrays.length;n++)this.state[this.arrays[n]].__dirty&&this.dirtyArrays.push(this.arrays[n]);for(o.length=0,n=0;n<this.subscriptions.length;n++){if("bind-for"===this.subscriptions[n].name){if(!this.state[this.subscriptions[n].keysToWatch[0]].__dirty)continue}else if(!this.shouldUpdate(this.subscriptions[n].keysToWatch,this.diff,this.dirtyArrays))continue;-1===o.indexOf(this.subscriptions[n])&&o.push(this.subscriptions[n])}for(n=0;n<o.length;n++)o[n].onStateUpdate();for(r in this.state)this.state[r]&&this.state[r].constructor===Array&&(this.state[r].__dirty=!1);this.copyState(this.lastState,this.state),this.eventDetail.action=e,this.eventDetail.payload=t,this.el.emit("stateupdate",this.eventDetail)}),copyState:function(e,t,n){var r;for(r in t)if(n||-1===l.nonBindedStateKeys.indexOf(r))if(t[r]&&t[r].constructor===Object){if(!(r in e)){e[r]=AFRAME.utils.clone(t[r]);continue}this.copyState(e[r],t[r],!0)}else e[r]=t[r]},subscribe:function(e){this.subscriptions.push(e)},unsubscribe:function(e){this.subscriptions.splice(this.subscriptions.indexOf(e),1)},shouldUpdate:function(e,t,n){for(var r=0;r<e.length;r++)if(e[r]in t||-1!==n.indexOf(e[r]))return!0;return!1},initEventHandlers:function(){var e,t=[];for(e in n=n.bind(this),l.handlers)-1===t.indexOf(e)&&(t.push(e),n(e));function n(e){var t=this;this.el.addEventListener(e,(function(n){t.dispatch(e,n.detail)}))}},renderTemplate:(i=/{{\s*(\w*\.)?([\w.]+)\s*}}/g,function(e,t,n){var o,a;if(a=e,t)for(;o=i.exec(e);)a=a.replace(o[0],"object"===(void 0===t?"undefined":r(t))?s.select(t,o[2])||"":t);return n?a:document.createRange().createContextualFragment(a)}),select:s.select}),AFRAME.registerComponent("bind",{schema:{default:{},parse:function(e){var t,n,r,i;if(e.constructor===Object)return e;if(-1===e.indexOf(":"))return e;for(t={},r=s.split(e,";"),n=0;n<r.length;n++)t[(i=s.split(r[n].trim(),":"))[0]]=i[1].trim();return t}},multiple:!0,init:function(){var e;this.data,this.keysToWatch=[],this.onStateUpdate=this.onStateUpdate.bind(this),this.system=this.el.sceneEl.systems.state,this.id&&(e=s.split(this.id,"__")[0]),this.isNamespacedBind=this.id&&e in AFRAME.components&&!AFRAME.components[e].isSingleProp||e in AFRAME.systems,this.lastData={},this.updateObj={},this.system.subscribe(this),this.onStateUpdate=this.onStateUpdate.bind(this)},update:function(){var e,t=this.data;if(this.keysToWatch.length=0,"string"==typeof t)s.parseKeysToWatch(this.keysToWatch,t);else for(e in t)s.parseKeysToWatch(this.keysToWatch,t[e]);this.onStateUpdate()},onStateUpdate:function(){var e,t,n,i,o=!1,a=this.el;if(a.parentNode){if(this.isNamespacedBind&&s.clearObject(this.updateObj),n=this.system.state,"object"!==r(this.data)){try{i=s.select(n,this.data)}catch(e){throw new Error("[aframe-state-component] Key '"+this.data+"' not found in state. #"+this.el.getAttribute("id")+"["+this.attrName+"]")}if("object"!==(void 0===i?"undefined":r(i))&&"object"!==r(this.lastData)&&this.lastData===i)return;return AFRAME.utils.entity.setComponentProperty(a,this.id,i),void(this.lastData=i)}for(e in this.data){t=this.data[e].trim();try{i=s.select(n,t)}catch(e){throw console.log(e),new Error("[aframe-state-component] Key '"+t+"' not found in state. #"+this.el.getAttribute("id")+"["+this.attrName+"]")}if("object"===(void 0===i?"undefined":r(i))||"object"===r(this.lastData[e])||this.lastData[e]!==i){if(e in AFRAME.components&&void 0===i)return void a.removeAttribute(e);this.isNamespacedBind?this.updateObj[e]=i:AFRAME.utils.entity.setComponentProperty(a,e,i),this.lastData[e]=i}}for(o in this.updateObj);this.isNamespacedBind&&o&&a.setAttribute(this.id,this.updateObj)}},remove:function(){this.system.unsubscribe(this)}}),AFRAME.registerComponent("bind-toggle",{schema:{type:"string"},multiple:!0,init:function(){this.system=this.el.sceneEl.systems.state,this.keysToWatch=[],this.onStateUpdate=this.onStateUpdate.bind(this),this.system.subscribe(this),this.onStateUpdate()},update:function(){this.keysToWatch.length=0,s.parseKeysToWatch(this.keysToWatch,this.data)},onStateUpdate:function(){var e,t,n=this.el;e=this.system.state;try{t=s.select(e,this.data)}catch(e){throw new Error("[aframe-state-component] Key '"+this.data+"' not found in state. #"+this.el.getAttribute("id")+"["+this.attrName+"]")}t?n.setAttribute(this.id,""):n.removeAttribute(this.id)},remove:function(){this.system.unsubscribe(this)}}),e.exports={composeFunctions:s.composeFunctions,composeHandlers:s.composeHandlers,select:s.select}},function(e,t,n){"use strict";var r,i,o=n(0);AFRAME.registerComponent("bind-for",{schema:{delay:{default:0},for:{type:"string",default:"item"},in:{type:"string"},key:{type:"string"},pool:{default:0},template:{type:"string"},updateInPlace:{default:!1}},init:function(){this.system=this.el.sceneEl.systems.state,this.onStateUpdate=this.onStateUpdate.bind(this),this.keysToWatch=[],this.renderedKeys=[],this.system.subscribe(this),this.el.children[0]&&"TEMPLATE"===this.el.children[0].tagName?this.template=this.el.children[0].innerHTML.trim():this.template=document.querySelector(this.data.template).innerHTML.trim();for(var e=0;e<this.data.pool;e++)this.el.appendChild(this.generateFromTemplate(null,e))},update:function(){this.keysToWatch[0]=o.split(this.data.in,".")[0],this.onStateUpdate()},onStateUpdateNaive:(i=[],function(){var e,t=this.data,n=this.el;try{e=o.select(this.system.state,t.in)}catch(e){throw new Error("[aframe-state-component] Key '"+t.in+"' not found in state. #"+n.getAttribute("id")+"["+this.attrName+"]")}i.length=0;for(var r=0;r<e.length;r++){var a=e[r];i.push(t.key?a[t.key].toString():a.toString())}for(var s=this.getElsToRemove(i,this.renderedKeys),c=0;c<s.length;c++)s[c].parentNode.removeChild(s[c]);e.length&&this.renderItems(e,i,0)}),renderItems:function(e,t,n){var r,i=this,o=this.data,a=this.el,s=e[n],c=o.key?s[o.key].toString():s.toString();if(-1===this.renderedKeys.indexOf(c))r=this.generateFromTemplate(s,n),a.appendChild(r),this.renderedKeys.push(c);else{if(e.length&&e[0].constructor===String){var l=o.key?s[o.key].toString():s.toString();(r=a.querySelector('[data-bind-for-value="'+l+'"]')).setAttribute("data-bind-for-key",n)}else{var u=this.getBindForKey(s,n);r=a.querySelector('[data-bind-for-key="'+u+'"]')}r.emit("bindforupdate",s,!1)}e[n+1]&&(this.data.delay?setTimeout((function(){i.renderItems(e,t,n+1)}),this.data.delay):this.renderItems(e,t,n+1))},onStateUpdateInPlace:function(){var e=[];return function(){var t,n,r=this.data,i=this.el;try{t=o.select(this.system.state,r.in)}catch(e){throw console.log(e),new Error("[aframe-state-component] Key '"+r.in+"' not found in state. #"+i.getAttribute("id")+"["+this.attrName+"]")}e.length=0;for(var a=0;a<t.length;a++){var s=t[a];n=r.key?s[r.key].toString():s.toString(),e.push(n)}for(var c=this.getElsToRemove(e,this.renderedKeys),l=0;l<c.length;l++)c[l].object3D.visible=!1,c[l].setAttribute("data-bind-for-active","false"),c[l].removeAttribute("data-bind-for-key"),c[l].removeAttribute("data-bind-for-value"),c[l].emit("bindfordeactivate",null,!1),c[l].pause();t.length&&this.renderItemsInPlace(t,e,0)}}(),renderItemsInPlace:function(e,t,n){var r,i=this,o=this.data,a=this.el,s=e[n],c=this.getBindForKey(s,n),l=o.key?s[o.key].toString():s.toString();if(-1===this.renderedKeys.indexOf(l)){if(a.querySelector(':scope > [data-bind-for-active="false"]'))(r=a.querySelector('[data-bind-for-active="false"]')).setAttribute("data-bind-for-key",c),r.setAttribute("data-bind-for-value",l),r.object3D.visible=!0,r.play(),r.setAttribute("data-bind-for-active","true"),r.emit("bindforupdateinplace",s,!1);else{var u=this.generateFromTemplate(s,n);u.addEventListener("loaded",(function(){u.emit("bindforupdateinplace",s,!1)})),a.appendChild(u)}this.renderedKeys.push(l)}else-1!==t.indexOf(l)&&(e.length&&e[0].constructor===String?(r=a.querySelector('[data-bind-for-value="'+l+'"]')).setAttribute("data-bind-for-key",n):r=a.querySelector('[data-bind-for-key="'+c+'"]'),r.emit("bindforupdateinplace",s,!1));e[n+1]&&(this.data.delay?setTimeout((function(){i.renderItemsInPlace(e,t,n+1)}),this.data.delay):this.renderItemsInPlace(e,t,n+1))},generateFromTemplate:function(e,t){var n=this.data;this.el.appendChild(this.system.renderTemplate(this.template,e));var r=this.el.children[this.el.children.length-1];if(!e)return r.setAttribute("data-bind-for-key",""),r.setAttribute("data-bind-for-active","false"),r;var i=this.getBindForKey(e,t);return r.setAttribute("data-bind-for-key",i),n.key||r.setAttribute("data-bind-for-value",e),r.setAttribute("data-bind-for-active","true"),r},getElsToRemove:(r=[],function(e,t){var n=this.data,i=this.el;r.length=0;for(var o=0;o<i.children.length;o++)if("TEMPLATE"!==i.children[o].tagName){var a=n.key?i.children[o].getAttribute("data-bind-for-key"):i.children[o].getAttribute("data-bind-for-value");-1===e.indexOf(a)&&-1!==t.indexOf(a)&&(r.push(i.children[o]),t.splice(t.indexOf(a),1))}return r}),getBindForKey:function(e,t){return this.data.key?e[this.data.key].toString():t.toString()},onStateUpdate:function(){this.data.updateInPlace?this.onStateUpdateInPlace():this.onStateUpdateNaive()}}),AFRAME.registerComponent("bind-item",{schema:{type:"string"},multiple:!0,init:function(){this.itemData=null,this.keysToWatch=[],this.prevValues={};var e=this.rootEl=this.el.closest("[data-bind-for-key]");if(!e)throw new Error("bind-item component must be attached to entity under a bind-for item.");e.addEventListener("bindforupdateinplace",this.updateInPlace.bind(this)),e.addEventListener("bindfordeactivate",this.deactivate.bind(this)),this.el.sceneEl.systems.state.subscribe(this)},update:function(){this.parseSelector()},updateInPlace:function(e){var t=this.propertyMap;if("false"!==this.rootEl.getAttribute("data-bind-for-active"))for(var n in e&&(this.itemData=e.detail),t){var r=this.select(this.itemData,t[n]);r!==this.prevValues[n]&&(AFRAME.utils.entity.setComponentProperty(this.el,n,r),this.prevValues[n]=r)}},onStateUpdate:function(){this.updateInPlace()},select:function(e,t){return o.select(this.el.sceneEl.systems.state.state,t,e)},deactivate:function(){this.prevValues={}},parseSelector:function(){var e=this.propertyMap={};this.keysToWatch.length=0;var t=o.split(this.id,"__")[0];if(!(t in AFRAME.components)||AFRAME.components[t].isSingleProp)e[this.id]=this.data,o.parseKeysToWatch(this.keysToWatch,this.data,!0);else for(var n=o.split(this.data,";"),r=0;r<n.length;r++){var i=o.split(n[r],":");e[this.id+"."+i[0].trim()]=i[1].trim(),o.parseKeysToWatch(this.keysToWatch,i[1].trim(),!0)}}})},function(e,t,n){"use strict";var r;e.exports=(r=[],function(e,t,n,i){var o,a,s,c,l,u,h;for(l in c=n||{},r.length=0,e)r.push(l);if(!t)return c;for(s in t)-1===r.indexOf(s)&&r.push(s);for(u=0;u<r.length;u++)l=r[u],i&&-1!==i.indexOf(l)||(o=e[l],a=t[l],((h=o&&a&&o.constructor===Object&&a.constructor===Object)&&!AFRAME.utils.deepEqual(o,a)||!h&&o!==a)&&(c[l]=a));return c})},function(e,t,n){"use strict";var r=["push","pop","shift","unshift","splice"];function i(e,t){var n=e[t];e[t]=function(){n.apply(e,arguments),e.__dirty=!0}}e.exports.wrapArray=function(e){var t;if(!e.__wrapped){for(t=0;t<r.length;t++)i(e,r[t]);e.__wrapped=!0}}}])},e.exports=r()},function(e,t){if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");AFRAME.registerComponent("slice9",{schema:{width:{default:1,min:0},height:{default:1,min:0},left:{default:0,min:0},right:{default:0,min:0},bottom:{default:0,min:0},top:{default:0,min:0},side:{default:"front",oneOf:["front","back","double"]},padding:{default:.1,min:.01},color:{type:"color",default:"#fff"},opacity:{default:1,min:0,max:1},transparent:{default:!0},debug:{default:!1},src:{type:"map"}},multiple:!1,init:function(){var e=this.data,t=this.material=new THREE.MeshBasicMaterial({color:e.color,opacity:e.opacity,transparent:e.transparent,wireframe:e.debug}),n=this.geometry=new THREE.PlaneBufferGeometry(e.width,e.height,3,3);new THREE.TextureLoader;this.plane=new THREE.Mesh(n,t),this.el.setObject3D("mesh",this.plane),this.textureSrc=null},updateMap:function(){var e=this.data.src;if(e){if(e===this.textureSrc)return;return this.textureSrc=e,void this.el.sceneEl.systems.material.loadTexture(e,{src:e},t.bind(this))}function t(e){this.material.map=e,this.material.needsUpdate=!0,this.regenerateMesh()}this.material.map&&t(null)},regenerateMesh:function(){var e=this.data,t=this.geometry.attributes.position.array,n=this.geometry.attributes.uv.array,r=this.material.map.image;if(r){var i={left:e.left/r.width,right:e.right/r.width,top:e.top/r.height,bottom:e.bottom/r.height};d(1,i.left,1),d(2,i.right,1),d(4,0,i.bottom),d(5,i.left,i.bottom),d(6,i.right,i.bottom),d(7,1,i.bottom),d(8,0,i.top),d(9,i.left,i.top),d(10,i.right,i.top),d(11,1,i.top),d(13,i.left,0),d(14,i.right,0);var o=e.width/2,a=e.height/2,s=-o+e.padding,c=o-e.padding,l=a-e.padding,u=-a+e.padding;h(0,-o,a),h(1,s,a),h(2,c,a),h(3,o,a),h(4,-o,l),h(5,s,l),h(6,c,l),h(7,o,l),h(8,-o,u),h(9,s,u),h(10,c,u),h(11,o,u),h(13,s,-a),h(14,c,-a),h(12,-o,-a),h(15,o,-a),this.geometry.attributes.position.needsUpdate=!0,this.geometry.attributes.uv.needsUpdate=!0}function h(e,n,r){t[3*e]=n,t[3*e+1]=r}function d(e,t,r){n[2*e]=t,n[2*e+1]=r}},update:function(e){var t=this.data;this.material.color.setStyle(t.color),this.material.opacity=t.opacity,this.material.transparent=t.transparent,this.material.wireframe=t.debug,this.material.side=function(e){switch(e){case"back":return THREE.BackSide;case"double":return THREE.DoubleSide;default:return THREE.FrontSide}}(t.side);var n=AFRAME.utils.diff(t,e);"src"in n?this.updateMap():("width"in n||"height"in n||"padding"in n||"left"in n||"top"in n||"bottom"in n||"right"in n)&&this.regenerateMesh()},remove:function(){},pause:function(){},play:function(){}})},function(e,t){var n=[0,90,180,270],r=["right","up","left","down"],i={NULL:{START:"thumbstart",END:"thumbend"}};r.forEach(e=>{i[e]={},i[e].START="thumb"+e+"start",i[e].END="thumb"+e+"end"});AFRAME.registerComponent("thumb-controls",{schema:{thresholdAngle:{default:89.5},thresholdPad:{default:.05},thresholdStick:{default:.75}},init:function(){var e=this.el;this.onTrackpadDown=this.onTrackpadDown.bind(this),this.onTrackpadUp=this.onTrackpadUp.bind(this),this.directionStick="",this.directionTrackpad="",e.components["tracked-controls"]&&(this.axis=e.components["tracked-controls"].axis),this.type="STICK",e.addEventListener("controllerconnected",t=>{this.axis=e.components["tracked-controls"].axis,"oculus-touch-controls"!==t.detail.name&&"windows-motion-controls"!==t.detail.name?this.type="PAD":this.type="STICK"})},play:function(){var e=this.el;e.addEventListener("trackpaddown",this.onTrackpadDown),e.addEventListener("trackpadup",this.onTrackpadUp),e.addEventListener("touchpaddown",this.onTrackpadDown),e.addEventListener("touchpadup",this.onTrackpadUp)},pause:function(){var e=this.el;e.removeEventListener("trackpaddown",this.onTrackpadDown),e.removeEventListener("trackpadup",this.onTrackpadUp),e.removeEventListener("touchpaddown",this.onTrackpadDown),e.removeEventListener("touchpadup",this.onTrackpadUp)},onTrackpadDown:function(){var e,t=this.el;this.getDistance()<this.data.thresholdPad||(e=this.getDirection())&&(this.directionTrackpad=e,t.emit(i.NULL.START,null,!1),t.emit(i[this.directionTrackpad].START,null,!1))},onTrackpadUp:function(){var e=this.el;this.directionTrackpad&&(e.emit(i.NULL.END,null,!1),e.emit(i[this.directionTrackpad].END,null,!1),this.directionTrackpad="")},tick:function(){var e,t=this.el;if("PAD"!==this.type){if(!this.directionStick&&this.getDistance()>this.data.thresholdStick){if(!(e=this.getDirection()))return;return this.directionStick=e,t.emit(i.NULL.START,null,!1),void t.emit(i[this.directionStick].START,null,!1)}this.directionStick&&this.getDistance()<this.data.thresholdStick&&(t.emit(i.NULL.END,null,!1),t.emit(i[this.directionStick].END,null,!1),this.directionStick="")}},getDistance:function(){var e=this.axis;return this.axis?"PAD"===this.type?Math.sqrt(e[1]*e[1]+e[0]*e[0]):Math.sqrt(e[3]*e[3]+e[2]*e[2]):0},getDirection:function(){var e,t,i,o,a;for(e=this.getAngle(),o=this.data.thresholdAngle/2,i=0;i<n.length;i++){if((a=n[i]+o)>360&&(a-=360),(t=n[i]-o)<0&&(e>=360+t&&e<=360||e>=0&&e<=a))return r[i];if(e>=t&&e<=a)return r[i]}},getAngle:function(){var e,t=this.axis;return this.axis?((e="PAD"===this.type?Math.atan2(-t[1],t[0]):Math.atan2(-t[3],t[2]))<0&&(e=2*Math.PI+e),THREE.Math.radToDeg(e)):0}}),AFRAME.registerComponent("thumb-controls-debug",{dependencies:["thumb-controls"],schema:{controllerType:{type:"string"},hand:{type:"string"},enabled:{default:!1}},init:function(){var e,t,n,r,i=this.el;if(this.data.enabled||AFRAME.utils.getUrlParameter("debug-thumb")){console.log("%c debug-thumb","background: #111; color: red");var o=function(){i.components["tracked-controls"].handleAxes=()=>{},n={axis:t=[0,0,0]},i.components["tracked-controls"].axis=t,i.components["thumb-controls"].axis=t};i.components["tracked-controls"]?o():this.el.addEventListener("controllerconnected",(function(){o()})),(r=this.createCanvas()).addEventListener("click",r=>{"vive-controls"===this.data.controllerType?e?i.emit("trackpadup"):i.emit("trackpaddown"):e&&(t[0]=0,t[1]=0,i.emit("axismove",n,!1)),e=!e}),r.addEventListener("mousemove",o=>{var a;e&&(a=r.getBoundingClientRect(),t[0]=(o.clientX-a.left)/240*2-1,t[1]=(o.clientY-a.top)/240*2-1,i.emit("axismove",n,!1))}),r.addEventListener("mouseleave",r=>{e&&(t[0]=0,t[1]=0,i.emit("axismove",n,!1))})}},createCanvas:function(){var e,t;return(e=document.createElement("canvas")).classList.add("debugThumb"),e.height=240,e.width=240,e.style.bottom=0,e.style.borderRadius="250px",e.style.opacity=.5,e.style.position="fixed",e.style.zIndex=999999999,"left"===this.data.hand?e.style.left=0:e.style.right=0,(t=e.getContext("2d")).fillStyle="#333",t.fillRect(0,0,240,240),document.body.appendChild(e),e}})},function(e,t,n){var r={"./active-item.js":60,"./agent-dance.js":61,"./agent-picker.js":62,"./beat-cut-fx.js":63,"./beat-generator.js":16,"./beat-hit-sound.js":64,"./beat.js":24,"./blade.js":65,"./check-vr.js":66,"./console-shortcuts.js":67,"./controller.js":68,"./copy-texture.js":69,"./cursor-laser.js":70,"./cursor-mesh.js":71,"./curve-follow-rig-reset.js":72,"./cutfx-shader.js":73,"./debug-beat-generator.js":76,"./debug-beat-positioning.js":77,"./debug-controller.js":78,"./debug-cursor.js":79,"./debug-intro.js":80,"./debug-song-time.js":81,"./debug-state.js":82,"./delayed-proxy-event.js":83,"./desktop-input.js":84,"./difficulty-background.js":85,"./difficulty-filter.js":86,"./difficulty-text.js":87,"./follow-position.js":88,"./follow-z.js":89,"./gameover.js":90,"./gpu-preloader.js":91,"./gradient-shader.js":92,"./hand-swapper.js":94,"./handstar-shader.js":95,"./haptics-wall.js":98,"./haptics-weapon.js":99,"./headfist.js":100,"./history.js":101,"./intro-song.js":102,"./keyboard-raycastable.js":103,"./leaderboard.js":104,"./materials.js":110,"./menu-controls.js":125,"./menu-difficulty-select.js":126,"./menu-genre.js":127,"./menu-midsection.js":128,"./menu-mode.js":129,"./menu-playlist-button.js":130,"./menu-playlist.js":131,"./menu-selected-challenge-image.js":132,"./menu-slide-animation.js":133,"./multiplayer.js":134,"./multiplier-ring.js":138,"./no-frustum-cull.js":139,"./panel-shader.js":140,"./pause.js":143,"./pauser.js":144,"./play-sound.js":145,"./player-height.js":147,"./plume.js":148,"./punch.js":149,"./raycaster-target.js":150,"./recenter.js":151,"./ring.js":152,"./score-texts.js":155,"./search-thumbnail-atlas.js":156,"./search.js":157,"./song-info-positioner.js":160,"./song-preview.js":161,"./song-progress-info.js":162,"./song.js":163,"./stage-colors.js":164,"./stage-lasers.js":165,"./stars.js":166,"./stats-param.js":167,"./stepback.js":168,"./sub-object.js":169,"./super-keyboard.js":170,"./supercurve-color.js":171,"./supercurve-shader.js":172,"./supercurve.js":175,"./supercutfx-shader.js":178,"./supercutfx.js":179,"./tail.js":180,"./text-counter.js":181,"./text-geometry.js":241,"./text-truncate.js":182,"./text-uppercase.js":183,"./toggle-pause-play.js":184,"./trail.js":185,"./tunnels.js":186,"./vertex-colors-buffer.js":187,"./victory-accuracy-ring.js":188,"./victory-rank.js":189,"./visible-raycastable.js":190,"./wall-shader.js":191,"./wall.js":194,"./weapon-particles.js":195,"./zip-loader.js":196};function i(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=59},function(e,t,n){if(AFRAME.registerComponent("active-item",{dependencies:["material"],schema:{active:{default:!1},opacity:{default:1}},init:function(){this.defaultOpacity=this.el.getAttribute("material").opacity,this.materialObj={opacity:this.data.opacity}},update:function(){var e=this.el;this.data.active?(e.setAttribute("material",this.materialObj),e.object3D.visible=!0):(e.setAttribute("material","opacity",this.defaultOpacity),e.components.animation__mouseleave&&setTimeout(()=>{e.emit("mouseleave",null,!1)}))}}),AFRAME.registerComponent("active-text-color",{dependencies:["text"],schema:{active:{default:!1},color:{default:"#333"}},init:function(){this.defaultColor=this.el.getAttribute("text").color},update:function(){var e=this.el;this.data.active?e.setAttribute("text","color",this.data.color):e.setAttribute("text","color",this.defaultColor)}}),window.AFRAME){const t=["active-item","active-text-color"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r=["dance","rumba","capoeira","thriller","wave","celebrate","taunt","silly","jump","pray","reaction","sitclap","sitlaugh","kiss","angry","defeated","falling","dying","idle"];if(AFRAME.registerComponent("agent-dance",{schema:{base:{default:"assets/clips/"},initial:{default:"dance"}},init:function(){this.clips={},this.currentAction=null;const e=this.el,t=()=>{const t=e.getObject3D("mesh");t&&(this.mixer=new THREE.AnimationMixer(t),this.play(this.data.initial),this.buildUI())};e.getObject3D("mesh")?t():e.addEventListener("model-loaded",t),this.onKeyDown=e=>{if("INPUT"===e.target.tagName||"TEXTAREA"===e.target.tagName)return;const t="1234567890".indexOf(e.key);t>=0&&r[t]&&(this.play(r[t]),this.ui&&(this.ui.value=r[t]))},window.addEventListener("keydown",this.onKeyDown)},remove:function(){window.removeEventListener("keydown",this.onKeyDown),this.ui&&this.ui.remove()},play:function(e){if(!this.mixer)return;const t=e=>{const t=this.mixer.clipAction(e);t.reset().play(),this.currentAction&&this.currentAction!==t&&this.currentAction.crossFadeTo(t,.3,!1),this.currentAction=t};this.clips[e]?t(this.clips[e]):fetch(this.data.base+e+".json").then(e=>e.ok?e.json():null).then(n=>{if(!n)return;const r=THREE.AnimationClip.parse(n);this.clips[e]=r,t(r)}).catch(()=>{})},buildUI:function(){const e=document.createElement("select");e.style.cssText="position:fixed;top:10px;left:10px;z-index:9999998;background:rgba(0,0,0,0.7);color:#fff;font-family:monospace;padding:6px;border:1px solid #444;border-radius:4px;",e.title="Agent animation (1-0 keys also work)",r.forEach((t,n)=>{const r=document.createElement("option");r.value=t;const i=n<10?`[${(n+1)%10}] `:"";r.textContent=i+t,t===this.data.initial&&(r.selected=!0),e.appendChild(r)}),e.addEventListener("change",()=>this.play(e.value)),document.body.appendChild(e),this.ui=e},tick:function(e,t){this.mixer&&this.mixer.update(t/1e3)}}),window.AFRAME){const t=["agent-dance"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r=[{id:"cz",name:"CZ",url:"assets/avatars/cz.glb"}];function i(e){return String(e).replace(/[&<>"']/g,e=>({"&":"&","<":"<",">":">",'"':""","'":"'"}[e]))}function o(e){return"three.ws"===window.location.hostname?e:e.replace(/^https:\/\/pub-2534e921bf9c4314addcd4d8a6e98b7b\.r2\.dev/,"/r2-proxy")}if(AFRAME.registerSystem("agent-picker",{init:function(){this.agents=r.slice(),this.currentId=null,this.companionEl=null,this.searchQuery="";const e=()=>{this.companionEl=document.querySelector("#agentCompanion"),this.companionEl&&(this.buildOverlay(),this.applyInitialSelection(),this.wireSceneEvents(),this.wirePostMessage(),this.fetchPublicAvatars())};this.sceneEl.hasLoaded?e():this.sceneEl.addEventListener("loaded",e)},fetchPublicAvatars:function(e=""){const t=new URL("https://three.ws/api/explore");t.searchParams.set("only3d","1"),t.searchParams.set("limit","40"),e&&t.searchParams.set("q",e),fetch(t.toString()).then(e=>e.ok?e.json():null).then(e=>{if(!e||!Array.isArray(e.items))return;const t=e.items.filter(e=>e.glbUrl).map(e=>({id:`${e.kind}-${e.agentId||e.name}-${e.sortDate}`,name:e.name||"Untitled",url:o(e.glbUrl),owner:e.ownerShort||""}));this.agents=r.concat(t),this.renderList()}).catch(()=>{})},buildOverlay:function(){if(document.getElementById("agentPicker"))return;const e=document.createElement("div");e.id="agentPicker",e.innerHTML='\n <style>\n #agentPicker {\n position: fixed; top: 12px; right: 12px; z-index: 9999;\n font-family: system-ui, sans-serif; user-select: none;\n transition: opacity 0.3s;\n }\n #agentPicker.playing { opacity: 0; pointer-events: none; }\n #agentPicker .ap-toggle {\n background: rgba(8, 10, 24, 0.85); color: #cfd6ff;\n border: 1px solid rgba(120, 140, 255, 0.4); border-radius: 8px;\n padding: 8px 14px; font-size: 12px; letter-spacing: 0.08em;\n cursor: pointer; backdrop-filter: blur(6px);\n }\n #agentPicker .ap-toggle:hover { background: rgba(40, 50, 100, 0.9); }\n #agentPicker .ap-panel {\n margin-top: 8px; background: rgba(8, 10, 24, 0.92);\n border: 1px solid rgba(120, 140, 255, 0.3); border-radius: 8px;\n padding: 8px; width: 260px; display: none;\n backdrop-filter: blur(6px);\n }\n #agentPicker.open .ap-panel { display: block; }\n #agentPicker .ap-search {\n width: 100%; box-sizing: border-box; background: rgba(0,0,0,0.4);\n color: #cfd6ff; border: 1px solid rgba(120, 140, 255, 0.3);\n border-radius: 6px; padding: 6px 8px; font-size: 12px;\n margin-bottom: 6px; outline: none;\n }\n #agentPicker .ap-list { max-height: 320px; overflow-y: auto; }\n #agentPicker .ap-item {\n display: flex; align-items: center; gap: 10px;\n padding: 8px 10px; border-radius: 6px; cursor: pointer;\n color: #cfd6ff; font-size: 13px;\n }\n #agentPicker .ap-item:hover { background: rgba(80, 100, 200, 0.25); }\n #agentPicker .ap-item.active { background: rgba(80, 100, 200, 0.4); }\n #agentPicker .ap-dot {\n width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;\n background: linear-gradient(135deg, #6699ff, #ff4488);\n }\n #agentPicker .ap-name {\n flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;\n }\n #agentPicker .ap-owner { color: #6677aa; font-size: 10px; }\n #agentPicker .ap-empty { padding: 10px; color: #6677aa; font-size: 12px; text-align: center; }\n </style>\n <button class="ap-toggle" type="button">AGENT</button>\n <div class="ap-panel">\n <input class="ap-search" type="text" placeholder="Search avatars on three.ws..." />\n <div class="ap-list"></div>\n </div>\n ',document.body.appendChild(e);const t=e.querySelector(".ap-toggle"),n=e.querySelector(".ap-search");let r;t.addEventListener("click",()=>e.classList.toggle("open")),n.addEventListener("input",()=>{clearTimeout(r),this.searchQuery=n.value.trim(),r=setTimeout(()=>this.fetchPublicAvatars(this.searchQuery),300)}),this.overlayEl=e,this.listEl=e.querySelector(".ap-list")},renderList:function(){this.listEl&&(this.listEl.innerHTML="",this.agents.length?this.agents.forEach(e=>{const t=document.createElement("div");t.className="ap-item"+(e.id===this.currentId?" active":""),t.dataset.id=e.id,t.innerHTML=`\n <span class="ap-dot"></span>\n <span class="ap-name">${i(e.name)}</span>\n ${e.owner?`<span class="ap-owner">${i(e.owner)}</span>`:""}\n `,t.addEventListener("click",()=>{this.selectAgent(e.id),this.overlayEl.classList.remove("open")}),this.listEl.appendChild(t)}):this.listEl.innerHTML='<div class="ap-empty">No avatars found.</div>')},applyInitialSelection:function(){const e=new URLSearchParams(window.location.search).get("agent");e&&this.agents.some(t=>t.id===e)?this.selectAgent(e):this.selectAgent(this.agents[0].id),this.renderList()},selectAgent:function(e){let t;"string"==typeof e?t=this.agents.find(t=>t.id===e):e&&e.url&&(t=e,this.agents.some(e=>e.id===t.id)||this.agents.push(t)),t&&this.companionEl&&(this.currentId=t.id,this.companionEl.setAttribute("gltf-model",t.url),this.renderList(),this.sceneEl.emit("agentchanged",{agentId:t.id,url:t.url}))},wireSceneEvents:function(){const e=()=>this.overlayEl&&this.overlayEl.classList.remove("playing");this.sceneEl.addEventListener("songstartfade",()=>this.overlayEl&&this.overlayEl.classList.add("playing")),this.sceneEl.addEventListener("cleargame",e),this.sceneEl.addEventListener("gameover",e),this.sceneEl.addEventListener("songcomplete",e)},wirePostMessage:function(){window.addEventListener("message",e=>{const t=e.data;t&&"rider:setAgent"===t.type&&(t.url?this.selectAgent({id:t.agentId||"external-"+Date.now(),name:t.name||"Agent",url:t.url}):t.agentId&&this.selectAgent(t.agentId))})}}),window.AFRAME){const t=[],n=[],r=["agent-picker"];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r=new THREE.Vector3,i={right:0,upright:45,up:90,upleft:135,left:180,downleft:225,down:270,downright:315},o={right:new THREE.Vector2(0,1),upright:new THREE.Vector2(-.5,.5),up:new THREE.Vector2(-1,0),upleft:new THREE.Vector2(-.5,-.5),left:new THREE.Vector2(0,-1),downleft:new THREE.Vector2(.5,-.5),down:new THREE.Vector2(1,0),downright:new THREE.Vector2(.5,.5)};function a(e,t){e.x+=(Math.random()-.5)*t,e.y+=(Math.random()-.5)*t,e.z+=(Math.random()-.5)*t}if(AFRAME.registerComponent("beat-cut-fx",{schema:{color:{type:"string"},type:{oneOf:["beat","dot","mine"],default:"beat"}},init:function(){this.breaking=!1,this.fx=null,this.fxpool=null,this.pieces=[],this.pool=null,this.returnToPoolTimer=500,this.el.addEventListener("model-loaded",this.setupModel.bind(this)),this.el.addEventListener("explode",this.explode.bind(this),!1)},update:function(){const e=this.el.sceneEl,t=this.data.color;"beat"===this.data.type?(this.material=e.systems.materials[t+"BeatPieces"],this.poolBeat=e.components["pool__beat-broken-"+t],this.poolBeatFx=e.components["pool__beat-fx-"+t],this.poolPunchFx=e.components["pool__punch-fx-"+t]):"dot"===this.data.type?(this.material=e.systems.materials[t+"BeatPieces"],this.poolBeat=e.components[`pool__beat-broken-${t}-dot`],this.poolPunch=e.components[`pool__punch-broken-${t}-dot`],this.poolBeatFx=e.components["pool__beat-fx-"+t],this.poolPunchFx=e.components["pool__punch-fx-"+t]):(this.material=e.systems.materials.minePieces,this.poolBeat=e.components["pool__beat-broken-mine"],this.poolBeatFx=e.components["pool__beat-fx-mine"],this.poolPunchFx=e.components["pool__punch-fx-mine"])},setupModel:function(e){const t=e.detail.model;this.pieces=t.children;for(let e=0;e<this.pieces.length;e++){let t=this.pieces[e];t.restPosition=t.position.clone(),t.restRotation=t.rotation.clone(),t.posVelocity=new THREE.Vector3,t.rotVelocity=new THREE.Vector3,t.material=this.material}},explode:function(e){const t=e.detail.direction,n=e.detail.gameMode,s=e.detail.correctHit,c=e.detail.position,l=e.detail.rotation;let u=e.detail.beatDirection;if(c&&l&&t&&this.data.color===e.detail.color){if(this.el.object3D.position.copy(c),"classic"===n&&"mine"!==this.data.type){const e="dot"===this.data.type;e&&(u=Math.abs(t.x)>Math.abs(t.y)?"right":"down"),t.z*=.01,r.copy(t).multiplyScalar(-.0025).clampLength(0,.01);for(let t=0;t<this.pieces.length;t++){let n=this.pieces[t];if(n.posVelocity.copy(r),n.rotation.z=THREE.Math.degToRad(i[u]),s){let r=t%2==0?-.001:.001;n.posVelocity.x+=o[u].x*r,n.posVelocity.y+=o[u].y*r,!e||t<2?(a(n.posVelocity,.002),a(n.rotVelocity,.004)):(n.posVelocity.copy(this.pieces[t-2].posVelocity),n.rotVelocity.copy(this.pieces[t-2].rotVelocity))}else n.posVelocity.y+=.001,n.rotVelocity.z+=.01}}else for(let e=0;e<this.pieces.length;e++){let t=this.pieces[e];s?(t.posVelocity.copy(t.position).normalize().multiplyScalar(.002),t.posVelocity.z=-.004,a(t.posVelocity,.001),a(t.rotVelocity,.01)):(t.posVelocity.y+=.001,t.posVelocity.z-=.001)}this.pool=this["classic"===n?"poolBeat":"poolPunch"],null===this.fx&&(this.fxpool=this["classic"===n?"poolBeatFx":"poolPunchFx"],this.fx=this.fxpool.requestEntity()),this.fx&&(this.fx.play(),this.fx.object3D.position.copy(c),this.fx.object3D.rotation.copy(l),this.fx.emit("explode")),this.returnToPoolTimer=500,this.breaking=!0,this.el.play()}},returnToPool:function(){for(let e=0;e<this.pieces.length;e++){let t=this.pieces[e];t.position.copy(t.restPosition),t.rotation.copy(t.restRotation),t.posVelocity.set(0,0,0),t.rotVelocity.set(0,0,0),t.scale.set(1,1,1)}this.fx&&(this.fxpool.returnEntity(this.fx),this.fx=null),this.pool.returnEntity(this.el),this.breaking=!1},tick:function(e,t){if(this.breaking)if(this.returnToPoolTimer-=t,this.returnToPoolTimer<=0)this.returnToPool();else for(let e=0;e<this.pieces.length;e++){const n=this.pieces[e];n.position.addScaledVector(n.posVelocity,t),n.rotation.set(n.rotation.x+n.rotVelocity.x*t,n.rotation.y+n.rotVelocity.y*t,n.rotation.z+n.rotVelocity.z*t),"mine"!==this.data.type?(this.returnToPoolTimer<250&&n.scale.multiplyScalar(.94),n.posVelocity.multiplyScalar(.97),n.posVelocity.y-=3e-6*t):(n.scale.multiplyScalar(.94),n.posVelocity.multiplyScalar(.97))}}}),window.AFRAME){const t=["beat-cut-fx"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("beat-hit-sound",{directionsToSounds:{up:"",down:"",upleft:"left",upright:"right",downleft:"left",downright:"right",left:"left",right:"right"},init:function(){this.currentBeatEl=null,this.currentCutDirection="",this.processSound=this.processSound.bind(this),this.sourceCreatedCallback.bind(this);for(let e=1;e<=10;e++)this.el.setAttribute("sound__beathit"+e,{poolSize:8,positional:!1,src:"#hitSound"+e,volume:.185}),this.el.setAttribute(`sound__beathit${e}left`,{poolSize:8,positional:!1,src:`#hitSound${e}left`,volume:.185}),this.el.setAttribute(`sound__beathit${e}right`,{poolSize:8,positional:!1,src:`#hitSound${e}right`,volume:.185})},play:function(){for(let e=1;e<=10;e++)this.el.components["sound__beathit"+e].loaded||(this.el.setAttribute("sound__beathit"+e,"src",""),this.el.setAttribute("sound__beathit"+e,"src","#hitSound"+e)),this.el.components[`sound__beathit${e}left`].loaded||(this.el.setAttribute(`sound__beathit${e}left`,"src",""),this.el.setAttribute(`sound__beathit${e}left`,"src",`#hitSound${e}left`)),this.el.components[`sound__beathit${e}right`].loaded||(this.el.setAttribute(`sound__beathit${e}right`,"src",""),this.el.setAttribute(`sound__beathit${e}right`,"src",`#hitSound${e}right`))},playSound:function(e,t,n){const r=1+Math.floor(10*Math.random()),i=this.directionsToSounds[n||"up"];this.el.components[`sound__beathit${r}${i}`].playSound(this.processSound)},processSound:function(e){e.detune=0},sourceCreatedCallback:function(e){const t=this.getLayer(this.currentBeatEl.object3D.position.y);"bottom"===t?e.detune.setValueAtTime(-400,0):"top"===t&&e.detune.setValueAtTime(200,0),"down"===this.currentCutDirection&&e.detune.linearRampToValueAtTime(-400,1),"up"===this.currentCutDirection&&e.detune.linearRampToValueAtTime(400,1)},getLayer:function(e){return 1===e?"bottom":1.7===e?"top":"middle"}}),window.AFRAME){const t=["beat-hit-sound"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("blade",{schema:{enabled:{default:!1}},init:function(){const e=this.el;this.data;this.bladeHandle=e.querySelector(".bladeHandleHelper").object3D,this.bladeTip=e.querySelector(".bladeTipHelper").object3D,this.rigEl=document.getElementById("curveFollowRig"),this.strokeDirectionVector=new THREE.Vector3,this.strokeSpeed=0,this.bladeBottomPosition=new THREE.Vector3,this.bladeTipPositions=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3],this.bladeWorldPositions=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3],this.bladeEl=this.el.querySelector(".blade")},update:function(e){!e.enabled&&this.data.enabled&&this.bladeEl.emit("drawblade")},tickBeatSystem:function(e,t){this.data.enabled&&this.updateVelocity(t)},updateVelocity:function(e){const t=this.bladeTipPositions,n=this.bladeWorldPositions;this.data;n[2].copy(n[0]),n[3].copy(n[1]),this.bladeTip.getWorldPosition(n[0]),this.bladeHandle.getWorldPosition(n[1]),t[2].copy(n[0]),this.rigEl.object3D.worldToLocal(t[2]),this.strokeDirectionVector.copy(t[2]).sub(t[0]);const r=this.strokeDirectionVector.length();this.strokeSpeed=r/(e/1e3),this.strokeDirectionVector.z=0,this.strokeDirectionVector.normalize();const i=t.shift();t.push(i)},checkCollision:function(){const e=new THREE.Box3,t=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3],n=new THREE.Triangle;return function(r){if(this.strokeSpeed<1)return!1;for(let e=0;e<3;e++)t[e].copy(this.bladeWorldPositions[e]),r.blockEl.object3D.worldToLocal(t[e]),t[e].multiplyScalar(1.75);return n.set(t[0],t[1],t[2]),e.copy(r.bbox),e.expandByScalar(.02),"left"!==r.horizontalPosition&&"right"!==r.horizontalPosition||e.expandByScalar(.07),!!e.intersectsTriangle(n)||(t[3].copy(this.bladeWorldPositions[3]),r.blockEl.object3D.worldToLocal(t[3]),n.set(t[2],t[3],t[0]),!!e.intersectsTriangle(n))}}(),createDebugCube:function(e,t){const n=new THREE.BoxGeometry(.05,.05,.05),r=new THREE.Mesh(n,new THREE.MeshBasicMaterial({color:t,side:THREE.DoubleSide}));r.position.copy(e),this.el.sceneEl.object3D.add(r)}}),window.AFRAME){const t=["blade"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerSystem("check-vr",{init:function(){AFRAME.utils.device.isMobile()&&(document.getElementById("vrButton").style.display="none"),setTimeout(()=>{AFRAME.utils.device.checkHeadsetConnected()&&this.el.emit("displayconnected")},250)}}),window.AFRAME){const t=[],n=[],r=["check-vr"];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("console-shortcuts",{play:function(){window.$=e=>document.querySelector(e),window.$$=e=>document.querySelectorAll(e),window.$$$=e=>document.querySelector(`[${e}]`).getAttribute(e),window.$$$$=e=>document.querySelector(`[${e}]`).components[e],window.scene=this.el,window.state=this.el.systems.state.state}}),window.AFRAME){const t=["console-shortcuts"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("controller",{schema:{hand:{default:"right",oneOf:["left","right"]}},init:function(){const e=this.el,t=this.data;this.controllerType="",e.addEventListener("controllerconnected",e=>{this.controllerType=e.detail.name,this.el.setAttribute("cursor",this.config[this.controllerType].cursor||{})});const n={hand:t.hand,model:!1};e.setAttribute("daydream-controls",n),e.setAttribute("oculus-go-controls",n),e.setAttribute("oculus-touch-controls",{hand:t.hand,model:!1,orientationOffset:{x:0,y:0,z:0}}),e.setAttribute("vive-controls",n),e.setAttribute("vive-focus-controls",n),e.setAttribute("windows-motion-controls",n),e.setAttribute("generic-tracked-controller-controls",n)},config:{"daydream-controls":{cursor:{downEvents:["trackpaddown","triggerdown"],upEvents:["trackpadup","triggerup"]}},"oculus-go-controls":{cursor:{downEvents:["trackpaddown","triggerdown"],upEvents:["trackpadup","triggerup"]}},"oculus-touch-controls":{cursor:{downEvents:["triggerdown","gripdown","abuttondown","bbuttondown","xbuttondown","ybuttondown"],upEvents:["triggerup","gripup","abuttonup","bbuttonup","xbuttonup","ybuttonup"]}},"vive-controls":{cursor:{downEvents:["trackpaddown","triggerdown","gripdown"],upEvents:["trackpadup","triggerup","gripup"]}},"vive-focus-controls":{cursor:{downEvents:["trackpaddown","triggerdown","gripdown"],upEvents:["trackpadup","triggerup","gripup"]}},"windows-motion-controls":{cursor:{downEvents:["trackpaddown","triggerdown","gripdown"],upEvents:["trackpadup","triggerup","gripup"]}},"generic-tracked-controller-controls":{cursor:{downEvents:["triggerdown"],upEvents:["triggerup"]}}}}),window.AFRAME){const t=["controller"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("copy-texture",{dependencies:["geometry","material"],schema:{from:{type:"selector"}},init:function(){this.data.from.addEventListener("materialtextureloaded",()=>{this.copyTexture()}),this.copyTexture()},copyTexture:function(){const e=this.el,t=this.data.from,n=e.getObject3D("mesh").material;t.getObject3D("mesh")&&(n.map=t.getObject3D("mesh").material.map,n.map&&(n.map.needsUpdate=!0,n.needsUpdate=!0))}}),window.AFRAME){const t=["copy-texture"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("cursor-laser",{dependencies:["geometry"],schema:{enabled:{default:!0}},init:function(){const e=this.el;this.weaponEl=this.el.closest(".weapon");const t=this.el.getAttribute("geometry");e.object3D.position.z=-1*t.height/2,this.originalSize=t.height,this.currentLength=t.height},update:function(){this.el.object3D.visible=this.data.enabled},tick:function(){const e=this.el;if(!this.data.enabled)return;const t=this.weaponEl.components.cursor;if(!t)return;if(!t.intersectedEl)return e.object3D.position.z=-24.98,e.object3D.scale.x=.75,e.getObject3D("mesh").scale.y=50,void(this.currentLength=1);const n=this.weaponEl.components.raycaster.intersections[0];n&&(e.object3D.scale.x=1,e.object3D.position.z=-n.distance/2,e.getObject3D("mesh").scale.y=this.currentLength=n.distance)}}),window.AFRAME){const t=["cursor-laser"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("cursor-mesh",{schema:{active:{default:!0},cursorEl:{type:"selector"}},init:function(){this.scenePivotEl=document.getElementById("scenePivot")},update:function(){this.el.object3D.visible=this.data.active},tick:function(){var e,t,n=this.data.cursorEl,r=this.el,i=this.scenePivotEl;this.data.active&&n.components.cursor&&((t=n.components.cursor.intersectedEl)?(r.object3D.visible=!0,(e=n.components.raycaster.getIntersection(t))&&(r.object3D.position.copy(e.point),i&&r.object3D.rotation.copy(i.object3D.rotation))):r.object3D.visible=!1)}}),window.AFRAME){const t=["cursor-mesh"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("curve-follow-rig-reset",{schema:{isVictory:{type:"string"}},init:function(){this.el.sceneEl.addEventListener("cleargame",()=>{this.reset()})},update:function(e){const t=this.data;this.el;!e.isVictory&&t.isVictory&&this.reset()},reset:function(){this.el.components["supercurve-follow"].curveProgress=0,this.el.object3D.position.set(0,0,0),this.el.object3D.rotation.set(0,0,0)}}),window.AFRAME){const t=["curve-follow-rig-reset"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerShader("cutfxShader",{schema:{src:{type:"map",is:"uniform",default:"#cutfxImg"},color:{type:"color",is:"uniform",default:"#fff"},progress:{type:"number",is:"uniform"},transparent:{default:!0},blending:{default:"additive"},side:{default:"double"},depthTest:{default:!1},depthWrite:{default:!1}},vertexShader:n(74),fragmentShader:n(75)}),window.AFRAME){const t=[],n=["cutfxShader"],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t){e.exports="varying vec2 uvs;\nvoid main() {\n uvs.xy = uv.xy;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n"},function(e,t){e.exports="varying vec2 uvs;\nuniform sampler2D src;\nuniform vec3 color;\nuniform float progress;\n\nvoid main() {\n vec3 col = color;\n float alpha = smoothstep(progress, 1.0, texture2D(src, uvs).a);\n gl_FragColor = vec4(col, alpha);\n}\n"},function(e,t,n){if(AFRAME.registerComponent("debug-beat-generator",{dependencies:["beat-generator"],schema:{beatEnabled:{default:!1},stageEnabled:{default:!1}},init:function(){this.beatLoader=this.el.components["beat-generator"],this.selectedBeat={color:"red",position:"middleCenterLeft",type:"arrow",orientation:"up"},this.beats={},this.onKeyDown=this.onKeyDown.bind(this),(this.data.stageEnabled||AFRAME.utils.getUrlParameter("debugstage"))&&this.addDebugStageControls(),(this.data.beatEnabled||"gameplay"===AFRAME.utils.getUrlParameter("debugstate").trim())&&(window.addEventListener("keydown",this.onKeyDown),this.addDebugBeatControls())},spawn:function(){var e=this;Object.keys(this.beats).forEach((function(t){e.generateBeat(e.beats[t])}))},generateBeat:function(e){var t;"wall"!==e.type?(t="mine"===e.type?3:"red"===e.color?0:1,this.beatLoader.generateBeat({_lineIndex:this.beatLoader.positionHumanized[e.position].index,_lineLayer:this.beatLoader.positionHumanized[e.position].layer,_cutDirection:"dot"===e.type?8:this.beatLoader.orientationsHumanized.indexOf(e.orientation),_type:t})):this.generateWall(e)},generateWall:function(e){this.beatLoader.bpm=90,this.beatLoader.generateWall({_lineIndex:this.beatLoader.positionHumanized[e.position].index,_width:1,_duration:3})},onKeyDown:function(e){switch(e.keyCode){case 32:this.spawn()}},addDebugBeatControls:function(){const e=document.createElement("div"),t=this;var n;function r(t){const n=document.createElement("div");return n.id=t,n.style.marginBottom="20px",n.style.width="500px",n.style.display="inline-block",e.appendChild(n),n}function i(e,n,r){const i=document.createElement("div"),o=r||function(){const e=i.parentElement.querySelectorAll(".button");for(let t=0;t<e.length;t++)e[t].style.background="#000";i.style.background="#66f",t.selectedBeat[i.parentElement.id]=this.id,t["selected"+i.parentElement.id.charAt(0).toUpperCase()+i.parentElement.id.slice(1)+"El"]=this};return i.classList.add("button"),i.id=e,i.style.width="100px",i.style.height="30px",i.style.background="#000",i.style.color="#fff",i.style.zIndex=999999999,i.style.padding="5px",i.style.margin="5px",i.style.font="14px sans-serif",i.style.textAlign="center",i.style.lineHeight="30px",i.style.cursor="pointer",i.style.display="inline-block",i.innerHTML=e,n.appendChild(i),i.addEventListener("click",o),i}e.style.position="absolute",e.style.right="0",e.style.top="0",e.style.padding="10px",e.style.width="500px",e.style.height="600px",document.body.appendChild(e),function(){const t=r("type");i("arrow",t),i("dot",t),i("mine",t),i("wall",t),e.appendChild(t)}(),function(){const t=r("color");i("blue",t),i("red",t),e.appendChild(t)}(),function(){const t=r("orientation");i("top",t),i("left",t),i("right",t),i("down",t),e.appendChild(t)}(),(n=i("Set Beat",e,(function(){var e="mine"!==t.selectedBeat.type?" "+t.selectedBeat.color:"",n="arrow"!==t.selectedBeat.type?"":" "+t.selectedBeat.orientation;t.selectedBeat={position:t.selectedBeat.position,type:t.selectedBeat.type,orientation:t.selectedBeat.orientation,color:t.selectedBeat.color},t.selectedPositionEl&&(t.selectedPositionEl.innerHTML=t.selectedBeat.type+e+n,t.beats[t.selectedPositionEl.id]={position:t.selectedBeat.position,type:t.selectedBeat.type,orientation:t.selectedBeat.orientation,color:t.selectedBeat.color})}))).style.width="460px",n.style.bottomMargin="10px",function(){const e=r("position");i("topLeft",e),i("topCenterLeft",e),i("topCenterRight",e),i("topRight",e),i("middleLeft",e),i("middleCenterLeft",e),i("middleCenterRight",e),i("middleRight",e),i("bottomLeft",e),i("bottomCenterLeft",e),i("bottomCenterRight",e),i("bottomRight",e)}(),function(n,r){const o=i("Spawn (Space Bar)",e,()=>{t.spawn()});o.style.width="460px",o.style.bottomMargin="10px"}()},addDebugStageControls:function(){var e=0;const t=(t,n,r)=>{const i=document.createElement("div");i.style.position="absolute",i.id="stagecontrol"+t,i.style.width="100px",i.style.height="30px",i.style.top="element"===r?"20px":"70px",i.style.background="#000",i.style.color="#fff",i.style.zIndex=999999999,i.style.padding="5px",i.style.font="14px sans-serif",i.style.textAlign="center",i.style.cursor="pointer",i.style.left=20+120*t+"px",i.innerHTML=n,"element"===r?i.addEventListener("click",()=>{document.getElementById("stagecontrol"+e).style.background="#000",i.style.background="#66f",e=t}):i.addEventListener("click",()=>{this.beatLoader.generateEvent({_type:e,_value:t})}),document.body.appendChild(i)};["sky","tunnelNeon","leftStageLasers","rightStageLasers","floor"].forEach((e,n)=>{t(n,e,"element")}),["off","blue","blue","bluefade","","red","red","redfade"].forEach((e,n)=>{t(n,e,"value")})}}),window.AFRAME){const t=["debug-beat-generator"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r=["left","middleleft","middleright","right"],i=["bottom","middle","top"];if(AFRAME.registerComponent("debug-beat-positioning",{play:function(){let e=AFRAME.utils.getUrlParameter("debugbeatpositioning");e&&("punch"!==e&&"classic"!==e&&(e="classic"),this.el.emit("debugbeatpositioning"),setTimeout(()=>{const t=this.el.sceneEl.components["beat-generator"];t.data.gameMode=e,scene.components["beat-system"].data.gameMode=e,scene.components["beat-system"].updateBeatPositioning(),r.forEach(n=>{i.forEach(r=>{let i=t.requestBeat("punch"===e?"dot":"arrow","red"),o=Math.random()<.5?"left":"right";i.components.beat.onGenerate(.001,n,r,o),i.object3D.renderOrder=9999,i.play(),i=t.requestBeat("dot","blue"),o=Math.random()<.5?"down":"up",i.components.beat.onGenerate(.0015,n,r,o),i.object3D.renderOrder=9999,i.play()})});const n=scene.components.pool__wall.requestEntity();n.components.wall.onGenerate(.0015,"left",4,4,!0),n.play(),document.getElementById("beatContainer").removeAttribute("bind__visible"),document.getElementById("beatContainer").object3D.visible=!0},500))}}),window.AFRAME){const t=["debug-beat-positioning"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("debug-controller",{init:function(){var e,t;AFRAME.utils.getUrlParameter("debug")&&(console.log("%c debug-controller enabled ","background: #111; color: red"),e=document.getElementById("rightHand"),t=document.getElementById("leftHand"),e.setAttribute("tracked-controls","autoHide",!1),e.object3D.visible=!0,t.object3D.visible=!0,t.setAttribute("tracked-controls","autoHide",!1),AFRAME.utils.getUrlParameter("headfist")||(window.addEventListener("click",t=>{t.isTrusted&&(e.emit("triggerdown"),e.emit("triggerup"))}),"oculus"===AFRAME.utils.getUrlParameter("debug")?(e.emit("controllerconnected",{name:"oculus-touch-controls"}),t.emit("controllerconnected",{name:"oculus-touch-controls"}),e.setAttribute("controller","controllerType","oculus-touch-controls"),t.setAttribute("controller","controllerType","oculus-touch-controls")):(e.emit("controllerconnected",{name:"vive-controls"}),t.emit("controllerconnected",{name:"vive-controls"}),e.setAttribute("controller","controllerType","vive-controls"),t.setAttribute("controller","controllerType","vive-controls")),this.el.emit("enter-vr",null,!1),document.addEventListener("keydown",n=>{var r,i,o,a;n.shiftKey&&(32!==n.keyCode?81!==n.keyCode?(78===n.keyCode&&(this.secondaryGripDown?(t.emit("gripup"),this.secondaryGripDown=!1):(t.emit("gripdown"),this.secondaryGripDown=!0)),77===n.keyCode&&(this.primaryGripDown?(e.emit("gripup"),this.primaryGripDown=!1):(e.emit("gripdown"),this.primaryGripDown=!0)),49===n.keyCode&&t.emit("menudown"),n.ctrlKey?(o=t.getAttribute("position"),72===n.keyCode&&(o.x-=.02),74===n.keyCode&&(o.y-=.02),75===n.keyCode&&(o.y+=.02),76===n.keyCode&&(o.x+=.02),59!==n.keyCode&&186!==n.keyCode||(o.z-=.01),222===n.keyCode&&(o.z+=.01),t.setAttribute("position",AFRAME.utils.clone(o))):(r=e.getAttribute("position"),72===n.keyCode&&(r.x-=.02),74===n.keyCode&&(r.y-=.02),75===n.keyCode&&(r.y+=.02),76===n.keyCode&&(r.x+=.02),59!==n.keyCode&&186!==n.keyCode||(r.z-=.02),222===n.keyCode&&(r.z+=.02),e.setAttribute("position",AFRAME.utils.clone(r))),n.ctrlKey?(a=t.getAttribute("rotation"),89===n.keyCode&&(a.x-=10),79===n.keyCode&&(a.x+=10),85===n.keyCode&&(a.y-=10),73===n.keyCode&&(a.y+=10),t.setAttribute("rotation",AFRAME.utils.clone(a))):(i=e.getAttribute("rotation"),89===n.keyCode&&(i.x-=10),79===n.keyCode&&(i.x+=10),85===n.keyCode&&(i.y-=10),73===n.keyCode&&(i.y+=10),e.setAttribute("rotation",AFRAME.utils.clone(i)))):this.isSecondaryTriggerDown?(t.emit("triggerup"),this.isSecondaryTriggerDown=!1):(t.emit("triggerdown"),this.isSecondaryTriggerDown=!0):this.isTriggerDown?(e.emit("triggerup"),this.isTriggerDown=!1):(e.emit("triggerdown"),this.isTriggerDown=!0))})))},play:function(){var e,t;if(this.bounds=document.body.getBoundingClientRect(),!AFRAME.utils.getUrlParameter("debug"))return;if(AFRAME.utils.getUrlParameter("headfist"))return;e=document.getElementById("rightHand"),(t=document.getElementById("leftHand")).object3D.position.set(-.2,1.5,-.5),e.object3D.position.set(.2,1.5,-.5),t.setAttribute("rotation",{x:35,y:0,z:0});const n=AFRAME.utils.getUrlParameter("type");[e,t].forEach(e=>{e.querySelector(".laser").object3D.visible=!1,"classic"===n?(e.querySelector(".bladeContainer").removeAttribute("bind__visible"),e.querySelector(".bladeContainer").object3D.visible=!0,e.querySelector(".bladeContainer").object3D.scale.set(1,1,1)):"punch"===n?(e.querySelector(".punch").removeAttribute("bind__visible"),e.querySelector(".punch").object3D.visible=!0,e.querySelector(".punch").object3D.visible=!0,e.querySelector(".bladeHandle").object3D.visible=!1):"ride"===n&&(e.querySelector(".handStar").removeAttribute("bind__visible"),e.querySelector(".handStar").object3D.visible=!0,e.querySelector(".bladeHandle").object3D.visible=!1)})},onMouseMove:function(){const e=new THREE.Vector3,t=new THREE.Vector2,n=new THREE.Vector3;return function(r){const i=this.bounds,o=this.el.sceneEl.camera,a=r.clientX-i.left,s=r.clientY-i.top;t.x=a/i.width*2-1,t.y=-s/i.height*2-1,document.getElementById("camera").object3D.getWorldPosition(n),e.set(t.x,t.y,.5).unproject(o).sub(n).normalize();const c=document.getElementById("rightHand").object3D.position,l=-n.z/e.z;o.getWorldPosition(c).add(e.multiplyScalar(l)),c.y+=.8}}()}),window.AFRAME){const t=["debug-controller"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("debug-cursor",{init:function(){},log:function(e,t,n){t.id?console.log(`%c[${e}] ${t.id}`,"color: "+n):(console.log(`%c[${e}]`,"color: "+n),console.log(t))}}),window.AFRAME){const t=["debug-cursor"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r=AFRAME.utils.getUrlParameter("skipintro");if(AFRAME.registerComponent("debug-intro",{play:function(){r&&document.getElementById("startButton").emit("click")}}),window.AFRAME){const t=["debug-intro"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("debug-song-time",{dependencies:["song"],init:function(){AFRAME.utils.getUrlParameter("debug-song-time")&&setInterval(()=>{console.log(this.el.components.song.getCurrentTime())},250)}}),window.AFRAME){const t=["debug-song-time"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("debug-state",{play:function(){const e=AFRAME.utils.getUrlParameter("debugstate").trim();e&&setTimeout(()=>{e.split(",").forEach(e=>{this.el.sceneEl.emit("debug"+e.trim(),null,!1)})},500)}}),window.AFRAME){const t=["debug-state"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("delayed-proxy-event",{schema:{captureBubbles:{default:!1},enabled:{default:!0},event:{type:"string"},from:{type:"string"},to:{type:"string"},as:{type:"string"},bubbles:{default:!1},delay:{default:0,type:"int"}},multiple:!0,init:function(){var e,t,n,r=this.data,i=this.el,o=this;if(r.from?e="PARENT"===r.from?[i.parentNode]:document.querySelectorAll(r.from):n="CHILDREN"===r.to?i.querySelectorAll("*"):"SELF"===r.to?[i]:document.querySelectorAll(r.to),r.from)for(t=0;t<e.length;t++)this.addEventListenerFrom(e[t]);else i.addEventListener(r.event,(function(e){setTimeout(()=>{var r=o.data;if(r.enabled&&(r.captureBubbles||e.target===i))for(t=0;t<n.length;t++)n[t].emit(r.as||r.event,e.detail?e.detail:null,r.bubbles)},r.delay)}))},addEventListenerFrom:function(e){var t=this.data,n=this;e.addEventListener(t.event,(function(r){setTimeout(()=>{var t=n.data;t.enabled&&(t.captureBubbles||r.target===e)&&n.el.emit(t.as||t.event,r.detail?r.detail:null,!1)},t.delay)}))}}),window.AFRAME){const t=["delayed-proxy-event"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r=.6,i=.5;if(AFRAME.registerComponent("desktop-input",{schema:{hand:{default:"right",oneOf:["left","right"]}},init:function(){this.target=new THREE.Vector3("right"===this.data.hand?.25:-.25,1.4,0),this.lungeUntil=0,this.hasController=!1,this.el.addEventListener("controllerconnected",()=>{this.hasController=!0}),this.onMouseMove=this.onMouseMove.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onContextMenu=e=>e.preventDefault(),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mousedown",this.onMouseDown),window.addEventListener("contextmenu",this.onContextMenu)},remove:function(){window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mousedown",this.onMouseDown),window.removeEventListener("contextmenu",this.onContextMenu)},onMouseMove:function(e){const t=e.clientX/window.innerWidth*2-1,n=e.clientY/window.innerHeight*2-1;this.target.x=("right"===this.data.hand?.25:-.25)+t*r,this.target.y=1.4-n*i},onMouseDown:function(e){const t="right"===this.data.hand,n=2===e.button||e.shiftKey;t&&n||(t||n)&&(this.lungeUntil=performance.now()+140,this.el.emit("triggerdown",null,!1),setTimeout(()=>this.el.emit("triggerup",null,!1),140))},tick:function(){if(this.hasController)return;const e=this.el.object3D,t=performance.now()<this.lungeUntil;e.position.x+=.35*(this.target.x-e.position.x),e.position.y+=.35*(this.target.y-e.position.y);const n=t?-.6:this.target.z;e.position.z+=.5*(n-e.position.z)}}),window.AFRAME){const t=["desktop-input"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("difficulty-background",{schema:{enabled:{type:!1}},update:function(){this.data.enabled?this.el.setAttribute("raycastable",""):this.el.removeAttribute("raycastable")}}),window.AFRAME){const t=["difficulty-background"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("difficulty-filter",{events:{click:function(e){this.el.sceneEl.emit("difficultyfilter",e.target.parentNode.dataset.difficultyFilter)}}}),window.AFRAME){const t=["difficulty-filter"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("difficulty-text",{schema:{id:{value:"Standard-Easy"}},update:function(){this.el.setAttribute("text","value",this.data.id.replace("Standard-","").replace("-","\n"))}}),window.AFRAME){const t=["difficulty-text"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("follow-position",{schema:{target:{type:"selector"}},tick:function(){this.el.object3D.position.copy(this.data.target.object3D.position)}}),window.AFRAME){const t=["follow-position"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("follow-z",{schema:{offset:{type:"vec3"},target:{type:"selector"}},tick:function(){this.data.target&&(this.el.object3D.position.copy(this.data.offset),this.el.object3D.position.z+=this.data.target.object3D.position.z)}}),window.AFRAME){const t=["follow-z"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("gameover",{schema:{isGameOver:{default:!1}},init:function(){this.beatContainer=document.getElementById("beatContainer"),this.gameOverEls=document.querySelectorAll("[animation__gameover]")},update:function(e){this.data;!e.isGameOver&&this.data.isGameOver&&(this.triggerAnimations(),this.countDown=1),e.isGameOver&&!this.data.isGameOver&&this.reset()},tick:function(e,t){this.data.isGameOver&&this.countDown>=0&&(this.beatContainer.object3D.position.z=1.5*-Math.pow(1-this.countDown,2),this.countDown-=t/1e3)},reset:function(){this.beatContainer.object3D.position.z=0,this.el.sceneEl.setAttribute("stage-colors","color","blue")},triggerAnimations:function(){for(let e=0;e<this.gameOverEls.length;e++)this.gameOverEls[e].emit("gameover",null,!1);this.el.emit("textglowoff",null,!1),this.el.emit("bgcolorgameover",null,!1)}}),window.AFRAME){const t=["gameover"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){let r=0;if(AFRAME.registerComponent("gpu-preloader",{dependencies:["materials"],play:function(){setTimeout(()=>{this.preloadFromSelector("#mainLogo"),this.preloadFromSelector("#prevArrow"),this.preloadFromSelector("#stepback"),this.preloadFromSelector(".difficultyBackground"),this.preloadFromSelector(".genreIcon"),this.preloadFromSelector(".merkababloom"),this.preloadFromSelector(".searchResultBackground"),this.preloadMaterialsComponentTextures(),this.preloadKeyboard(),this.preloadSlice(),this.preloadEnvMap(),this.preloadFXs()},1e3)},preloadFromSelector:function(e){const t=document.querySelector(e);this.preloadTexture(t.getObject3D("mesh").material.map)},preloadMaterialsComponentTextures:function(){const e=this.el.systems.materials.textureList;for(var t=0;t<e.length;t++)this.preloadTexture(e[t])},preloadKeyboard:function(){const e=document.getElementById("keyboard").components["super-keyboard"];this.preloadTexture(e.kbImg.getObject3D("mesh").material.map),this.preloadTexture(e.keyColorPlane.getObject3D("mesh").material.map)},preloadSlice:function(){const e=document.getElementById("searchPrevPage");this.preloadTexture(e.components.slice9.material.map)},preloadEnvMap:function(){const e=document.querySelector("#wallContainer [wall]");this.preloadTexture(e.components.material.material.uniforms.environment.value)},preloadFXs:function(){const e=document.querySelector("#rigContainer [mixin~=blueBeatFX]");this.preloadTexture(e.components.material.material.uniforms.src.value);const t=document.querySelector("#rigContainer [mixin~=mineFX]");this.preloadTexture(t.components.material.material.map)},preloadTexture:function(e){e&&e.image?e.image.complete?this.el.renderer.setTexture2D(e,r++%8):console.warn("[gpu-preloader] Error preloading, image not loaded",e):console.warn("[gpu-preloader] Error preloading texture",e)}}),window.AFRAME){const t=["gpu-preloader"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerShader("gradientShader",{schema:{color1:{type:"color",is:"uniform"},color2:{type:"color",is:"uniform"}},vertexShader:n(17),fragmentShader:n(93)}),window.AFRAME){const t=[],n=["gradientShader"],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t){e.exports="varying vec2 uvs;\nuniform vec3 color1;\nuniform vec3 color2;\n\nvoid main () {\n float mixDistance = distance(uvs, vec2(0.5, 0));\n float alphaDistance = min(1., (0.5 - distance(uvs, vec2(0.5))) * 2.5);\n gl_FragColor = vec4(mix(color1, color2, pow(mixDistance, 2.4)), alphaDistance);\n}\n"},function(e,t,n){const r=["triggerdown","gripdown","abuttondown","bbuttondown","xbuttondown","ybuttondown","trackpaddown"];if(AFRAME.registerComponent("hand-swapper",{schema:{enabled:{default:!1}},init:function(){this.swapHand=this.swapHand.bind(this),r.forEach(e=>{this.el.addEventListener(e,this.swapHand)})},swapHand:function(){this.data.enabled&&this.el.sceneEl.emit("activehandswap",null,!1)}}),window.AFRAME){const t=["hand-swapper"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){"use strict";n.r(t);var r=n(0),i=n.n(r);if(AFRAME.registerShader("handStar",{schema:{colorPrimary:{type:"color",is:"uniform",default:i.a.initial.primary},colorSecondary:{type:"color",is:"uniform",default:i.a.initial.secondary},colorTertiary:{type:"color",is:"uniform",default:i.a.initial.tertiary},pulse:{type:"number",is:"uniform",default:0},transparent:{default:!0},side:{default:"back"},depthTest:{default:!1}},vertexShader:n(96),fragmentShader:n(97)}),window.AFRAME){const t=[],n=["handStar"],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t){e.exports="varying vec3 vWorldPosition;\nvarying float fresnel;\nuniform float pulse;\n\nvoid main() {\n vWorldPosition = (modelMatrix * vec4(position, 1.0)).xyz;\n vec3 worldNormal = normalize(mat3(modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz) * normal);\n vec3 viewVector = normalize(vWorldPosition - cameraPosition);\n fresnel = 0.08 * pow(0.4 + dot(viewVector, worldNormal), 6.0 + pulse);\n\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n"},function(e,t){e.exports="varying vec3 vWorldPosition;\nvarying float fresnel;\nuniform float pulse;\nuniform vec3 colorPrimary;\nuniform vec3 colorSecondary;\nuniform vec3 colorTertiary;\n\nvoid main() {\n vec3 colorize = vWorldPosition-cameraPosition;\n colorize = clamp(colorize + 0.5, vec3(0.0), vec3(1.0));\n vec3 col = mix(mix(colorPrimary, colorSecondary, colorize.x), colorTertiary, colorize.z);\n col += (fresnel * pulse) * 0.1;\n gl_FragColor = vec4 (col, clamp(fresnel, 0.0, 1.0));\n}\n"},function(e,t,n){if(AFRAME.registerComponent("haptics-wall",{schema:{enabled:{default:!1}},init:function(){const e=this.el;this.isHittingWall=!1,e.setAttribute("haptics__wall",{dur:50,force:.15}),this.checkIfHittingWall=this.checkIfHittingWall.bind(this),e.addEventListener("mouseenter",this.checkIfHittingWall),e.addEventListener("mouseleave",this.checkIfHittingWall),this.tick=AFRAME.utils.throttleTick(this.tick.bind(this),50)},checkIfHittingWall:function(){const e=this.el.components.raycaster__game.intersectedEls;this.isHittingWall=!1;for(let t=0;t<e.length;t++)if(e[t].components.wall)return void(this.isHittingWall=!0)},tick:function(){this.data.enabled&&this.isHittingWall&&this.el.components.haptics__wall.pulse()}}),window.AFRAME){const t=["haptics-wall"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("haptics-weapons",{schema:{enabled:{default:!1}},init:function(){const e=this.el;this.isColliding=!1,this.tick=AFRAME.utils.throttleTick(this.tick.bind(this),100),e.setAttribute("haptics__weapon",{dur:100,force:.075}),e.addEventListener("mouseenter",t=>{if(!t.detail||!t.detail.intersectedEl||!this.data.enabled)return;const n=t.detail.intersectedEl;n.classList.contains("blade")&&n!==e?(this.isColliding=!0,this.el.components.haptics__weapon.pulse()):this.isColliding=!1}),e.addEventListener("mouseleave",e=>{this.isColliding=!1})},tick:function(){this.isColliding&&this.data.enabled&&this.el.components.haptics__weapon.pulse()}}),window.AFRAME){const t=["haptics-weapons"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r=!!AFRAME.utils.getUrlParameter("headfist");if(AFRAME.registerComponent("headfist",{schema:{hand:{type:"string"},isPlaying:{default:!1}},init:function(){console.log("[headfist] "+r),r&&(this.camera=document.getElementById("camera").object3D,this.originalParent=this.el.object3D.parent)},update:function(){const e=this.el;if(r&&this.camera)return this.data.isPlaying?(this.camera.add(e.object3D),e.object3D.rotation.set(-5,0,0),e.object3D.position.set("right"===this.data.hand?.175:-.175,.15,-.2),e.components["tracked-controls"].pause(),e.components["tracked-controls-webvr"]&&e.components["tracked-controls-webvr"].pause(),void(e.components["tracked-controls-webxr"]&&e.components["tracked-controls-webxr"].pause())):void(e.object3D.parent!==this.originalParent&&(console.log("[headfist] Detach."),this.originalParent.add(e.object3D),e.components["tracked-controls-webvr"]&&e.components["tracked-controls-webvr"].play(),e.components["tracked-controls-webxr"]&&e.components["tracked-controls-webxr"].play()))}}),window.AFRAME){const t=["headfist"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("history",{schema:{challengeId:{type:"string"},songName:{type:"string"},songSubName:{type:"string"}},update:function(){const e=this.data;history.pushState("",e.songName,updateQueryParam(window.location.href,"challenge",e.challengeId)),document.title="Super Saber - "+e.songName}}),window.AFRAME){const t=["history"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("intro-song",{schema:{isPlaying:{default:!0},isSearching:{default:!1}},init:function(){this.analyserEl=document.getElementById("audioAnalyser"),this.audio=document.getElementById("introSong"),this.timeout=null},update:function(e){const t=this.audio;this.el.sceneEl.isPlaying&&(!e.isSearching&&this.data.isSearching||(!e.isPlaying&&this.data.isPlaying&&(this.analyserEl.components.audioanalyser.resumeContext(),this.analyserEl.setAttribute("audioanalyser","src",t),this.fadeInAudio()),e.isPlaying&&!this.data.isPlaying&&t.pause()))},pause:function(){this.audio.pause()},play:function(){this.fadeInAudio()},fadeInAudio:function(){if(AFRAME.utils.getUrlParameter("mute"))return;const e=this.analyserEl.components.audioanalyser.context,t=this.analyserEl.components.audioanalyser.gainNode;t.gain.setValueAtTime(0,e.currentTime),this.audio.play(),t.gain.linearRampToValueAtTime(.5,e.currentTime+.5)}}),window.AFRAME){const t=["intro-song"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("keyboard-raycastable",{dependencies:["super-keyboard"],schema:{condition:{default:""}},play:function(){this.el.components["super-keyboard"].kbImg.setAttribute("bind-toggle__raycastable",this.data.condition)}}),window.AFRAME){const t=["keyboard-raycastable"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r=n(25),i=n(105);n(107);const o=/(fuc)|(ass)|(nig)|(shit)|(retard)/gi;if(AFRAME.registerComponent("leaderboard",{schema:{challengeId:{default:""},difficulty:{default:""},beatmapCharacteristic:{default:""},inVR:{default:!1},gameMode:{type:"string"},menuSelectedChallengeId:{default:""},isVictory:{default:!1}},init:function(){this.qualifyingIndex=void 0,this.scores=[],this.eventDetail={scores:this.scores},this.addEventDetail={scoreData:void 0,index:void 0},this.username=localStorage.getItem("threewsusername")||"Super Zealot",this.el.addEventListener("leaderboardusername",e=>{this.username=e.detail.value,localStorage.setItem("threewsusername",this.username)}),this.el.addEventListener("leaderboardsubmit",this.addScore.bind(this)),this.initFirebase()},initFirebase:async function(){try{const e=await fetch("/api/rider/firebase"),t=await e.json();t.apiKey&&!r.apps.length&&(r.initializeApp(t),this.firestore=r.firestore(),this.firestore.settings({}),this.db=this.firestore.collection("scores"))}catch(e){console.error("Error fetching Firebase config",e)}},update:function(e){!r.apps.length&&this.data.apiKey&&(r.initializeApp({apiKey:this.data.apiKey,authDomain:this.data.authDomain,databaseURL:this.data.databaseURL,projectId:this.data.projectId,storageBucket:this.data.storageBucket,messagingSenderId:this.data.messagingSenderId}),this.firestore=r.firestore(),this.firestore.settings({}),this.db=this.firestore.collection("scores")),!e.isVictory&&this.data.isVictory&&this.checkLeaderboardQualify(),this.data.difficulty&&e.difficulty!==this.data.difficulty||this.data.menuSelectedChallengeId&&e.menuSelectedChallengeId!==this.data.menuSelectedChallengeId?this.fetchScores(this.data.menuSelectedChallengeId):this.data.challengeId&&e.challengeId!==this.data.challengeId&&this.fetchScores(this.data.challengeId)},addScore:function(){const e=this.el.sceneEl.systems.state.state;if(!e.isVictory||!e.inVR)return;const t={accuracy:e.score.accuracy,challengeId:e.challenge.id,gameMode:this.data.gameMode,score:e.score.score,username:this.username,difficulty:this.data.difficulty||e.challenge.difficulty,time:new Date};i.includes(this.username.toLowerCase())||this.username.match(o)||this.db.add(t),this.addEventDetail.scoreData=t,this.el.emit("leaderboardscoreadded",this.addEventDetail,!1)},fetchScores:function(e){if("ride"===this.data.gameMode)return;const t=this.el.sceneEl.systems.state.state;this.db.where("challengeId","==",e).where("difficulty","==",t.menuSelectedChallenge.id?t.menuSelectedChallenge.difficulty:t.challenge.difficulty).where("gameMode","==",this.data.gameMode).orderBy("score","desc").orderBy("time","asc").limit(10).get().then(t=>{this.eventDetail.challengeId=e,this.scores.length=0,t.empty||t.forEach(e=>this.scores.push(e.data())),this.el.sceneEl.emit("leaderboard",this.eventDetail,!1)}).catch(e=>{console.error("[firestore]",e)})},checkLeaderboardQualify:function(){const e=this.el.sceneEl.systems.state.state.score.score;if(!AFRAME.utils.getUrlParameter("dot")){if(this.scores.length<10)return this.qualifyingIndex=this.scores.length,void this.el.sceneEl.emit("leaderboardqualify",this.scores.length,!1);for(let t=0;t<this.scores.length;t++)if(e>this.scores[t].score)return this.qualifyingIndex=t,void this.el.sceneEl.emit("leaderboardqualify",t,!1)}}}),window.AFRAME){const t=["leaderboard"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){e.exports=n(106)},function(e){e.exports=JSON.parse('["2 girls 1 cup","2g1c","4r5e","5h1t","5hit","5ht","666","@$$","a s s","a s shole","a55","a55hole","a_s_s","abbo","abeed","abuse","acrotomophilia","addicts","aeolus","africoon","ahole","alabama hot pocket","alaskan pipeline","alligator bait","alligatorbait","amcik","anal","analannie","analprobe","analsex","andskota","anilingus","anus","apeshit","ar5e","arabush","arabushs","areola","areole","argie","arian","armo","armos","aroused","arrse","arschloch","arse","arsehole","aryan","ash0le","ash0les","asholes","ass monkey","ass","ass-fucker","ass-hat","ass-pirate","assbag","assbagger","assbandit","assbang","assbanged","assbanger","assbangs","assbite","assblaster","assclown","asscock","asscowboy","asscracker","asses","assface","assfuck","assfucker","assfukka","assgoblin","assh0le","assh0lez","asshat","asshead","assho1e","asshole","assholes","assholz","asshopper","asshore","assjacker","assjockey","asskiss","asskisser","assklown","asslick","asslicker","asslover","assman","assmaster","assmonkey","assmunch","assmuncher","assnigger","asspacker","asspirate","asspuppies","assrammer","assranger","assshit","assshole","asssucker","asswad","asswhole","asswhore","asswipe","asswipes","auto erotic","autoerotic","ayir","azazel","azz","azzhole","b a s t a r d","b i t c h","b o o b","b!+ch","b!tch","b!tchin","b*tch","b00b","b00bies","b00biez","b00bs","b00bz","b17ch","b1tch","b7ch","babeland","babes","baby batter","baby juice","backdoor","backdoorman","badfuck","bagging","ball gag","ball gravy","ball kicking","ball licking","ball sack","ball sucking","ballbag","balllicker","ballsack","bampot","bangbro","bangbros","banger","banging","bareback","barely legal","barelylegal","barenaked","barf","barface","barfface","bassterd","bassterds","bastard","bastardo","bastards","bastardz","basterds","basterdz","bastinado","bawdy","bazongas","bazooms","bbw","bdsm","beaner","beaners","beaney","beaneys","beardedclam","beastality","beastial","beastiality","beastility","beatch","beatoff","beatyourmeat","beaver cleaver","beaver lips","beaver","beeyotch","bellend","beotch","bestial","bestiality","bi curious","bi+ch","bi7ch","biatch","bicurious","big black","big breasts","big knockers","big tits","bigass","bigbastard","bigbreasts","bigbutt","bigtits","bimbo","bimbos","bint","birdlock","bitch","bitchass","bitched","bitcher","bitchers","bitches","bitchez","bitchin","bitching","bitchslap","bitchtit","bitchy","biteme","black cock","blackcock","blackman","blackout","blacks","blonde action","blonde on blonde action","blonde on blonde","bloody","blow j","blow job","blow your l","blow your load","blowjob","blowjobs","blue waffle","bluegum","bluegums","blumpkin","bo ob","bo obs","boang","boche","boches","bodily","boffing","bogan","bohunk","boink","boiolas","bollick","bollock","bollocks","bollok","bollox","bombers","bombing","bomd","bondage","boned","boner","boners","bong","boob","boobies","boobs","booby","boobz","boody","booger","bookie","boong","boonga","boongas","boongs","boonie","boonies","booobs","boooobs","booooobs","booooooobs","bootee","bootlip","bootlips","booty call","booty","bootycall","boozer","boozy","bosch","bosche","bosches","boschs","bosomy","bounty bar","bounty bars","bountybar","brea5t","breastjob","breastlover","breastman","brothel","brown showers","brunette action","btch","buceta","buddhahead","buddhaheads","buffies","bugger","buggered","buggery","bukkake","bule","bules","bullcrap","bulldike","bulldyke","bullet vibe","bullshit","bullshits","bullshitted","bullturds","bumblefuck","bumfuck","bung hole","bung","bunga","bungas","bunghole","bunny fucker","burr head","burr heads","burrhead","burrheads","butchbabes","butchdike","butchdyke","butt plug","butt-pirate","buttbang","buttcheeks","buttface","buttfuck","buttfucker","buttfuckers","butthead","butthole","buttman","buttmuch","buttmunch","buttmuncher","buttons","buttpirate","buttplug","buttstain","buttwipe","byatch","c u n t","c-0-c-k","c-o-c-k","c-u-n-t","c.0.c.k","c.o.c.k.","c.u.n.t","c0ck","c0cks","c0cksucker","c0k","cabron","caca","cacker","cahone","camel jockey","camel jockeys","camel toe","cameljockey","cameltoe","camgirl","camslut","camwhore","carpet muncher","carpetmuncher","carruth","cawk","cawks","cazzo","cervix","chav","cheese eating surrender monkey","cheese eating surrender monkies","cheeseeating surrender monkey","cheeseeating surrender monkies","cheesehead","cheeseheads","cherrypopper","chickslick","china swede","china swedes","chinaman","chinamen","chinaswede","chinaswedes","chinc","chincs","ching chong","ching chongs","chinga","chingchong","chingchongs","chink","chinks","chinky","choad","chocolate rosebuds","chode","chodes","chonkies","chonky","chonkys","chraa","christ killer","christ killers","chug","chugs","chuj","chunger","chungers","chunkies","chunkys","chute","cipa","circlejerk","cl1t","clamdigger","clamdiver","clamps","clansman","clansmen","clanswoman","clanswomen","cleveland steamer","climax","clit","clitface","clitfuck","clitoris","clitorus","clits","clitty","clogwog","clover clamps","clusterfuck","cnts","cntz","cnut","cocain","cocaine","cock","cock-head","cock-sucker","cockbite","cockblock","cockblocker","cockburger","cockcowboy","cockface","cockfight","cockfucker","cockhead","cockholster","cockknob","cockknocker","cocklicker","cocklover","cockmonkey","cockmunch","cockmuncher","cocknob","cocknose","cocknugget","cockqueen","cockrider","cocks","cockshit","cocksman","cocksmith","cocksmoker","cocksucer","cocksuck","cocksucked","cocksucker","cocksucking","cocksucks","cocksuka","cocksukka","cocktease","cocky","cohee","coital","coitus","cok","cokmuncher","coksucka","commie","condom","coochie","coochy","coolie","coolies","cooly","coon ass","coon asses","coon","coonass","coonasses","coondog","coons","cooter","coprolagnia","coprophilia","copulate","corksucker","cornhole","cowgirl","cox","cra5h","crabs","crackcocain","cracker","crackpipe","crackwhore","crap","crapola","crapper","crappy","crash","creampie","crotch","crotchjockey","crotchmonkey","crotchrot","cum","cumbubble","cumdumpster","cumfest","cumjockey","cumm","cummer","cummin","cumming","cumquat","cumqueen","cums","cumshot","cumshots","cumslut","cumstain","cumtart","cunilingus","cunillingus","cunn","cunnie","cunnilingus","cunntt","cunny","cunt","cunteyed","cuntface","cuntfuck","cuntfucker","cunthole","cunthunter","cuntlick","cuntlicker","cuntlicking","cuntrag","cunts","cuntslut","cuntsucker","cuntz","curry muncher","curry munchers","currymuncher","currymunchers","cushi","cushis","cyalis","cyberfuc","cyberfuck","cyberfucked","cyberfucker","cyberfuckers","cyberfucking","cybersex","cyberslimer","d0ng","d0uch3","d0uche","d1ck","d1ld0","d1ldo","d4mn","dago","dagos","dahmer","damm","dammit","damn","damnation","damned","damnit","darkey","darkeys","darkie","darkies","darky","date rape","daterape","datnigga","dawgie style","dawgie-style","daygo","deapthroat","deep throat","deep throating","deepaction","deepthroat","deepthroating","defecate","deggo","dego","degos","demon","dendrophilia","destroyyourpussy","deth","diaper head","diaper heads","diaperhead","diaperheads","dick pic","dick","dick-ish","dickbag","dickbeaters","dickbrain","dickdipper","dickface","dickflipper","dickforbrains","dickfuck","dickhead","dickheads","dickhole","dickish","dickjuice","dickless","dicklick","dicklicker","dickman","dickmilk","dickpic","dickripper","dicks","dicksipper","dickslap","dickwad","dickweasel","dickweed","dickwhipper","dickwod","dickzipper","diddle","dike","dild0","dild0s","dildo","dildos","dilf","diligaf","dilld0","dilld0s","dillweed","dimwit","dingle","dingleberries","dingleberry","dink","dinks","dipship","dipshit","dipstick","dirsa","dirty pillows","dirty sanchez","dix","dixiedike","dixiedyke","dlck","dog style","dog-fucker","doggie style","doggie","doggie-style","doggiestyle","doggin","dogging","doggy style","doggy-style","doggystyle","dolcett","domination","dominatricks","dominatrics","dominatrix","dommes","dong","donkey punch","donkeypunch","donkeyribber","doochbag","doodoo","doofus","dookie","doosh","dot head","dot heads","dothead","dotheads","double dong","double penetration","doubledong","doublepenetration","douch3","douche bag","douche","douche-fag","douchebag","douchebags","douchewaffle","douchey","dp action","dp","dpaction","dragqueen","dragqween","dripdick","drug","dry hump","dryhump","duche","dudette","dumass","dumb ass","dumbass","dumbasses","dumbbitch","dumbfuck","dumbshit","dummy","dumshit","dune coon","dune coons","dupa","dvda","dyefly","dyke","dykes","dziwka","earotics","easyslut","eat my ass","eat my","eatballs","eatme","eatmyass","eatpussy","ecchi","ejackulate","ejaculate","ejaculated","ejaculates","ejaculating","ejaculatings","ejaculation","ejaculations","ejakulate","ekrem","ekto","enculer","enema","enlargement","erect","erection","ero","erotic","erotism","escort","esqua","essohbee","ethical slut","evl","excrement","exkwew","explosion","extacy","extasy","f u c k e r","f u c k e","f u c k","f u k","f*ck","f-u-c-k","f.u.c.k","f4nny","f_u_c_k","facefucker","fack","faeces","faen","fag","fag1t","fagbag","faget","fagfucker","fagg","fagg1t","fagged","fagging","faggit","faggitt","faggot","faggotcock","faggs","fagit","fagot","fagots","fags","fagt","fagtard","fagz","faig","faigs","faigt","fanculo","fannybandit","fannyflaps","fannyfucker","fanyy","fartknocker","farty","fastfuck","fatah","fatass","fatfuck","fatfucker","fatso","fck","fckcum","fckd","fcuk","fcuker","fcuking","fecal","feces","feck","fecker","feg","felatio","felch","felcher","felching","fellate","fellatio","feltch","feltcher","feltching","female squirting","femalesquirtin","femalesquirting","femdom","fetish","ficken","figging","fingerbang","fingerfood","fingerfuck","fingerfucked","fingerfucker","fingerfuckers","fingerfucking","fingerfucks","fingering","fisted","fister","fistfuck","fistfucked","fistfucker","fistfuckers","fistfucking","fistfuckings","fistfucks","fisting","fisty","fitt","flamer","flange","flasher","flikker","flipping the bird","floo","floozy","flydie","flydye","foad","fok","fondle","foobar","fook","fooker","foot fetish","footaction","footfetish","footfuck","footfucker","footjob","footlicker","footstar","foreskin","forni","fornicate","fotze","foursome","fourtwenty","freakfuck","freakyfucker","freefuck","freex","frigg","frigga","frotting","fubar","fucck","fuck buttons","fuck","fuck-tard","fucka","fuckable","fuckass","fuckbag","fuckbook","fuckboy","fuckbrain","fuckbuddy","fuckbutt","fuckd","fucked","fuckedup","fucker","fuckers","fuckersucker","fuckface","fuckfest","fuckfreak","fuckfriend","fuckhead","fuckheads","fuckher","fuckhole","fuckin","fuckina","fucking","fuckingbitch","fuckings","fuckingshitmotherfucker","fuckinnuts","fuckinright","fuckit","fuckknob","fuckme","fuckmehard","fuckmonkey","fuckn","fucknugget","fucknut","fucknuts","fucknutt","fucknutz","fuckoff","fuckpig","fuckr","fucks","fuckstick","fucktard","fucktards","fuckup","fuckwad","fuckwhit","fuckwhore","fuckwit","fuckwitt","fuckyou","fudge packer","fudgepacker","fugly","fuk","fukah","fuken","fuker","fukin","fuking","fukk","fukkah","fukken","fukker","fukkin","fuks","fuktard","fuktards","fukwhit","fukwit","funeral","funfuck","fungus","futanari","futkretzn","fuuck","fux","fux0r","fvck","fvk","fxck","g-spot","g00k","gae","gai","gang bang","gangbang","gangbanged","gangbanger","gangbangs","gangsta","ganja","gator bait","gatorbait","gay sex","gayboy","gaygirl","gaylord","gaymuthafuckinwhore","gays","gaysex","gayz","geezer","geni","genital","genitals","getiton","gey","gfy","ghay","ghey","giant cock","gigolo","ginzo","ginzos","gipp","gippo","gippos","gipps","girl on top","girl on","girls gone wild","givehead","glans","glazeddonut","goatcx","goatse","gob","god dammit","god damn","god damnit","god-dam","god-damned","godam","godammit","godamn","godamnit","goddam","goddamit","goddamm","goddammit","goddamn","goddamned","goddamnes","goddamnit","goddamnmuthafucker","gokkun","golden shower","goldenshower","golliwog","golliwogs","gonad","gonads","gonorrehea","gonzagas","goo girl","gooch","goodpoop","gook eye","gook eyes","gook","gookeye","gookeyes","gookies","gooks","gooky","gora","goras","goregasm","gotohell","goy","goyim","greaseball","greaseballs","gringo","gringos","groe","groid","groids","grope","gross","grostulation","group sex","gspot","gstring","gtfo","gub","gubba","gubbas","gubs","guido","guiena","guineas","guizi","gummer","guro","gwailo","gwailos","gweilo","gweilos","gyopo","gyopos","gyp","gyped","gypo","gypos","gypp","gypped","gyppie","gyppies","gyppo","gyppos","gyppy","gyppys","gypsys","h e l l","h o m","h00r","h0ar","h0m0","h0mo","h0r","h0re","h4x0r","hadji","hadjis","hairyback","hairybacks","haji","hajis","hajji","hajjis","half breed","half caste","halfbreed","halfcaste","hamas","hand job","handjob","haole","haoles","hapa","hard core","hardcore","hardcoresex","hardon","harem","he11","headfuck","hebe","hebes","heeb","heebs","hell","hells","helvete","henhouse","hentai","heroin","herp","herpes","herpy","heshe","hijacker","hijacking","hillbillies","hillbilly","hindoo","hiscock","hitler","hitlerism","hitlerist","ho","hobag","hodgie","hoe","hoer","hoes","holestuffer","hom0","homey","homicide","homo","homobangers","homodumbshit","homoey","honger","honkers","honkey","honkeys","honkie","honkies","honky","hooch","hooker","hookers","hoor","hoore","hootch","hooter","hooters","hore","hori","horis","hork","horndawg","horndog","horney","horniest","horny","horseshit","hosejob","hoser","hot carl","hot chick","hotcarl","hotdamn","hotpussy","hotsex","hottotrot","how to kill","how to murder","huevon","huge fat","hugefat","hui","hummer","humped","humper","humpher","humphim","humpin","humping","husky","hussy","hustler","hymen","hymie","hymies","iblowu","ike","ikes","ikey","ikeymo","ikeymos","ikwe","illegal","illegals","inbred","incest","indon","indons","injun","injuns","insest","intercourse","interracial","intheass","inthebuff","israels","j3rk0ff","jack off","jack-off","jackass","jackhole","jackoff","jackshit","jacktheripper","jail bait","jailbait","jap","japcrap","japie","japies","japs","jebus","jelly donut","jerk off","jerk","jerk-off","jerk0ff","jerked","jerkoff","jerries","jerry","jesuschrist","jewed","jewess","jig","jiga","jigaboo","jigaboos","jigarooni","jigaroonis","jigg","jigga","jiggabo","jiggaboo","jiggabos","jiggas","jigger","jiggerboo","jiggers","jiggs","jiggy","jigs","jihad","jijjiboo","jijjiboos","jimfish","jisim","jism","jiss","jiz","jizim","jizin","jizjuice","jizm","jizn","jizz","jizzd","jizzed","jizzim","jizzin","jizzn","jizzum","jugg","juggs","jugs","jungle bunnies","jungle bunny","junglebunny","junkie","junky","kacap","kacapas","kacaps","kaffer","kaffir","kaffre","kafir","kanake","kanker","katsap","katsaps","kawk","khokhol","khokhols","kicking","kigger","kike","kikes","killer","kills","kimchis","kinbaku","kink","kinkster","kinky","kissass","kkk","klan","klansman","klansmen","klanswoman","klanswomen","klootzak","knobbing","knobead","knobed","knobend","knobhead","knobjocky","knobjokey","knobz","knockers","knulle","kock","kondum","kondums","kooch","kooches","koon","kootch","krap","krappy","kraut","krauts","kuffar","kuk","kuksuger","kum","kumbubble","kumbullbe","kumer","kummer","kumming","kumquat","kums","kunilingus","kunnilingus","kunt","kunts","kuntz","kurac","kurwa","kushi","kushis","kusi","kwa","kwai lo","kwai los","ky","kyke","kykes","kyopo","kyopos","kyrpa","l3i+ch","l3i\\\\+ch","l3itch","labia","lapdance","lds","leather restraint","leather straight jacket","leather straight","leatherrestraint","lebo","lebos","lech","lemon party","lemonparty","leper","lesbain","lesbayn","lesbian","lesbin","lesbo","lez","lezbe","lezbefriends","lezbian","lezbians","lezbo","lezbos","lezz","lezzian","lezzie","lezzies","lezzo","lezzy","libido","licker","licking","lickme","lilniglet","limey","limpdick","limy","lingerie","lipshits","lipshitz","livesex","lmfao","loadedgun","loin","loins","lolita","lovebone","lovegoo","lovegun","lovejuice","lovemaking","lovemuscle","lovepistol","loverocket","lowlife","lsd","lubejob","lubra","lucifer","luckycammeltoe","lugan","lugans","lust","lusting","lusty","lynch","m-fucking","m0f0","m0fo","m45terbate","ma5terb8","ma5terbate","mabuno","mabunos","macaca","macacas","magicwand","mahbuno","mahbunos","make me come","makemecome","makemecum","male squirting","mamhoon","mams","manhater","manpaste","maricon","maricón","marijuana","masochist","masokist","massa","massterbait","masstrbait","masstrbate","mastabate","mastabater","master-bate","masterb8","masterbaiter","masterbat","masterbat3","masterbate","masterbates","masterbating","masterbation","masterbations","masterblaster","mastrabator","masturbat","masturbate","masturbating","masturbation","mattressprincess","mau mau","mau maus","maumau","maumaus","mcfagget","meatbeatter","meatrack","menage a trois","menage","menses","menstruate","menstruation","merd","meth","mgger","mggor","mibun","mick","mickeyfinn","mideast","mierda","milf","minge","missionary position","missionary","mo-fo","mockey","mockie","mocky","mof0","mofo","moky","molest","molestation","molester","molestor","moneyshot","monkleigh","moolie","moon cricket","moon crickets","mooncricket","mooncrickets","mormon","moron","moskal","moskals","moslem","mosshead","motha fucker","motha fuker","motha fukkah","motha fukker","mothafuck","mothafucka","mothafuckas","mothafuckaz","mothafucked","mothafucker","mothafuckers","mothafuckin","mothafucking","mothafuckings","mothafucks","mother fucker","mother fukah","mother fuker","mother fukkah","mother fukker","mother-fucker","motherfuck","motherfucka","motherfucked","motherfucker","motherfuckers","motherfuckin","motherfucking","motherfuckings","motherfuckka","motherfucks","motherfvcker","motherlovebone","mothrfucker","mouliewop","mound of venus","moundofvenus","mr hands","mrhands","mtherfucker","mthrfuck","mthrfucker","mthrfucking","mtrfck","mtrfuck","mtrfucker","muff diver","muff","muffdive","muffdiver","muffdiving","muffindiver","mufflikcer","muie","mulatto","mulkku","muncher","munging","munt","murder","murderer","muschi","mutha fucker","mutha fukah","mutha fuker","mutha fukkah","mutha fukker","mutha","muthafecker","muthafuckaz","muthafucker","muthafuckker","muther","mutherfucker","mutherfucking","muthrfucking","mzungu","mzungus","n1gga","n1gger","n1gr","nad","nads","naked","nambla","nastt","nasty","nastybitch","nastyho","nastyslut","nastywhore","nawashi","nazi","nazis","nazism","necro","negres","negress","negro","negroes","negroid","negros","neonazi","nepesaurio","nig nog","nig","niga","nigar","nigars","nigas","niger","nigerian","nigerians","nigers","nigette","nigettes","nigg","nigg3r","nigg4h","nigga","niggah","niggahs","niggar","niggaracci","niggard","niggarded","niggarding","niggardliness","niggardlinesss","niggardly","niggards","niggars","niggas","niggaz","nigger","niggerhead","niggerhole","niggers","niggle","niggled","niggles","niggling","nigglings","niggor","niggress","niggresses","nigguh","nigguhs","niggur","niggurs","niglet","nignog","nigor","nigors","nigr","nigra","nigras","nigre","nigres","nigress","nigs","nigur","niiger","niigr","nimphomania","nimrod","ninny","nip","nipple","nipplering","nipples","nips","nittit","nlgger","nlggor","nob jokey","nob","nobhead","nobjocky","nobjokey","nofuckingway","nog","nookey","nookie","nooky","noonan","nooner","nsfw images","nsfw","nude","nudger","nudie","nudies","nudity","numbnuts","nut sack","nutfucker","nutsack","nymph","nympho","nymphomania","o c k","octopussy","omorashi","one cup two girls","one guy one jar","one guy","one jar","ontherag","orafis","oral","orally","orga","orgasim","orgasim;","orgasims","orgasm","orgasmic","orgasms","orgasum","orgies","orgy","oriface","orifice","orifiss","orospu","osama","ovum","ovums","p e n i s","p i s","p u s s y","p.u.s.s.y.","p0rn","packi","packie","packy","paddy","paedophile","paki","pakie","pakis","paky","palesimian","pancake face","pancake faces","panooch","pansies","pansy","panti","pantie","panties","panty","paska","pastie","pasty","payo","pcp","pearlnecklace","peck","pecker","peckerhead","peckerwood","pedo","pedobear","pedophile","pedophilia","pedophiliac","pee","peeenus","peeenusss","peehole","peenus","peepee","peepshow","peepshpw","pegging","peinus","pen1s","penas","pendejo","pendy","penetrate","penetration","peni5","penial","penile","penis","penis-breath","penises","penisfucker","penisland","penislick","penislicker","penispuffer","penthouse","penus","penuus","perse","perv","perversion","peyote","phalli","phallic","phone sex","phonesex","phuc","phuck","phuk","phuked","phuker","phuking","phukked","phukker","phukking","phuks","phungky","phuq","pi55","picaninny","piccaninny","picka","pickaninnies","pickaninny","piece of shit","pieceofshit","piefke","piefkes","pierdol","pigfucker","piker","pikey","piky","pillowbiter","pillu","pimmel","pimp","pimped","pimper","pimpis","pimpjuic","pimpjuice","pimpsimp","pindick","pinko","pis","pises","pisin","pising","pisof","piss pig","piss","piss-off","pissed","pisser","pissers","pisses","pissflaps","pisshead","pissin","pissing","pissoff","pisspig","pistol","pizda","playboy","playgirl","pleasure chest","pleasurechest","pms","pocha","pochas","pocho","pochos","pocketpool","pohm","pohms","polac","polack","polacks","polak","pole smoker","polesmoker","pollock","pollocks","pommie grant","pommie grants","pommie","pommies","pommy","ponyplay","poo","poof","poon","poonani","poonany","poontang","poontsee","poop chute","poop","poopchute","pooper","pooperscooper","pooping","poorwhitetrash","popimp","porch monkey","porch monkies","porchmonkey","porn","pornflick","pornking","porno","pornography","pornos","pornprincess","pound town","poundtown","pplicker","pr0n","pr1c","pr1ck","pr1k","prairie nigger","prairie niggers","premature","preteen","pric","prick","prickhead","pricks","prig","prince albert piercing","pron","propaganda","prostitute","pthc","pu55i","pu55y","pube","pubes","pubic","pubiclice","pubis","pud","pudboy","pudd","puddboy","puke","pula","pule","punanny","punany","punkass","punky","punta","puntang","purinapricness","pusies","puss","pusse","pussee","pussi","pussie","pussies","pussy","pussycat","pussydestroyer","pussyeater","pussyfucker","pussylicker","pussylicking","pussylips","pussylover","pussypounder","pussys","pusy","puta","puto","puuke","puuker","qahbeh","quashie","queaf","queef","queero","queers","queerz","quickie","quicky","quiff","quim","qweers","qweerz","qweir","r-tard","r-tards","r5e","ra8s","racial","radicals","raghead","ragheads","raging boner","raging","ragingboner","randy","rape","raped","raper","raping","rapist","raunch","rautenberg","rearend","rearentry","recktum","rectal","rectum","rectus","redleg","redlegs","redlight","redneck","rednecks","redskin","redskins","reefer","reestie","reetard","refugee","reich","renob","rentafuck","rere","retard","retarded","retards","retardz","reverse cowgirl","reversecowgirl","rigger","rimjaw","rimjob","rimming","ritard","rosebuds","rosy palm and her 5 sisters","rosy palm","rosypalm","rosypalmandher5sisters","rosypalmandherefivesisters","round eyes","roundeye","rtard","rtards","rump","rumprammer","ruski","russki","russkie","rusty trombone","rustytrombone","s h i t","s hit","s&m","s-h-1-t","s-h-i-t","s-o-b","s.h.i.t.","s.o.b.","s0b","s_h_i_t","sac","sack","sadis","sadism","sadist","sadom","sambo","sambos","samckdaddy","sanchez","sand nigger","sand niggers","sandm","sandnigger","santorum","scag","scallywag","scank","scantily","scat","schaffer","scheiss","schizo","schlampe","schlong","schmuck","schvartse","schvartsen","schwartze","schwartzen","scissoring","screwed","screwing","screwyou","scroat","scrog","scrot","scrote","scrotum","scrud","seduce","semen","seppo","seppos","septics","sex","sexed","sexfarm","sexhound","sexhouse","sexi","sexing","sexkitten","sexo","sexpot","sexslave","sextogo","sextoy","sextoys","sexual","sexually","sexwhore","sexx","sexxi","sexxx","sexxxi","sexxxy","sexxy","sexy","sexymoma","sexyslim","sh!+","sh!t","sh1t","sh1ter","sh1ts","sh1tter","sh1tz","shag","shagger","shaggin","shagging","shamedame","sharmuta","sharmute","shat","shav","shaved beaver","shaved pussy","shaved","shavedbeaver","shavedpussy","shawtypimp","sheeney","shemale","shhit","shi+","shibari","shinola","shipal","shit","shitass","shitbag","shitbagger","shitblimp","shitbrain","shitbreath","shitcan","shitcunt","shitdick","shite","shiteater","shited","shitey","shitface","shitfaced","shitfit","shitforbrains","shitfuck","shitfucker","shitfull","shithapens","shithappens","shithead","shithole","shithouse","shiting","shitings","shitlist","shitola","shitoutofluck","shits","shitspitter","shitstain","shitt","shitted","shitter","shitters","shittiest","shitting","shittings","shitty","shity","shitz","shiz","shiznit","shortfuck","shota","shrimping","shylock","shylocks","shyt","shyte","shytty","shyty","sissy","sixsixsix","sixtynine","sixtyniner","skag","skanck","skank","skankbitch","skankee","skankey","skankfuck","skanks","skankwhore","skanky","skankybitch","skankywhore","skeet","skinflute","skribz","skullfuck","skum","skumbag","skurwysyn","skwa","skwe","slag","slant","slanteye","slanty","slapper","slaughter","slave","slavedriver","sleaze","sleazy","sleezebag","sleezeball","slideitin","slimeball","slimebucket","slopehead","slopeheads","sloper","slopers","slopes","slopey","slopeys","slopies","slopy","slut","slutbag","slutdumper","slutkiss","sluts","slutt","slutting","slutty","slutwear","slutwhore","slutz","smack","smackthemonkey","smeg","smegma","smoker","smut","smutty","snatch","snatchpatch","snigger","sniggered","sniggering","sniggers","sniper","snowback","snowballing","snownigger","snuff","sob","socksucker","sodom","sodomise","sodomite","sodomize","sodomy","son of a bitch","son-of-a-bitch","sonofabitch","sonofbitch","sooties","sooty","souse","soused","spac","spade","spades","spaghettibender","spaghettinigger","spank","spankthemonkey","spearchucker","spearchuckers","sperm","spermacide","spermbag","spermhearder","spermherder","sphencter","spic","spick","spicks","spics","spierdalaj","spig","spigotty","spik","spiks","spitter","splittail","splooge moose","splooge","spludge","spooge","spread legs","spreadeagle","spunk","spunky","sqeh","squa","squarehead","squareheads","squaw","squinty","squirting","stagg","steamy","stfu","stiffy","stoned","stoner","strap on","strapon","strappado","stringer","strip club","stripclub","stroke","stroking","stuinties","stupid","stupidfuck","stupidfucker","style doggy","suck","suckdick","sucked","sucker","sucking","suckme","suckmyass","suckmydick","suckmytit","suckoff","sucks","suicide girl","suicide girls","suicide","suicidegirl","suicidegirls","suka","sultry women","sultry","sultrywoman","sultrywomen","sumofabiatch","swallow","swallower","swalow","swamp guinea","swamp guineas","swastika","swinger","syphilis","t i t","t i ts","t1t","t1tt1e5","t1tties","taboo","tacohead","tacoheads","taff","tainted love","tainted","take off your","tantra","tar babies","tar baby","tarbaby","tard","taste my","tastemy","tawdry","tea bagging","teabagging","teat","teets","teez","terd","terror","terrorist","teste","testee","testes","testical","testicle","testicles","testis","thicklip","thicklips","thirdeye","thirdleg","threesome","threeway","throat","throating","thrust","thug","thundercunt","ti","tied up","tight white","timber nigger","timber niggers","timbernigger","tinkle","tit","titbitnipply","titfuck","titfucker","titfuckin","titi","titjob","titlicker","titlover","tits","titt","tittie","tittie5","tittiefucker","titties","tittis","titty","tittyfuck","tittyfucker","tittys","tittywank","titwank","tity","to murder","toke","tongethruster","tongue in a","tongueina","tonguethrust","tonguetramp","toots","topless","tortur","torture","tosser","towel head","towel heads","towelhead","trailertrash","tramp","trannie","tranny","transsexual","transvestite","trashy","tribadism","triplex","trisexual","trois","trojan","trombone","trots","tub girl","tubgirl","tuckahoe","tunneloflove","turd","turnon","tush","tushy","tw4t","twat","twathead","twatlips","twats","twatty","twatwaffle","twink","twinkie","two girls one cup","twobitwhore","twunt","twunter","udge packer","ukrop","uncle tom","unclefucker","undies","undressing","unfuckable","unwed","upskirt","uptheass","upthebutt","urethra play","urethra","urethraplay","urinal","urinary","urinate","urine","urophilia","usama","ussys","uzi","v a g i n a","v14gra","v1gra","v4gra","va-j-j","va1jina","vag","vag1na","vagiina","vagina","vaginal","vaj1na","vajina","valium","venus mound","vgra","viagra","vibe","vibr","vibrater","vibrator","vietcong","violet wand","virgin","virginbreaker","vittu","vixen","vjayjay","vodka","vomit","vorarephilia","voyeur","vulgar","vullva","vulva","w00se","w0p","wab","wad","wang","wank","wanker","wanking","wanky","waysted","wazoo","wedgie","weed","weenie","weewee","weiner","weirdo","welcher","wench","wet dream","wetb","wetback","wetbacks","wetdream","wetspot","wh00r","wh0re","wh0reface","whacker","whash","whigger","whiggers","whiskeydick","whiskydick","whit","white power","white trash","whitenigger","whitepower","whites","whitetrash","whitey","whiteys","whities","whiz","whoar","whop","whoralicious","whore","whorealicious","whorebag","whored","whoreface","whorefucker","whorehopper","whorehouse","whores","whoring","wichser","wigga","wiggas","wigger","wiggers","willie","willies","williewanker","willy","wn","wog","wogs","woody","wop","wrapping men","wrinkled starfish","wtf","wuss","wuzzie","x-rated","xkwe","xrated","xtc","xx","xxx","xxxxxx","yank","yaoi","yarpie","yarpies","yeasty","yed","yellow showers","yellowman","yellowshowers","yid","yids","yiffy","yobbo","yourboobs","yourpenis","yourtits","zabourah","zigabo","zigabos","zipperhead","zipperheads","zoophile","zoophilia","🖕"]')},function(e,t,n){"use strict";n.r(t);n(108)},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(7),o=(r=n(18))&&"object"==typeof r&&"default"in r?r.default:r,a=n(20),s=n(12),c=n(109),l=n(19),u=new a.Logger("@firebase/firestore");function h(){return u.logLevel}function d(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(u.logLevel<=a.LogLevel.DEBUG){var r=t.map(m);u.debug.apply(u,i.__spreadArrays(["Firestore (7.19.0): "+e],r))}}function p(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(u.logLevel<=a.LogLevel.ERROR){var r=t.map(m);u.error.apply(u,i.__spreadArrays(["Firestore (7.19.0): "+e],r))}}function f(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(u.logLevel<=a.LogLevel.WARN){var r=t.map(m);u.warn.apply(u,i.__spreadArrays(["Firestore (7.19.0): "+e],r))}}function m(e){if("string"==typeof e)return e;try{return t=e,JSON.stringify(t)}catch(t){return e}+i.registerVersion("firebase","7.19.0","app"),e.exports=i},function(e,t){e.exports="#define T time * 0.06\nvarying vec2 uvs;\nuniform float time;\nuniform float thickness;\nvoid main() {\n uvs.xy = uv.xy;\n vec3 pos = position;\n\n pos.x *= thickness + sin(T) * ((0.1 + uv.x) * 16.0 + uv.y * 4.9) * thickness * 0.005;\n pos.z *= thickness + cos(T) * ((0.1 + uv.x) * 13.0 + uv.y * 14.9) * thickness * 0.005;\n\n gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);\n}"},function(e,t){e.exports="varying vec2 uvs;\nuniform sampler2D src;\nuniform vec3 color;\nuniform float time;\n\n#define T time * 0.04\n\nvoid main() {\n vec2 uv = uvs;\n uv += T * 0.05;\n vec3 col = texture2D(src, uv).xyz;\n float core = step(0.125, uvs.x);\n gl_FragColor = vec4(col * color, mix(1.0, 0.07, core));\n}"},function(e,t){e.exports="varying vec2 uvs;\nuniform sampler2D src;\nuniform vec3 color;\nuniform float time;\n\n#define T time * 0.03\n\nvoid main() {\n vec3 col = texture2D(src, uvs * vec2(1.0, 0.7) + vec2(T * 0.01, T * 0.05)).xyz;\n gl_FragColor = vec4(col * color, 0.4 * uvs.y);\n}\n"},function(e,t){e.exports=function(e){if(e.converted)return e;e.map&&(e=e.map),e.version=e.versions[0].hash,e.directDownload=e.versions[0].downloadURL,e.coverURL=e.versions[0].coverURL.replace(/^https?:\/\/[^/]+\//,"https://eu.cdn.beatsaver.com/");let t=e.versions[0].diffs;e.metadata.characteristics={};for(const n of t)void 0===e.metadata.characteristics[n.characteristic]&&(e.metadata.characteristics[n.characteristic]={}),e.metadata.characteristics[n.characteristic][n.difficulty]=n;return e.metadata.characteristics=JSON.stringify(e.metadata.characteristics),e.converted=!0,e}},,,,,,,,,,,,function(e,t,n){function r(e){e.keys().forEach(e)}console.time=()=>{},console.timeEnd=()=>{},n(42),n(43),n(44),n(45),n(46),n(47),n(49),n(50),AFRAME.log=()=>{},n(52),n(54),n(55),n(56),n(57),n(58),r(n(59)),r(n(197)),n(201),n(208),e.hot.accept(),"http:"!==window.location.protocol||window.location.host.startsWith("localhost")||window.location.replace("https:"+location.href.substring(location.protocol.length))},function(e,t){THREE.BufferGeometryUtils={computeTangents:function(e){var t=e.index,n=e.attributes;if(null!==t&&void 0!==n.position&&void 0!==n.normal&&void 0!==n.uv){var r=t.array,i=n.position.array,o=n.normal.array,a=n.uv.array,s=i.length/3;void 0===n.tangent&&e.addAttribute("tangent",new THREE.BufferAttribute(new Float32Array(4*s),4));for(var c=n.tangent.array,l=[],u=[],h=0;h<s;h++)l[h]=new THREE.Vector3,u[h]=new THREE.Vector3;var d=new THREE.Vector3,p=new THREE.Vector3,f=new THREE.Vector3,m=new THREE.Vector2,g=new THREE.Vector2,y=new THREE.Vector2,v=new THREE.Vector3,b=new THREE.Vector3,_=e.groups;0===_.length&&(_=[{start:0,count:r.length}]);for(var w=0,E=_.length;w<E;++w)for(var A=O=(P=_[w]).start,x=O+P.count;A<x;A+=3)N(r[A+0],r[A+1],r[A+2]);var S,T,M,R=new THREE.Vector3,C=new THREE.Vector3,k=new THREE.Vector3,I=new THREE.Vector3;for(w=0,E=_.length;w<E;++w){var P,O;for(A=O=(P=_[w]).start,x=O+P.count;A<x;A+=3)D(r[A+0]),D(r[A+1]),D(r[A+2])}}else console.warn("THREE.BufferGeometry: Missing required attributes (index, position, normal or uv) in BufferGeometry.computeTangents()");function N(e,t,n){d.fromArray(i,3*e),p.fromArray(i,3*t),f.fromArray(i,3*n),m.fromArray(a,2*e),g.fromArray(a,2*t),y.fromArray(a,2*n);var r=p.x-d.x,o=f.x-d.x,s=p.y-d.y,c=f.y-d.y,h=p.z-d.z,_=f.z-d.z,w=g.x-m.x,E=y.x-m.x,A=g.y-m.y,x=y.y-m.y,S=1/(w*x-E*A);v.set((x*r-A*o)*S,(x*s-A*c)*S,(x*h-A*_)*S),b.set((w*o-E*r)*S,(w*c-E*s)*S,(w*_-E*h)*S),l[e].add(v),l[t].add(v),l[n].add(v),u[e].add(b),u[t].add(b),u[n].add(b)}function D(e){k.fromArray(o,3*e),I.copy(k),T=l[e],R.copy(T),R.sub(k.multiplyScalar(k.dot(T))).normalize(),C.crossVectors(I,T),M=C.dot(u[e]),S=M<0?-1:1,c[4*e]=R.x,c[4*e+1]=R.y,c[4*e+2]=R.z,c[4*e+3]=S}},mergeBufferGeometries:function(e,t){for(var n=null!==e[0].index,r=new Set(Object.keys(e[0].attributes)),i=new Set(Object.keys(e[0].morphAttributes)),o={},a={},s=new THREE.BufferGeometry,c=0,l=0;l<e.length;++l){var u=e[l];if(n!==(null!==u.index))return null;for(var h in u.attributes){if(!r.has(h))return null;void 0===o[h]&&(o[h]=[]),o[h].push(u.attributes[h])}for(var h in u.morphAttributes){if(!i.has(h))return null;void 0===a[h]&&(a[h]=[]),a[h].push(u.morphAttributes[h])}if(s.userData.mergedUserData=s.userData.mergedUserData||[],s.userData.mergedUserData.push(u.userData),t){var d;if(n)d=u.index.count;else{if(void 0===u.attributes.position)return null;d=u.attributes.position.count}s.addGroup(c,d,l),c+=d}}if(n){var p=0,f=[];for(l=0;l<e.length;++l){var m=e[l].index;if(p>0){m=m.clone();for(var g=0;g<m.count;++g)m.setX(g,m.getX(g)+p)}f.push(m),p+=e[l].attributes.position.count}var y=this.mergeBufferAttributes(f);if(!y)return null;s.index=y}for(var h in o){var v=this.mergeBufferAttributes(o[h]);if(!v)return null;s.addAttribute(h,v)}for(var h in a){var b=a[h][0].length;if(0===b)break;s.morphAttributes=s.morphAttributes||{},s.morphAttributes[h]=[];for(l=0;l<b;++l){var _=[];for(g=0;g<a[h].length;++g)_.push(a[h][g][l]);var w=this.mergeBufferAttributes(_);if(!w)return null;s.morphAttributes[h].push(w)}}return s},mergeBufferAttributes:function(e){for(var t,n,r,i=0,o=0;o<e.length;++o){var a=e[o];if(a.isInterleavedBufferAttribute)return null;if(void 0===t&&(t=a.array.constructor),t!==a.array.constructor)return null;if(void 0===n&&(n=a.itemSize),n!==a.itemSize)return null;if(void 0===r&&(r=a.normalized),r!==a.normalized)return null;i+=a.array.length}for(var s=new t(i),c=0,l=0;l<e.length;++l)s.set(e[l].array,c),c+=e[l].array.length;return new THREE.BufferAttribute(s,n,r)},toTrianglesDrawMode:function(e,t){if(t===THREE.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),e;if(t===THREE.TriangleFanDrawMode||t===THREE.TriangleStripDrawMode){var n=e.getIndex();if(null===n){var r=[],i=e.getAttribute("position");if(void 0===i)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e;for(var o=0;o<i.count;o++)r.push(o);e.setIndex(r),n=e.getIndex()}var a=n.count-2,s=[];if(t===THREE.TriangleFanDrawMode)for(o=1;o<=a;o++)s.push(n.getX(0)),s.push(n.getX(o)),s.push(n.getX(o+1));else for(o=0;o<a;o++)o%2==0?(s.push(n.getX(o)),s.push(n.getX(o+1)),s.push(n.getX(o+2))):(s.push(n.getX(o+2)),s.push(n.getX(o+1)),s.push(n.getX(o)));s.length/3!==a&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");var c=e.clone();return c.setIndex(s),c.clearGroups(),c}return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",t),e}}},function(e,t){if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");const n={childList:!0,attributes:!0,subtree:!0};AFRAME.registerComponent("aabb-collider",{schema:{collideNonVisible:{default:!1},debug:{default:!1},enabled:{default:!0},interval:{default:80},objects:{default:""}},init:function(){this.centerDifferenceVec3=new THREE.Vector3,this.clearedIntersectedEls=[],this.closestIntersectedEl=null,this.boundingBox=new THREE.Box3,this.boxCenter=new THREE.Vector3,this.boxHelper=new THREE.BoxHelper,this.boxMax=new THREE.Vector3,this.boxMin=new THREE.Vector3,this.hitClosestClearEventDetail={},this.hitClosestEventDetail={},this.intersectedEls=[],this.objectEls=[],this.newIntersectedEls=[],this.prevCheckTime=void 0,this.previousIntersectedEls=[],this.setDirty=this.setDirty.bind(this),this.observer=new MutationObserver(this.setDirty),this.dirty=!0,this.hitStartEventDetail={intersectedEls:this.newIntersectedEls}},play:function(){this.observer.observe(this.el.sceneEl,n),this.el.sceneEl.addEventListener("object3dset",this.setDirty),this.el.sceneEl.addEventListener("object3dremove",this.setDirty)},remove:function(){this.observer.disconnect(),this.el.sceneEl.removeEventListener("object3dset",this.setDirty),this.el.sceneEl.removeEventListener("object3dremove",this.setDirty)},tick:function(e){const t=this.boundingBox,n=this.centerDifferenceVec3,r=this.clearedIntersectedEls,i=this.el,o=this.intersectedEls,a=this.newIntersectedEls,s=this.objectEls,c=this.prevCheckTime,l=this.previousIntersectedEls;let u,h,d;if(this.data.enabled&&!(c&&e-c<this.data.interval)){for(this.prevCheckTime=e,this.dirty&&this.refreshObjects(),t.setFromObject(i.object3D),this.boxMin.copy(t.min),this.boxMax.copy(t.max),t.getCenter(this.boxCenter),this.data.debug&&(this.boxHelper.setFromObject(i.object3D),this.boxHelper.parent||i.sceneEl.object3D.add(this.boxHelper)),function(e,t){e.length=0;for(let n=0;n<t.length;n++)e[n]=t[n]}(l,o),o.length=0,d=0;d<s.length;d++)if(s[d]!==this.el)if(this.data.collideNonVisible||s[d].getAttribute("visible"))this.isIntersecting(s[d])&&o.push(s[d]);else if(this.data.debug){const e=s[d].object3D.boxHelper;e&&(i.sceneEl.object3D.remove(e),s[d].object3D.boxHelper=null)}for(a.length=0,d=0;d<o.length;d++)-1===l.indexOf(o[d])&&a.push(o[d]);for(r.length=0,d=0;d<l.length;d++)-1===o.indexOf(l[d])&&(l[d].hasAttribute("aabb-collider")||l[d].emit("hitend"),r.push(l[d]));for(d=0;d<a.length;d++)a[d]!==this.el&&(a[d].hasAttribute("aabb-collider")||a[d].emit("hitstart"));for(d=0;d<o.length;d++)o[d]!==this.el&&(n.copy(o[d].object3D.boundingBoxCenter).sub(this.boxCenter),(void 0===u||n.length()<u)&&(u=n.length(),h=o[d]));!o.length&&this.closestIntersectedEl?(this.hitClosestClearEventDetail.el=this.closestIntersectedEl,this.closestIntersectedEl.emit("hitclosestclear"),this.closestIntersectedEl=null,i.emit("hitclosestclear",this.hitClosestClearEventDetail)):h!==this.closestIntersectedEl&&(this.closestIntersectedEl&&(this.hitClosestClearEventDetail.el=this.closestIntersectedEl,this.closestIntersectedEl.emit("hitclosestclear",this.hitClosestClearEventDetail)),h&&(h.emit("hitclosest"),this.closestIntersectedEl=h,this.hitClosestEventDetail.el=h,i.emit("hitclosest",this.hitClosestEventDetail))),r.length&&i.emit("hitend"),a.length&&i.emit("hitstart",this.hitStartEventDetail)}},isIntersecting:function(){const e=new THREE.Box3;return function(t){let n;t.dataset.aabbColliderDynamic&&(e.setFromObject(t.object3D),n=e,t.object3D.boundingBoxCenter=t.object3D.boundingBoxCenter||new THREE.Vector3,n.getCenter(t.object3D.boundingBoxCenter)),t.dataset.aabbColliderDynamic||(t.object3D.aabbBox||(t.object3D.aabbBox=(new THREE.Box3).setFromObject(t.object3D),t.object3D.boundingBoxCenter=new THREE.Vector3,t.object3D.aabbBox.getCenter(t.object3D.boundingBoxCenter)),n=t.object3D.aabbBox),this.data.debug&&(t.object3D.boxHelper||(t.object3D.boxHelper=new THREE.BoxHelper(t.object3D,new THREE.Color(Math.random(),Math.random(),Math.random())),t.sceneEl.object3D.add(t.object3D.boxHelper)),t.object3D.boxHelper.setFromObject(t.object3D));const r=n.min,i=n.max;return this.boxMin.x<=i.x&&this.boxMax.x>=r.x&&this.boxMin.y<=i.y&&this.boxMax.y>=r.y&&this.boxMin.z<=i.z&&this.boxMax.z>=r.z}}(),setDirty:function(){this.dirty=!0},refreshObjects:function(){const e=this.data;this.objectEls=e.objects?this.el.sceneEl.querySelectorAll(e.objects):this.el.sceneEl.children,this.dirty=!1}})},function(e,t){var n=[new THREE.Vector2,new THREE.Vector2,new THREE.Vector2,new THREE.Vector2];function r(e,t,r,i){const o=1/i,a=1/r;return n[0].set(o*t,a*e+a),n[1].set(o*t,a*e),n[2].set(o*t+o,a*e),n[3].set(o*t+o,a*e+a),n}AFRAME.registerComponent("atlas-uvs",{dependencies:["geometry"],schema:{totalColumns:{type:"int",default:1},totalRows:{type:"int",default:1},column:{type:"int",default:1},row:{type:"int",default:1}},update:function(){const e=this.data,t=r(e.row-1,e.column-1,e.totalRows,e.totalColumns),n=this.el.getObject3D("mesh").geometry;var i=new Float32Array([t[0].x,t[0].y,t[3].x,t[3].y,t[1].x,t[1].y,t[2].x,t[2].y]);n.setAttribute("uv",new THREE.BufferAttribute(i,2)),n.uvsNeedUpdate=!0}}),AFRAME.registerComponent("dynamic-texture-atlas",{schema:{canvasId:{default:"dynamicAtlas"},canvasHeight:{default:1024},canvasWidth:{default:1024},debug:{default:!1},numColumns:{default:8},numRows:{default:8}},multiple:!0,init:function(){const e=this.canvas=document.createElement("canvas");e.id=this.data.canvasId,e.height=this.data.canvasHeight,e.width=this.data.canvasWidth,this.ctx=e.getContext("2d"),document.body.appendChild(e),this.data.debug&&(e.style.left=0,e.style.top=0,e.style.position="fixed",e.style.zIndex=9999999999)},drawTexture:function(e,t,n,i,o){const a=this.canvas,s=this.data;e.complete||(e.onload=()=>{this.drawTexture(e,t,n)});const c=o||a.height/s.numRows,l=i||a.width/s.numColumns;return this.ctx.drawImage(e,l*t,l*n,l,c),r(t,n,s.numRows,s.numColumns)}}),e.exports.getGridUvs=r},function(e,t){if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");var n={};AFRAME.registerComponent("audioanalyser",{schema:{buffer:{default:!1},beatDetectionDecay:{default:.99},beatDetectionMinVolume:{default:15},beatDetectionThrottle:{default:250},cache:{default:!1},enabled:{default:!0},enableBeatDetection:{default:!0},enableLevels:{default:!0},enableWaveform:{default:!0},enableVolume:{default:!0},fftSize:{default:2048},smoothingTimeConstant:{default:.8},src:{parse:function(e){return e.constructor!==String?e:e.startsWith("#")||e.startsWith(".")?document.querySelector(e):e}},unique:{default:!1}},init:function(){this.audioEl=null,this.levels=null,this.waveform=null,this.volume=0,this.xhr=null,this.initContext()},update:function(e){var t=this.analyser,n=this.data;e.fftSize===n.fftSize&&e.smoothingTimeConstant===n.smoothingTimeConstant||(t.fftSize=n.fftSize,t.smoothingTimeConstant=n.smoothingTimeConstant,this.levels=new Uint8Array(t.frequencyBinCount),this.waveform=new Uint8Array(t.fftSize)),n.src&&this.refreshSource()},tick:function(e,t){var n,r=this.data;if(r.enabled){if((r.enableLevels||r.enableVolume)&&this.analyser.getByteFrequencyData(this.levels),r.enableWaveform&&this.analyser.getByteTimeDomainData(this.waveform),r.enableVolume||r.enableBeatDetection){for(var i=0,o=0;o<this.levels.length;o++)i+=this.levels[o];this.volume=i/this.levels.length}r.enableBeatDetection&&(n=this.volume,this.beatCutOff||(this.beatCutOff=n),n>this.beatCutOff&&n>this.data.beatDetectionMinVolume?(this.el.emit("audioanalyserbeat",null,!1),this.beatCutOff=1.5*n,this.beatTime=0):this.beatTime<=this.data.beatDetectionThrottle?this.beatTime+=t:(this.beatCutOff*=this.data.beatDetectionDecay,this.beatCutOff=Math.max(this.beatCutOff,this.data.beatDetectionMinVolume)))}},initContext:function(){var e,t=this.data;this.context=new(window.webkitAudioContext||window.AudioContext),e=this.analyser=this.context.createAnalyser(),(this.gainNode=this.context.createGain()).connect(e),e.connect(this.context.destination),e.fftSize=t.fftSize,e.smoothingTimeConstant=t.smoothingTimeConstant,this.levels=new Uint8Array(e.frequencyBinCount),this.waveform=new Uint8Array(e.fftSize)},refreshSource:function(){this.analyser;var e=this.data;e.buffer&&e.src.constructor===String?this.getBufferSource().then(e=>{this.source=e,this.source.connect(this.gainNode)}):(this.source=this.getMediaSource(),this.source.connect(this.gainNode))},suspendContext:function(){this.context.suspend()},resumeContext:function(){this.context.resume()},fetchAudioBuffer:function(e){return n[e]?n[e].constructor===Promise?n[e]:Promise.resolve(n[e]):(this.data.cache||Object.keys(n).forEach((function(e){delete n[e]})),n[e]=new Promise(t=>{const r=this.xhr=new XMLHttpRequest;r.open("GET",e),r.responseType="arraybuffer",r.addEventListener("load",()=>{function i(r){n[e]=r,t(r)}const o=this.context.decodeAudioData(r.response,i);o&&o.constructor===Promise&&o.then(i).catch(console.error)}),r.send()}),n[e])},getBufferSource:function(){var e=this.data;return this.fetchAudioBuffer(e.src).then(()=>{var t;return(t=this.context.createBufferSource()).buffer=n[e.src],this.el.emit("audioanalyserbuffersource",t,!1),t}).catch(console.error)},getMediaSource:function(){const e={};return function(){const t=this.data.src.constructor===String?this.data.src:this.data.src.src;if(e[t])return e[t];this.data.src.constructor===String?(this.audio=document.createElement("audio"),this.audio.crossOrigin="anonymous",this.audio.setAttribute("src",this.data.src)):this.audio=this.data.src;const n=this.context.createMediaElementSource(this.audio);return e[t]=n,n}}()})},function(e,t){var n=AFRAME.utils.styleParser;if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");AFRAME.registerComponent("event-set",{schema:{default:"",parse:function(e){return n.parse(e)}},multiple:!0,init:function(){this.eventHandler=null,this.eventName=null},update:function(e){this.removeEventListener(),this.updateEventListener(),this.addEventListener()},remove:function(){this.removeEventListener()},pause:function(){this.removeEventListener()},play:function(){this.addEventListener()},updateEventListener:function(){var e,t,n,r=this.data,i=this.el;e=r._event||this.id,t=r._target,n=t?i.sceneEl.querySelector(t):i,this.eventName=e;const o=()=>{var e;for(e in r)"_event"!==e&&"_target"!==e&&AFRAME.utils.entity.setComponentProperty.call(this,n,e,r[e])};isNaN(r._delay)?this.eventHandler=o:this.eventHandler=()=>{setTimeout(o,parseFloat(r._delay))}},addEventListener:function(){this.el.addEventListener(this.eventName,this.eventHandler)},removeEventListener:function(){this.el.removeEventListener(this.eventName,this.eventHandler)}})},function(e,t,n){THREE.BufferGeometryUtils||n(48),AFRAME.registerComponent("geometry-merger",{schema:{preserveOriginal:{default:!1}},init:function(){var e=this;this.geometry=new THREE.Geometry,this.mesh=new THREE.Mesh(this.geometry),this.el.setObject3D("mesh",this.mesh),this.faceIndex={},this.vertexIndex={},this.el.object3D.traverse((function(t){"Mesh"===t.type&&t!==e.mesh&&(e.faceIndex[t.parent.uuid]=[e.geometry.faces.length,e.geometry.faces.length+t.geometry.faces.length-1],e.vertexIndex[t.parent.uuid]=[e.geometry.vertices.length,e.geometry.vertices.length+t.geometry.vertices.length-1],t.parent.updateMatrix(),e.geometry.merge(t.geometry,t.parent.matrix),e.data.preserveOriginal||t.parent.remove(t))}))}}),AFRAME.registerComponent("buffer-geometry-merger",{schema:{preserveOriginal:{default:!1}},init:function(){var e=[];this.el.sceneEl.object3D.updateMatrixWorld(),this.el.object3D.traverse((function(t){"Mesh"===t.type&&t.el!==self.el&&(t.geometry.applyMatrix(t.matrixWorld),e.push(t.geometry.clone()),t.parent.remove(t))}));const t=THREE.BufferGeometryUtils.mergeBufferGeometries(e);this.mesh=new THREE.Mesh(t),this.el.setObject3D("mesh",this.mesh)}})},function(e,t){THREE.BufferGeometryUtils={computeTangents:function(e){var t=e.index,n=e.attributes;if(null!==t&&void 0!==n.position&&void 0!==n.normal&&void 0!==n.uv){var r=t.array,i=n.position.array,o=n.normal.array,a=n.uv.array,s=i.length/3;void 0===n.tangent&&e.addAttribute("tangent",new THREE.BufferAttribute(new Float32Array(4*s),4));for(var c=n.tangent.array,l=[],u=[],h=0;h<s;h++)l[h]=new THREE.Vector3,u[h]=new THREE.Vector3;var d=new THREE.Vector3,p=new THREE.Vector3,f=new THREE.Vector3,m=new THREE.Vector2,g=new THREE.Vector2,y=new THREE.Vector2,v=new THREE.Vector3,b=new THREE.Vector3,_=e.groups;0===_.length&&(_=[{start:0,count:r.length}]);h=0;for(var w=_.length;h<w;++h)for(var E=P=(I=_[h]).start,A=P+I.count;E<A;E+=3)O(r[E+0],r[E+1],r[E+2]);var x,S,T,M=new THREE.Vector3,R=new THREE.Vector3,C=new THREE.Vector3,k=new THREE.Vector3;for(h=0,w=_.length;h<w;++h){var I,P;for(E=P=(I=_[h]).start,A=P+I.count;E<A;E+=3)N(r[E+0]),N(r[E+1]),N(r[E+2])}}else console.warn("THREE.BufferGeometry: Missing required attributes (index, position, normal or uv) in BufferGeometry.computeTangents()");function O(e,t,n){d.fromArray(i,3*e),p.fromArray(i,3*t),f.fromArray(i,3*n),m.fromArray(a,2*e),g.fromArray(a,2*t),y.fromArray(a,2*n);var r=p.x-d.x,o=f.x-d.x,s=p.y-d.y,c=f.y-d.y,h=p.z-d.z,_=f.z-d.z,w=g.x-m.x,E=y.x-m.x,A=g.y-m.y,x=y.y-m.y,S=1/(w*x-E*A);v.set((x*r-A*o)*S,(x*s-A*c)*S,(x*h-A*_)*S),b.set((w*o-E*r)*S,(w*c-E*s)*S,(w*_-E*h)*S),l[e].add(v),l[t].add(v),l[n].add(v),u[e].add(b),u[t].add(b),u[n].add(b)}function N(e){C.fromArray(o,3*e),k.copy(C),S=l[e],M.copy(S),M.sub(C.multiplyScalar(C.dot(S))).normalize(),R.crossVectors(k,S),T=R.dot(u[e]),x=T<0?-1:1,c[4*e]=M.x,c[4*e+1]=M.y,c[4*e+2]=M.z,c[4*e+3]=x}},mergeBufferGeometries:function(e,t){for(var n=null!==e[0].index,r=new Set(Object.keys(e[0].attributes)),i=new Set(Object.keys(e[0].morphAttributes)),o={},a={},s=new THREE.BufferGeometry,c=0,l=0;l<e.length;++l){var u=e[l];if(n!==(null!==u.index))return null;for(var h in u.attributes){if(!r.has(h))return null;void 0===o[h]&&(o[h]=[]),o[h].push(u.attributes[h])}for(var h in u.morphAttributes){if(!i.has(h))return null;void 0===a[h]&&(a[h]=[]),a[h].push(u.morphAttributes[h])}if(s.userData&&(s.userData.mergedUserData=s.userData.mergedUserData||[],s.userData.mergedUserData.push(u.userData)),t){var d;if(n)d=u.index.count;else{if(void 0===u.attributes.position)return null;d=u.attributes.position.count}s.addGroup(c,d,l),c+=d}}if(n){var p=0,f=[];for(l=0;l<e.length;++l){for(var m=e[l].index,g=0;g<m.count;++g)f.push(m.getX(g)+p);p+=e[l].attributes.position.count}s.setIndex(f)}for(var h in o){var y=this.mergeBufferAttributes(o[h]);if(!y)return null;s.addAttribute(h,y)}for(var h in a){var v=a[h][0].length;if(0===v)break;s.morphAttributes=s.morphAttributes||{},s.morphAttributes[h]=[];for(l=0;l<v;++l){var b=[];for(g=0;g<a[h].length;++g)b.push(a[h][g][l]);var _=this.mergeBufferAttributes(b);if(!_)return null;s.morphAttributes[h].push(_)}}return s},mergeBufferAttributes:function(e){for(var t,n,r,i=0,o=0;o<e.length;++o){var a=e[o];if(a.isInterleavedBufferAttribute)return null;if(void 0===t&&(t=a.array.constructor),t!==a.array.constructor)return null;if(void 0===n&&(n=a.itemSize),n!==a.itemSize)return null;if(void 0===r&&(r=a.normalized),r!==a.normalized)return null;i+=a.array.length}var s=new t(i),c=0;for(o=0;o<e.length;++o)s.set(e[o].array,c),c+=e[o].array.length;return new THREE.BufferAttribute(s,n,r)}}},function(e,t){if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");AFRAME.registerComponent("haptics",{schema:{actuatorIndex:{default:0},dur:{default:100},enabled:{default:!0},events:{type:"array"},eventsFrom:{type:"string"},force:{default:1}},multiple:!0,init:function(){this.data;var e=this;this.callPulse=function(){e.pulse()};var t=function(){e.gamepad=e.el.components["tracked-controls"].controller,e.gamepad.gamepad&&(e.gamepad=e.gamepad.gamepad),e.gamepad&&e.gamepad.hapticActuators&&e.gamepad.hapticActuators.length&&e.addEventListeners()};this.el.components["tracked-controls"]&&this.el.components["tracked-controls"].controller?t():this.el.addEventListener("controllerconnected",(function(){t()}))},remove:function(){this.removeEventListeners()},pulse:function(e,t){var n=this.data;n.enabled&&this.gamepad&&this.gamepad.hapticActuators&&this.gamepad.hapticActuators[n.actuatorIndex].pulse(e||n.force,t||n.dur)},addEventListeners:function(){var e,t,n=this.data;for(t=n.eventsFrom?document.querySelector(n.eventsFrom):this.el,e=0;e<n.events.length;e++)t.addEventListener(n.events[e],this.callPulse)},removeEventListeners:function(){var e,t,n=this.data;for(t=n.eventsFrom?document.querySelector(n.eventsFrom):this.el,e=0;e<n.events.length;e++)t.removeEventListener(n.events[e],this.callPulse)}})},function(e,t){var n=[],r=new THREE.Vector3;function i(e,t,i){var o,a,s,c,l,h,d=Math.ceil(t/e.columns);for(a=e.marginColumn,s=e.marginRow,i&&(a=e.margin,s=e.margin),l=u(e.align,d),c=u(e.align,e.columns),h=0;h<d;h++)for(o=0;o<e.columns;o++)r.set(0,0,0),0===e.plane.indexOf("x")&&(r.x=(o-c)*a),0===e.plane.indexOf("y")&&(r.y=(o-c)*a),1===e.plane.indexOf("y")&&(r.y=(h-l)*s),1===e.plane.indexOf("z")&&(r.z=(h-l)*s),f(r);return n}function o(e,t){var i,o;for(i=0;i<t;i++)o=isNaN(e.angle)?i*(2*Math.PI)/t:i*e.angle*.01745329252,r.set(0,0,0),0===e.plane.indexOf("x")&&(r.x=e.radius*Math.cos(o)),0===e.plane.indexOf("y")&&(r.y=e.radius*Math.cos(o)),1===e.plane.indexOf("y")&&(r.y=e.radius*Math.sin(o)),1===e.plane.indexOf("z")&&(r.z=e.radius*Math.sin(o)),f(r);return n}function a(e,t){return e.columns=t,i(e,t,!0)}function s(e,t){return p(1,0,0,0,1,0,0,0,1,-1,0,0,0,-1,0,0,0,-1),h(e.radius/2),n}function c(e,t){var r=(1+Math.sqrt(5))/2,i=1/r,o=2-r,a=-1*i,s=-1*o;return p(-1,o,0,-1,s,0,0,-1,o,0,-1,s,0,1,o,0,1,s,1,o,0,1,s,0,i,i,i,i,i,a,i,a,i,i,a,a,o,0,1,o,0,-1,a,i,i,a,i,a,a,a,i,a,a,a,s,0,1,s,0,-1),h(e.radius/2),n}function l(e,t){var r=Math.sqrt(3),i=-1/Math.sqrt(3);return p(0,0,r+i,-1,0,i,1,0,i,0,2*Math.sqrt(2/3),0),h(e.radius/2),n}function u(e,t){switch(e){case"start":return t-1;case"center":return(t-1)/2;case"end":return 0}}function h(e){var t;for(t=0;t<n.length;t++)n[t]=n[t]*e}function d(e,t,n){var r,i,o;if(n)for(i=0;i<e.length;i++)null!=(r=e[i].getAttribute(n))&&(o=3*parseInt(r,10),e[i].object3D.position.set(t[o],t[o+1],t[o+2]));else for(i=0;i<t.length;i+=3){if(!e[i/3])return;e[i/3].object3D.position.set(t[i],t[i+1],t[i+2])}}function p(){var e;for(e=0;e<arguments.length;e++)n.push(e)}function f(e){n.push(e.x),n.push(e.y),n.push(e.z)}AFRAME.registerComponent("layout",{schema:{angle:{type:"number",default:!1,min:0,max:360,if:{type:["circle"]}},columns:{default:1,min:0,if:{type:["box"]}},margin:{default:1,min:0,if:{type:["box","line"]}},marginColumn:{default:1,min:0,if:{type:["box"]}},marginRow:{default:1,min:0,if:{type:["box"]}},orderAttribute:{default:""},plane:{default:"xy"},radius:{default:1,min:0,if:{type:["circle","cube","dodecahedron","pyramid"]}},reverse:{default:!1},type:{default:"line",oneOf:["box","circle","cube","dodecahedron","line","pyramid"]},fill:{default:!0,if:{type:["circle"]}},align:{default:"end",oneOf:["start","center","end"]}},init:function(){var e=this,t=this.el;this.children=t.getChildEntities(),this.initialPositions=[],this.children.forEach((function(t){if(t.hasLoaded)return n();function n(){e.initialPositions.push(t.object3D.position.x),e.initialPositions.push(t.object3D.position.y),e.initialPositions.push(t.object3D.position.z)}t.addEventListener("loaded",n)})),this.handleChildAttached=this.handleChildAttached.bind(this),this.handleChildDetached=this.handleChildDetached.bind(this),t.addEventListener("child-attached",this.handleChildAttached),t.addEventListener("child-detached",this.handleChildDetached),t.addEventListener("layoutrefresh",this.update.bind(this))},update:function(e){var t,r,u,h=this.children,p=this.data,f=this.el;switch(r=h.length,p.type){case"box":u=i;break;case"circle":u=o;break;case"cube":u=s;break;case"dodecahedron":u=c;break;case"pyramid":u=l;break;default:u=a}t=f.getDOMAttribute("layout"),n.length=0,n=u(p,r,"string"==typeof t?-1!==t.indexOf("margin"):"margin"in t),p.reverse&&n.reverse(),d(h,n,p.orderAttribute)},remove:function(){this.el.removeEventListener("child-attached",this.handleChildAttached),this.el.removeEventListener("child-detached",this.handleChildDetached),d(this.children,this.initialPositions)},handleChildAttached:function(e){var t=this.el;e.detail.el.parentNode===t&&(this.children.push(e.detail.el),this.update())},handleChildDetached:function(e){-1!==this.children.indexOf(e.detail.el)&&(this.children.splice(this.children.indexOf(e.detail.el),1),this.initialPositions.splice(this.children.indexOf(e.detail.el),1),this.update())}}),e.exports.getBoxPositions=i,e.exports.getCirclePositions=o,e.exports.getLinePositions=a,e.exports.getCubePositions=s,e.exports.getDodecahedronPositions=c,e.exports.getPyramidPositions=l},function(e,t){if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");AFRAME.registerPrimitive("a-log",{defaultComponents:{geometry:{primitive:"plane",height:5},log:{},material:{color:"#111",shader:"flat",side:"double"},text:{color:"lightgreen",baseline:"top",align:"center",height:5}},mappings:{channel:"log.channel"}}),AFRAME.registerSystem("log",{schema:{console:{default:!0}},init:function(){var e=this.data,t=this.logs=[],n=this.loggers=[];AFRAME.log=function(r,i){t.push([r,i]),n.forEach((function(e){e.receiveLog(r,i)})),e.console&&console.log("[log:"+(i||"")+"] "+r)}},registerLogger:function(e){this.loggers.push(e),this.logs.forEach((function(t){e.receiveLog.apply(e,t)}))},unregisterLogger:function(e){this.loggers.splice(this.loggers.indexOf(e),1)}}),AFRAME.registerComponent("log",{schema:{channel:{type:"string"},filter:{type:"string"},max:{default:100},showErrors:{default:!0}},init:function(){this.logs=[],this.system.registerLogger(this)},play:function(){var e=this;this.el.sceneEl.addEventListener("log",(function(t){t.detail&&e.receiveLog(t.detail.message,t.detail.channel)})),window.onerror=function(t,n,r,i,o){e.receiveLog("Error: "+t)}},receiveLog:function(e,t){var n=this.data;"string"!=typeof e&&(e=JSON.stringify(e)),n.channel&&t&&n.channel!==t||n.filter&&-1===e.indexOf(n.filter)||(this.logs.push(e),n.max&&this.logs.length>n.max&&this.logs.shift(),this.el.setAttribute("text",{value:this.logs.join("\n")}))},remove:function(){this.el.removeAttribute("text"),this.system.unregisterLogger(this)}})},function(e,t,n){n(53),AFRAME.registerComponent("orbit-controls",{dependencies:["camera"],schema:{autoRotate:{type:"boolean"},autoRotateSpeed:{default:2},dampingFactor:{default:.1},enabled:{default:!0},enableDamping:{default:!0},enableKeys:{default:!0},enablePan:{default:!0},enableRotate:{default:!0},enableZoom:{default:!0},initialPosition:{type:"vec3"},keyPanSpeed:{default:7},minAzimuthAngle:{type:"number",default:1/0},maxAzimuthAngle:{type:"number",default:1/0},maxDistance:{default:1e3},maxPolarAngle:{default:AFRAME.utils.device.isMobile()?90:120},minDistance:{default:1},minPolarAngle:{default:0},minZoom:{default:0},panSpeed:{default:1},rotateSpeed:{default:.05},screenSpacePanning:{default:!1},target:{type:"vec3"},zoomSpeed:{default:.5}},init:function(){var e,t=this.el;this.controls=new THREE.OrbitControls(t.getObject3D("camera"),t.sceneEl.renderer.domElement),e=new THREE.Vector3,t.sceneEl.addEventListener("enter-vr",()=>{(AFRAME.utils.device.checkHeadsetConnected()||AFRAME.utils.device.isMobile())&&(this.controls.enabled=!1,t.hasAttribute("look-controls")&&(t.setAttribute("look-controls","enabled",!0),e.copy(t.getObject3D("camera").position),t.getObject3D("camera").position.set(0,0,0)))}),t.sceneEl.addEventListener("exit-vr",()=>{(AFRAME.utils.device.checkHeadsetConnected()||AFRAME.utils.device.isMobile())&&(this.controls.enabled=!0,t.getObject3D("camera").position.copy(e),t.hasAttribute("look-controls")&&t.setAttribute("look-controls","enabled",!1))}),document.body.style.cursor="grab",document.addEventListener("mousedown",()=>{document.body.style.cursor="grabbing"}),document.addEventListener("mouseup",()=>{document.body.style.cursor="grab"}),this.target=new THREE.Vector3,t.getObject3D("camera").position.copy(this.data.initialPosition)},update:function(e){var t=this.controls,n=this.data;t.target=this.target.copy(n.target),t.autoRotate=n.autoRotate,t.autoRotateSpeed=n.autoRotateSpeed,t.dampingFactor=n.dampingFactor,t.enabled=n.enabled,t.enableDamping=n.enableDamping,t.enableKeys=n.enableKeys,t.enablePan=n.enablePan,t.enableRotate=n.enableRotate,t.enableZoom=n.enableZoom,t.keyPanSpeed=n.keyPanSpeed,t.maxPolarAngle=THREE.Math.degToRad(n.maxPolarAngle),t.maxDistance=n.maxDistance,t.minDistance=n.minDistance,t.minPolarAngle=THREE.Math.degToRad(n.minPolarAngle),t.minZoom=n.minZoom,t.panSpeed=n.panSpeed,t.rotateSpeed=n.rotateSpeed,t.screenSpacePanning=n.screenSpacePanning,t.zoomSpeed=n.zoomSpeed},tick:function(){var e=this.controls;this.data.enabled&&e.enabled&&(e.enableDamping||e.autoRotate)&&this.controls.update()}})},function(e,t){THREE.OrbitControls=function(e,t){var n,r,i,o,a;this.object=e,this.domElement=void 0!==t?t:document,this.enabled=!0,this.target=new THREE.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.25,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={ORBIT:THREE.MOUSE.LEFT,ZOOM:THREE.MOUSE.MIDDLE,PAN:THREE.MOUSE.RIGHT},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return f.phi},this.getAzimuthalAngle=function(){return f.theta},this.saveState=function(){s.target0.copy(s.target),s.position0.copy(s.object.position),s.zoom0=s.object.zoom},this.reset=function(){s.target.copy(s.target0),s.object.position.copy(s.position0),s.object.zoom=s.zoom0,s.object.updateProjectionMatrix(),s.dispatchEvent(c),s.update(),d=h.NONE},this.update=(n=new THREE.Vector3,r=(new THREE.Quaternion).setFromUnitVectors(e.up,new THREE.Vector3(0,1,0)),i=r.clone().inverse(),o=new THREE.Vector3,a=new THREE.Quaternion,function(){var e=s.object.position;return n.copy(e).sub(s.target),n.applyQuaternion(r),f.setFromVector3(n),s.autoRotate&&d===h.NONE&&C(2*Math.PI/60/60*s.autoRotateSpeed),f.theta+=m.theta,f.phi+=m.phi,f.theta=Math.max(s.minAzimuthAngle,Math.min(s.maxAzimuthAngle,f.theta)),f.phi=Math.max(s.minPolarAngle,Math.min(s.maxPolarAngle,f.phi)),f.makeSafe(),f.radius*=g,f.radius=Math.max(s.minDistance,Math.min(s.maxDistance,f.radius)),s.target.add(y),n.setFromSpherical(f),n.applyQuaternion(i),e.copy(s.target).add(n),s.object.lookAt(s.target),!0===s.enableDamping?(m.theta*=1-s.dampingFactor,m.phi*=1-s.dampingFactor):m.set(0,0,0),g=1,y.set(0,0,0),!!(v||o.distanceToSquared(s.object.position)>p||8*(1-a.dot(s.object.quaternion))>p)&&(s.dispatchEvent(c),o.copy(s.object.position),a.copy(s.object.quaternion),v=!1,!0)}),this.dispose=function(){s.domElement.removeEventListener("contextmenu",G,!1),s.domElement.removeEventListener("mousedown",F,!1),s.domElement.removeEventListener("wheel",B,!1),s.domElement.removeEventListener("touchstart",H,!1),s.domElement.removeEventListener("touchend",q,!1),s.domElement.removeEventListener("touchmove",z,!1),document.removeEventListener("mousemove",j,!1),document.removeEventListener("mouseup",U,!1),window.removeEventListener("keydown",V,!1)};var s=this,c={type:"change"},l={type:"start"},u={type:"end"},h={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY:4,TOUCH_PAN:5},d=h.NONE,p=1e-6,f=new THREE.Spherical,m=new THREE.Spherical,g=1,y=new THREE.Vector3,v=!1,b=new THREE.Vector2,_=new THREE.Vector2,w=new THREE.Vector2,E=new THREE.Vector2,A=new THREE.Vector2,x=new THREE.Vector2,S=new THREE.Vector2,T=new THREE.Vector2,M=new THREE.Vector2;function R(){return Math.pow(.95,s.zoomSpeed)}function C(e){m.theta-=e}function k(e){m.phi-=e}var I,P=(I=new THREE.Vector3,function(e,t){I.setFromMatrixColumn(t,0),I.multiplyScalar(-e),y.add(I)}),O=function(){var e=new THREE.Vector3;return function(t,n){e.setFromMatrixColumn(n,1),e.multiplyScalar(t),y.add(e)}}(),N=function(){var e=new THREE.Vector3;return function(t,n){var r=s.domElement===document?s.domElement.body:s.domElement;if(s.object.isPerspectiveCamera){var i=s.object.position;e.copy(i).sub(s.target);var o=e.length();o*=Math.tan(s.object.fov/2*Math.PI/180),P(2*t*o/r.clientHeight,s.object.matrix),O(2*n*o/r.clientHeight,s.object.matrix)}else s.object.isOrthographicCamera?(P(t*(s.object.right-s.object.left)/s.object.zoom/r.clientWidth,s.object.matrix),O(n*(s.object.top-s.object.bottom)/s.object.zoom/r.clientHeight,s.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),s.enablePan=!1)}}();function D(e){s.object.isPerspectiveCamera?g/=e:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom*e)),s.object.updateProjectionMatrix(),v=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function L(e){s.object.isPerspectiveCamera?g*=e:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom/e)),s.object.updateProjectionMatrix(),v=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function F(e){if(!1!==s.enabled){switch(e.preventDefault(),e.button){case s.mouseButtons.ORBIT:if(!1===s.enableRotate)return;!function(e){b.set(e.clientX,e.clientY)}(e),d=h.ROTATE;break;case s.mouseButtons.ZOOM:if(!1===s.enableZoom)return;!function(e){S.set(e.clientX,e.clientY)}(e),d=h.DOLLY;break;case s.mouseButtons.PAN:if(!1===s.enablePan)return;!function(e){E.set(e.clientX,e.clientY)}(e),d=h.PAN}d!==h.NONE&&(document.addEventListener("mousemove",j,!1),document.addEventListener("mouseup",U,!1),s.dispatchEvent(l))}}function j(e){if(!1!==s.enabled)switch(e.preventDefault(),d){case h.ROTATE:if(!1===s.enableRotate)return;!function(e){_.set(e.clientX,e.clientY),w.subVectors(_,b);var t=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*w.x/t.clientWidth*s.rotateSpeed),k(2*Math.PI*w.y/t.clientHeight*s.rotateSpeed),b.copy(_),s.update()}(e);break;case h.DOLLY:if(!1===s.enableZoom)return;!function(e){T.set(e.clientX,e.clientY),M.subVectors(T,S),M.y>0?D(R()):M.y<0&&L(R()),S.copy(T),s.update()}(e);break;case h.PAN:if(!1===s.enablePan)return;!function(e){A.set(e.clientX,e.clientY),x.subVectors(A,E),N(x.x,x.y),E.copy(A),s.update()}(e)}}function U(e){!1!==s.enabled&&(document.removeEventListener("mousemove",j,!1),document.removeEventListener("mouseup",U,!1),s.dispatchEvent(u),d=h.NONE)}function B(e){!1===s.enabled||!1===s.enableZoom||d!==h.NONE&&d!==h.ROTATE||(e.preventDefault(),e.stopPropagation(),s.dispatchEvent(l),function(e){e.deltaY<0?L(R()):e.deltaY>0&&D(R()),s.update()}(e),s.dispatchEvent(u))}function V(e){!1!==s.enabled&&!1!==s.enableKeys&&!1!==s.enablePan&&function(e){switch(e.keyCode){case s.keys.UP:N(0,s.keyPanSpeed),s.update();break;case s.keys.BOTTOM:N(0,-s.keyPanSpeed),s.update();break;case s.keys.LEFT:N(s.keyPanSpeed,0),s.update();break;case s.keys.RIGHT:N(-s.keyPanSpeed,0),s.update()}}(e)}function H(e){if(!1!==s.enabled){switch(e.touches.length){case 1:if(!1===s.enableRotate)return;!function(e){b.set(e.touches[0].pageX,e.touches[0].pageY)}(e),d=h.TOUCH_ROTATE;break;case 2:if(!1===s.enableZoom)return;!function(e){var t=e.touches[0].pageX-e.touches[1].pageX,n=e.touches[0].pageY-e.touches[1].pageY,r=Math.sqrt(t*t+n*n);S.set(0,r)}(e),d=h.TOUCH_DOLLY;break;case 3:if(!1===s.enablePan)return;!function(e){E.set(e.touches[0].pageX,e.touches[0].pageY)}(e),d=h.TOUCH_PAN;break;default:d=h.NONE}d!==h.NONE&&s.dispatchEvent(l)}}function z(e){if(!1!==s.enabled)switch(e.preventDefault(),e.stopPropagation(),e.touches.length){case 1:if(!1===s.enableRotate)return;if(d!==h.TOUCH_ROTATE)return;!function(e){_.set(e.touches[0].pageX,e.touches[0].pageY),w.subVectors(_,b);var t=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*w.x/t.clientWidth*s.rotateSpeed),k(2*Math.PI*w.y/t.clientHeight*s.rotateSpeed),b.copy(_),s.update()}(e);break;case 2:if(!1===s.enableZoom)return;if(d!==h.TOUCH_DOLLY)return;!function(e){var t=e.touches[0].pageX-e.touches[1].pageX,n=e.touches[0].pageY-e.touches[1].pageY,r=Math.sqrt(t*t+n*n);T.set(0,r),M.subVectors(T,S),M.y>0?L(R()):M.y<0&&D(R()),S.copy(T),s.update()}(e);break;case 3:if(!1===s.enablePan)return;if(d!==h.TOUCH_PAN)return;!function(e){A.set(e.touches[0].pageX,e.touches[0].pageY),x.subVectors(A,E),N(x.x,x.y),E.copy(A),s.update()}(e);break;default:d=h.NONE}}function q(e){!1!==s.enabled&&(s.dispatchEvent(u),d=h.NONE)}function G(e){!1!==s.enabled&&e.preventDefault()}s.domElement.addEventListener("contextmenu",G,!1),s.domElement.addEventListener("mousedown",F,!1),s.domElement.addEventListener("wheel",B,!1),s.domElement.addEventListener("touchstart",H,!1),s.domElement.addEventListener("touchend",q,!1),s.domElement.addEventListener("touchmove",z,!1),window.addEventListener("keydown",V,!1),this.update()},THREE.OrbitControls.prototype=Object.create(THREE.EventDispatcher.prototype),THREE.OrbitControls.prototype.constructor=THREE.OrbitControls,Object.defineProperties(THREE.OrbitControls.prototype,{center:{get:function(){return console.warn("THREE.OrbitControls: .center has been renamed to .target"),this.target}},noZoom:{get:function(){return console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),!this.enableZoom},set:function(e){console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),this.enableZoom=!e}},noRotate:{get:function(){return console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),!this.enableRotate},set:function(e){console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),this.enableRotate=!e}},noPan:{get:function(){return console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),!this.enablePan},set:function(e){console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),this.enablePan=!e}},noKeys:{get:function(){return console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),!this.enableKeys},set:function(e){console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),this.enableKeys=!e}},staticMoving:{get:function(){return console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),!this.enableDamping},set:function(e){console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),this.enableDamping=!e}},dynamicDampingFactor:{get:function(){return console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor},set:function(e){console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor=e}}})},function(e,t){AFRAME.registerComponent("proxy-event",{schema:{captureBubbles:{default:!1},enabled:{default:!0},event:{type:"string"},from:{type:"string"},to:{type:"string"},as:{type:"string"},bubbles:{default:!1}},multiple:!0,init:function(){var e,t,n,r=this.data,i=this.el,o=this;if(r.from?e="PARENT"===r.from?[i.parentNode]:document.querySelectorAll(r.from):n="CHILDREN"===r.to?i.querySelectorAll("*"):"SELF"===r.to?[i]:document.querySelectorAll(r.to),r.from)for(t=0;t<e.length;t++)this.addEventListenerFrom(e[t]);else i.addEventListener(r.event,(function(e){var r=o.data;if(r.enabled&&(r.captureBubbles||e.target===i))for(t=0;t<n.length;t++)n[t].emit(r.as||r.event,e.detail?e.detail:null,r.bubbles)}))},addEventListenerFrom:function(e){var t=this.data,n=this;e.addEventListener(t.event,(function(t){var r=n.data;r.enabled&&(r.captureBubbles||t.target===e)&&n.el.emit(r.as||r.event,t.detail?t.detail:null,!1)}))}})},function(e,t){AFRAME.registerSystem("render-order",{schema:{type:"array"},init:function(){this.el.renderer.sortObjects=!0},update:function(){for(this.order={},i=0;i<this.data.length;i++)this.order[this.data[i]]=i}}),AFRAME.registerComponent("render-order",{schema:{type:"string"},multiple:!0,init:function(){this.set=this.set.bind(this),this.el.addEventListener("object3dset",e=>{"nonrecursive"!==this.id&&e.detail.object.traverse(this.set)})},update:function(){"nonrecursive"===this.id?this.set(this.el.object3D):this.el.object3D.traverse(this.set)},set:function(e){isNaN(this.data)?e.renderOrder=this.system.order[this.data]:e.renderOrder=parseFloat(this.data)}}),AFRAME.registerComponent("render-order-recursive",{init:function(){this.el.addEventListener("child-attached",e=>{e.detail.el.setAttribute("render-order",this.el.getAttribute("render-order"))})}})},function(e,t,n){var r;"undefined"!=typeof self&&self,r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){"use strict";var r={};e.exports.select=function(e,t,n){return r[t]||(r[t]=new Function("state","item","return "+c(t)+";")),r[t](e,n)};var i=/\.([A-Za-z][\w_-]*)/g,o=/([=&|!?:+-])(\s*)([\(]?)([A-Za-z][\w_-]*)/g,a=/^([\(]?)([A-Za-z][\w_-]*)/g,s=/state\["item"\]/g;function c(e){return e=(e=(e=(e=e.replace(i,'["$1"]')).replace(a,'$1state["$2"]')).replace(o,'$1$2$3state["$4"]')).replace(s,"item")}function l(){var e=arguments;return function(){var t;for(t=0;t<e.length;t++)e[t].apply(this,arguments)}}e.exports.generateExpression=c,e.exports.clearObject=function(e){for(var t in e)delete e[t]},e.exports.composeHandlers=function(){var e,t,n,r=arguments;for(n={},t=0;t<r.length;t++)for(e in r[t])e in n?n[e].constructor===Array?n[e].push(r[t][e]):n[e]=[n[e],r[t][e]]:n[e]=r[t][e];for(e in n)n[e].constructor===Array&&(n[e]=l.apply(this,n[e]));return n},e.exports.composeFunctions=l;var u=["||","&&","!=","!==","==","===",">","<","<=",">="],h=/\s+/,d=/\(|\)|\!/g;function p(e){return-1===(e=function(e){return 0===e.indexOf("!!")?e.replace("!!",""):0===e.indexOf("!")?e.replace("!",""):e}(e.trim())).indexOf(".")?e:e.substring(0,e.indexOf("."))}e.exports.parseKeysToWatch=function(e,t,n){var r,i;for(i=m(t,h),r=0;r<i.length;r++)if(-1===u.indexOf(i[r])&&!i[r].startsWith("'")&&-1===e.indexOf(i[r])){if(n&&"item"===i[r])continue;e.push(p(i[r]).replace(d,""))}return e};var f={};function m(e,t){return f[t]||(f[t]={}),f[t][e]||(f[t][e]=e.split(t)),f[t][e]}e.exports.split=m,e.exports.copyArray=function(e,t){var n;for(e.length=0,n=0;n<t.length;n++)e[n]=t[n]}},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n(2);var i,o,a=n(3),s=n(0),c=n(4).wrapArray,l={initialState:{},nonBindedStateKeys:[],handlers:{},computeState:function(){}};AFRAME.registerState=function(e){AFRAME.utils.extend(l,e)},AFRAME.registerSystem("state",{init:function(){var e,t=this;for(e in this.arrays=[],this.dirtyArrays=[],this.diff={},this.state=AFRAME.utils.clone(l.initialState),this.subscriptions=[],this.initEventHandlers(),this.state)this.state[e]&&this.state[e].constructor===Array&&(this.arrays.push(e),this.state[e].__dirty=!0,c(this.state[e]));this.lastState=AFRAME.utils.clone(this.state),this.eventDetail={lastState:this.lastState,state:this.state},this.el.addEventListener("loaded",(function(){var e;for(l.computeState(t.state,"@@INIT"),e=0;e<t.subscriptions.length;e++)t.subscriptions[e].onStateUpdate(t.state)}))},dispatch:(o=[],function(e,t){var n,r;for(r in l.handlers[e](this.state,t),l.computeState(this.state,e,t),this.diff)delete this.diff[r];for(a(this.lastState,this.state,this.diff,l.nonBindedStateKeys),this.dirtyArrays.length=0,n=0;n<this.arrays.length;n++)this.state[this.arrays[n]].__dirty&&this.dirtyArrays.push(this.arrays[n]);for(o.length=0,n=0;n<this.subscriptions.length;n++){if("bind-for"===this.subscriptions[n].name){if(!this.state[this.subscriptions[n].keysToWatch[0]].__dirty)continue}else if(!this.shouldUpdate(this.subscriptions[n].keysToWatch,this.diff,this.dirtyArrays))continue;-1===o.indexOf(this.subscriptions[n])&&o.push(this.subscriptions[n])}for(n=0;n<o.length;n++)o[n].onStateUpdate();for(r in this.state)this.state[r]&&this.state[r].constructor===Array&&(this.state[r].__dirty=!1);this.copyState(this.lastState,this.state),this.eventDetail.action=e,this.eventDetail.payload=t,this.el.emit("stateupdate",this.eventDetail)}),copyState:function(e,t,n){var r;for(r in t)if(n||-1===l.nonBindedStateKeys.indexOf(r))if(t[r]&&t[r].constructor===Object){if(!(r in e)){e[r]=AFRAME.utils.clone(t[r]);continue}this.copyState(e[r],t[r],!0)}else e[r]=t[r]},subscribe:function(e){this.subscriptions.push(e)},unsubscribe:function(e){this.subscriptions.splice(this.subscriptions.indexOf(e),1)},shouldUpdate:function(e,t,n){for(var r=0;r<e.length;r++)if(e[r]in t||-1!==n.indexOf(e[r]))return!0;return!1},initEventHandlers:function(){var e,t=[];for(e in n=n.bind(this),l.handlers)-1===t.indexOf(e)&&(t.push(e),n(e));function n(e){var t=this;this.el.addEventListener(e,(function(n){t.dispatch(e,n.detail)}))}},renderTemplate:(i=/{{\s*(\w*\.)?([\w.]+)\s*}}/g,function(e,t,n){var o,a;if(a=e,t)for(;o=i.exec(e);)a=a.replace(o[0],"object"===(void 0===t?"undefined":r(t))?s.select(t,o[2])||"":t);return n?a:document.createRange().createContextualFragment(a)}),select:s.select}),AFRAME.registerComponent("bind",{schema:{default:{},parse:function(e){var t,n,r,i;if(e.constructor===Object)return e;if(-1===e.indexOf(":"))return e;for(t={},r=s.split(e,";"),n=0;n<r.length;n++)t[(i=s.split(r[n].trim(),":"))[0]]=i[1].trim();return t}},multiple:!0,init:function(){var e;this.data,this.keysToWatch=[],this.onStateUpdate=this.onStateUpdate.bind(this),this.system=this.el.sceneEl.systems.state,this.id&&(e=s.split(this.id,"__")[0]),this.isNamespacedBind=this.id&&e in AFRAME.components&&!AFRAME.components[e].isSingleProp||e in AFRAME.systems,this.lastData={},this.updateObj={},this.system.subscribe(this),this.onStateUpdate=this.onStateUpdate.bind(this)},update:function(){var e,t=this.data;if(this.keysToWatch.length=0,"string"==typeof t)s.parseKeysToWatch(this.keysToWatch,t);else for(e in t)s.parseKeysToWatch(this.keysToWatch,t[e]);this.onStateUpdate()},onStateUpdate:function(){var e,t,n,i,o=!1,a=this.el;if(a.parentNode){if(this.isNamespacedBind&&s.clearObject(this.updateObj),n=this.system.state,"object"!==r(this.data)){try{i=s.select(n,this.data)}catch(e){throw new Error("[aframe-state-component] Key '"+this.data+"' not found in state. #"+this.el.getAttribute("id")+"["+this.attrName+"]")}if("object"!==(void 0===i?"undefined":r(i))&&"object"!==r(this.lastData)&&this.lastData===i)return;return AFRAME.utils.entity.setComponentProperty(a,this.id,i),void(this.lastData=i)}for(e in this.data){t=this.data[e].trim();try{i=s.select(n,t)}catch(e){throw console.log(e),new Error("[aframe-state-component] Key '"+t+"' not found in state. #"+this.el.getAttribute("id")+"["+this.attrName+"]")}if("object"===(void 0===i?"undefined":r(i))||"object"===r(this.lastData[e])||this.lastData[e]!==i){if(e in AFRAME.components&&void 0===i)return void a.removeAttribute(e);this.isNamespacedBind?this.updateObj[e]=i:AFRAME.utils.entity.setComponentProperty(a,e,i),this.lastData[e]=i}}for(o in this.updateObj);this.isNamespacedBind&&o&&a.setAttribute(this.id,this.updateObj)}},remove:function(){this.system.unsubscribe(this)}}),AFRAME.registerComponent("bind-toggle",{schema:{type:"string"},multiple:!0,init:function(){this.system=this.el.sceneEl.systems.state,this.keysToWatch=[],this.onStateUpdate=this.onStateUpdate.bind(this),this.system.subscribe(this),this.onStateUpdate()},update:function(){this.keysToWatch.length=0,s.parseKeysToWatch(this.keysToWatch,this.data)},onStateUpdate:function(){var e,t,n=this.el;e=this.system.state;try{t=s.select(e,this.data)}catch(e){throw new Error("[aframe-state-component] Key '"+this.data+"' not found in state. #"+this.el.getAttribute("id")+"["+this.attrName+"]")}t?n.setAttribute(this.id,""):n.removeAttribute(this.id)},remove:function(){this.system.unsubscribe(this)}}),e.exports={composeFunctions:s.composeFunctions,composeHandlers:s.composeHandlers,select:s.select}},function(e,t,n){"use strict";var r,i,o=n(0);AFRAME.registerComponent("bind-for",{schema:{delay:{default:0},for:{type:"string",default:"item"},in:{type:"string"},key:{type:"string"},pool:{default:0},template:{type:"string"},updateInPlace:{default:!1}},init:function(){this.system=this.el.sceneEl.systems.state,this.onStateUpdate=this.onStateUpdate.bind(this),this.keysToWatch=[],this.renderedKeys=[],this.system.subscribe(this),this.el.children[0]&&"TEMPLATE"===this.el.children[0].tagName?this.template=this.el.children[0].innerHTML.trim():this.template=document.querySelector(this.data.template).innerHTML.trim();for(var e=0;e<this.data.pool;e++)this.el.appendChild(this.generateFromTemplate(null,e))},update:function(){this.keysToWatch[0]=o.split(this.data.in,".")[0],this.onStateUpdate()},onStateUpdateNaive:(i=[],function(){var e,t=this.data,n=this.el;try{e=o.select(this.system.state,t.in)}catch(e){throw new Error("[aframe-state-component] Key '"+t.in+"' not found in state. #"+n.getAttribute("id")+"["+this.attrName+"]")}i.length=0;for(var r=0;r<e.length;r++){var a=e[r];i.push(t.key?a[t.key].toString():a.toString())}for(var s=this.getElsToRemove(i,this.renderedKeys),c=0;c<s.length;c++)s[c].parentNode.removeChild(s[c]);e.length&&this.renderItems(e,i,0)}),renderItems:function(e,t,n){var r,i=this,o=this.data,a=this.el,s=e[n],c=o.key?s[o.key].toString():s.toString();if(-1===this.renderedKeys.indexOf(c))r=this.generateFromTemplate(s,n),a.appendChild(r),this.renderedKeys.push(c);else{if(e.length&&e[0].constructor===String){var l=o.key?s[o.key].toString():s.toString();(r=a.querySelector('[data-bind-for-value="'+l+'"]')).setAttribute("data-bind-for-key",n)}else{var u=this.getBindForKey(s,n);r=a.querySelector('[data-bind-for-key="'+u+'"]')}r.emit("bindforupdate",s,!1)}e[n+1]&&(this.data.delay?setTimeout((function(){i.renderItems(e,t,n+1)}),this.data.delay):this.renderItems(e,t,n+1))},onStateUpdateInPlace:function(){var e=[];return function(){var t,n,r=this.data,i=this.el;try{t=o.select(this.system.state,r.in)}catch(e){throw console.log(e),new Error("[aframe-state-component] Key '"+r.in+"' not found in state. #"+i.getAttribute("id")+"["+this.attrName+"]")}e.length=0;for(var a=0;a<t.length;a++){var s=t[a];n=r.key?s[r.key].toString():s.toString(),e.push(n)}for(var c=this.getElsToRemove(e,this.renderedKeys),l=0;l<c.length;l++)c[l].object3D.visible=!1,c[l].setAttribute("data-bind-for-active","false"),c[l].removeAttribute("data-bind-for-key"),c[l].removeAttribute("data-bind-for-value"),c[l].emit("bindfordeactivate",null,!1),c[l].pause();t.length&&this.renderItemsInPlace(t,e,0)}}(),renderItemsInPlace:function(e,t,n){var r,i=this,o=this.data,a=this.el,s=e[n],c=this.getBindForKey(s,n),l=o.key?s[o.key].toString():s.toString();if(-1===this.renderedKeys.indexOf(l)){if(a.querySelector(':scope > [data-bind-for-active="false"]'))(r=a.querySelector('[data-bind-for-active="false"]')).setAttribute("data-bind-for-key",c),r.setAttribute("data-bind-for-value",l),r.object3D.visible=!0,r.play(),r.setAttribute("data-bind-for-active","true"),r.emit("bindforupdateinplace",s,!1);else{var u=this.generateFromTemplate(s,n);u.addEventListener("loaded",(function(){u.emit("bindforupdateinplace",s,!1)})),a.appendChild(u)}this.renderedKeys.push(l)}else-1!==t.indexOf(l)&&(e.length&&e[0].constructor===String?(r=a.querySelector('[data-bind-for-value="'+l+'"]')).setAttribute("data-bind-for-key",n):r=a.querySelector('[data-bind-for-key="'+c+'"]'),r.emit("bindforupdateinplace",s,!1));e[n+1]&&(this.data.delay?setTimeout((function(){i.renderItemsInPlace(e,t,n+1)}),this.data.delay):this.renderItemsInPlace(e,t,n+1))},generateFromTemplate:function(e,t){var n=this.data;this.el.appendChild(this.system.renderTemplate(this.template,e));var r=this.el.children[this.el.children.length-1];if(!e)return r.setAttribute("data-bind-for-key",""),r.setAttribute("data-bind-for-active","false"),r;var i=this.getBindForKey(e,t);return r.setAttribute("data-bind-for-key",i),n.key||r.setAttribute("data-bind-for-value",e),r.setAttribute("data-bind-for-active","true"),r},getElsToRemove:(r=[],function(e,t){var n=this.data,i=this.el;r.length=0;for(var o=0;o<i.children.length;o++)if("TEMPLATE"!==i.children[o].tagName){var a=n.key?i.children[o].getAttribute("data-bind-for-key"):i.children[o].getAttribute("data-bind-for-value");-1===e.indexOf(a)&&-1!==t.indexOf(a)&&(r.push(i.children[o]),t.splice(t.indexOf(a),1))}return r}),getBindForKey:function(e,t){return this.data.key?e[this.data.key].toString():t.toString()},onStateUpdate:function(){this.data.updateInPlace?this.onStateUpdateInPlace():this.onStateUpdateNaive()}}),AFRAME.registerComponent("bind-item",{schema:{type:"string"},multiple:!0,init:function(){this.itemData=null,this.keysToWatch=[],this.prevValues={};var e=this.rootEl=this.el.closest("[data-bind-for-key]");if(!e)throw new Error("bind-item component must be attached to entity under a bind-for item.");e.addEventListener("bindforupdateinplace",this.updateInPlace.bind(this)),e.addEventListener("bindfordeactivate",this.deactivate.bind(this)),this.el.sceneEl.systems.state.subscribe(this)},update:function(){this.parseSelector()},updateInPlace:function(e){var t=this.propertyMap;if("false"!==this.rootEl.getAttribute("data-bind-for-active"))for(var n in e&&(this.itemData=e.detail),t){var r=this.select(this.itemData,t[n]);r!==this.prevValues[n]&&(AFRAME.utils.entity.setComponentProperty(this.el,n,r),this.prevValues[n]=r)}},onStateUpdate:function(){this.updateInPlace()},select:function(e,t){return o.select(this.el.sceneEl.systems.state.state,t,e)},deactivate:function(){this.prevValues={}},parseSelector:function(){var e=this.propertyMap={};this.keysToWatch.length=0;var t=o.split(this.id,"__")[0];if(!(t in AFRAME.components)||AFRAME.components[t].isSingleProp)e[this.id]=this.data,o.parseKeysToWatch(this.keysToWatch,this.data,!0);else for(var n=o.split(this.data,";"),r=0;r<n.length;r++){var i=o.split(n[r],":");e[this.id+"."+i[0].trim()]=i[1].trim(),o.parseKeysToWatch(this.keysToWatch,i[1].trim(),!0)}}})},function(e,t,n){"use strict";var r;e.exports=(r=[],function(e,t,n,i){var o,a,s,c,l,u,h;for(l in c=n||{},r.length=0,e)r.push(l);if(!t)return c;for(s in t)-1===r.indexOf(s)&&r.push(s);for(u=0;u<r.length;u++)l=r[u],i&&-1!==i.indexOf(l)||(o=e[l],a=t[l],((h=o&&a&&o.constructor===Object&&a.constructor===Object)&&!AFRAME.utils.deepEqual(o,a)||!h&&o!==a)&&(c[l]=a));return c})},function(e,t,n){"use strict";var r=["push","pop","shift","unshift","splice"];function i(e,t){var n=e[t];e[t]=function(){n.apply(e,arguments),e.__dirty=!0}}e.exports.wrapArray=function(e){var t;if(!e.__wrapped){for(t=0;t<r.length;t++)i(e,r[t]);e.__wrapped=!0}}}])},e.exports=r()},function(e,t){if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");AFRAME.registerComponent("slice9",{schema:{width:{default:1,min:0},height:{default:1,min:0},left:{default:0,min:0},right:{default:0,min:0},bottom:{default:0,min:0},top:{default:0,min:0},side:{default:"front",oneOf:["front","back","double"]},padding:{default:.1,min:.01},color:{type:"color",default:"#fff"},opacity:{default:1,min:0,max:1},transparent:{default:!0},debug:{default:!1},src:{type:"map"}},multiple:!1,init:function(){var e=this.data,t=this.material=new THREE.MeshBasicMaterial({color:e.color,opacity:e.opacity,transparent:e.transparent,wireframe:e.debug}),n=this.geometry=new THREE.PlaneBufferGeometry(e.width,e.height,3,3);new THREE.TextureLoader;this.plane=new THREE.Mesh(n,t),this.el.setObject3D("mesh",this.plane),this.textureSrc=null},updateMap:function(){var e=this.data.src;if(e){if(e===this.textureSrc)return;return this.textureSrc=e,void this.el.sceneEl.systems.material.loadTexture(e,{src:e},t.bind(this))}function t(e){this.material.map=e,this.material.needsUpdate=!0,this.regenerateMesh()}this.material.map&&t(null)},regenerateMesh:function(){var e=this.data,t=this.geometry.attributes.position.array,n=this.geometry.attributes.uv.array,r=this.material.map.image;if(r){var i={left:e.left/r.width,right:e.right/r.width,top:e.top/r.height,bottom:e.bottom/r.height};d(1,i.left,1),d(2,i.right,1),d(4,0,i.bottom),d(5,i.left,i.bottom),d(6,i.right,i.bottom),d(7,1,i.bottom),d(8,0,i.top),d(9,i.left,i.top),d(10,i.right,i.top),d(11,1,i.top),d(13,i.left,0),d(14,i.right,0);var o=e.width/2,a=e.height/2,s=-o+e.padding,c=o-e.padding,l=a-e.padding,u=-a+e.padding;h(0,-o,a),h(1,s,a),h(2,c,a),h(3,o,a),h(4,-o,l),h(5,s,l),h(6,c,l),h(7,o,l),h(8,-o,u),h(9,s,u),h(10,c,u),h(11,o,u),h(13,s,-a),h(14,c,-a),h(12,-o,-a),h(15,o,-a),this.geometry.attributes.position.needsUpdate=!0,this.geometry.attributes.uv.needsUpdate=!0}function h(e,n,r){t[3*e]=n,t[3*e+1]=r}function d(e,t,r){n[2*e]=t,n[2*e+1]=r}},update:function(e){var t=this.data;this.material.color.setStyle(t.color),this.material.opacity=t.opacity,this.material.transparent=t.transparent,this.material.wireframe=t.debug,this.material.side=function(e){switch(e){case"back":return THREE.BackSide;case"double":return THREE.DoubleSide;default:return THREE.FrontSide}}(t.side);var n=AFRAME.utils.diff(t,e);"src"in n?this.updateMap():("width"in n||"height"in n||"padding"in n||"left"in n||"top"in n||"bottom"in n||"right"in n)&&this.regenerateMesh()},remove:function(){},pause:function(){},play:function(){}})},function(e,t){var n=[0,90,180,270],r=["right","up","left","down"],i={NULL:{START:"thumbstart",END:"thumbend"}};r.forEach(e=>{i[e]={},i[e].START="thumb"+e+"start",i[e].END="thumb"+e+"end"});AFRAME.registerComponent("thumb-controls",{schema:{thresholdAngle:{default:89.5},thresholdPad:{default:.05},thresholdStick:{default:.75}},init:function(){var e=this.el;this.onTrackpadDown=this.onTrackpadDown.bind(this),this.onTrackpadUp=this.onTrackpadUp.bind(this),this.directionStick="",this.directionTrackpad="",e.components["tracked-controls"]&&(this.axis=e.components["tracked-controls"].axis),this.type="STICK",e.addEventListener("controllerconnected",t=>{this.axis=e.components["tracked-controls"].axis,"oculus-touch-controls"!==t.detail.name&&"windows-motion-controls"!==t.detail.name?this.type="PAD":this.type="STICK"})},play:function(){var e=this.el;e.addEventListener("trackpaddown",this.onTrackpadDown),e.addEventListener("trackpadup",this.onTrackpadUp),e.addEventListener("touchpaddown",this.onTrackpadDown),e.addEventListener("touchpadup",this.onTrackpadUp)},pause:function(){var e=this.el;e.removeEventListener("trackpaddown",this.onTrackpadDown),e.removeEventListener("trackpadup",this.onTrackpadUp),e.removeEventListener("touchpaddown",this.onTrackpadDown),e.removeEventListener("touchpadup",this.onTrackpadUp)},onTrackpadDown:function(){var e,t=this.el;this.getDistance()<this.data.thresholdPad||(e=this.getDirection())&&(this.directionTrackpad=e,t.emit(i.NULL.START,null,!1),t.emit(i[this.directionTrackpad].START,null,!1))},onTrackpadUp:function(){var e=this.el;this.directionTrackpad&&(e.emit(i.NULL.END,null,!1),e.emit(i[this.directionTrackpad].END,null,!1),this.directionTrackpad="")},tick:function(){var e,t=this.el;if("PAD"!==this.type){if(!this.directionStick&&this.getDistance()>this.data.thresholdStick){if(!(e=this.getDirection()))return;return this.directionStick=e,t.emit(i.NULL.START,null,!1),void t.emit(i[this.directionStick].START,null,!1)}this.directionStick&&this.getDistance()<this.data.thresholdStick&&(t.emit(i.NULL.END,null,!1),t.emit(i[this.directionStick].END,null,!1),this.directionStick="")}},getDistance:function(){var e=this.axis;return this.axis?"PAD"===this.type?Math.sqrt(e[1]*e[1]+e[0]*e[0]):Math.sqrt(e[3]*e[3]+e[2]*e[2]):0},getDirection:function(){var e,t,i,o,a;for(e=this.getAngle(),o=this.data.thresholdAngle/2,i=0;i<n.length;i++){if((a=n[i]+o)>360&&(a-=360),(t=n[i]-o)<0&&(e>=360+t&&e<=360||e>=0&&e<=a))return r[i];if(e>=t&&e<=a)return r[i]}},getAngle:function(){var e,t=this.axis;return this.axis?((e="PAD"===this.type?Math.atan2(-t[1],t[0]):Math.atan2(-t[3],t[2]))<0&&(e=2*Math.PI+e),THREE.Math.radToDeg(e)):0}}),AFRAME.registerComponent("thumb-controls-debug",{dependencies:["thumb-controls"],schema:{controllerType:{type:"string"},hand:{type:"string"},enabled:{default:!1}},init:function(){var e,t,n,r,i=this.el;if(this.data.enabled||AFRAME.utils.getUrlParameter("debug-thumb")){console.log("%c debug-thumb","background: #111; color: red");var o=function(){i.components["tracked-controls"].handleAxes=()=>{},n={axis:t=[0,0,0]},i.components["tracked-controls"].axis=t,i.components["thumb-controls"].axis=t};i.components["tracked-controls"]?o():this.el.addEventListener("controllerconnected",(function(){o()})),(r=this.createCanvas()).addEventListener("click",r=>{"vive-controls"===this.data.controllerType?e?i.emit("trackpadup"):i.emit("trackpaddown"):e&&(t[0]=0,t[1]=0,i.emit("axismove",n,!1)),e=!e}),r.addEventListener("mousemove",o=>{var a;e&&(a=r.getBoundingClientRect(),t[0]=(o.clientX-a.left)/240*2-1,t[1]=(o.clientY-a.top)/240*2-1,i.emit("axismove",n,!1))}),r.addEventListener("mouseleave",r=>{e&&(t[0]=0,t[1]=0,i.emit("axismove",n,!1))})}},createCanvas:function(){var e,t;return(e=document.createElement("canvas")).classList.add("debugThumb"),e.height=240,e.width=240,e.style.bottom=0,e.style.borderRadius="250px",e.style.opacity=.5,e.style.position="fixed",e.style.zIndex=999999999,"left"===this.data.hand?e.style.left=0:e.style.right=0,(t=e.getContext("2d")).fillStyle="#333",t.fillRect(0,0,240,240),document.body.appendChild(e),e}})},function(e,t,n){var r={"./active-item.js":60,"./agent-dance.js":61,"./agent-picker.js":62,"./beat-cut-fx.js":63,"./beat-generator.js":16,"./beat-hit-sound.js":64,"./beat.js":24,"./blade.js":65,"./check-vr.js":66,"./console-shortcuts.js":67,"./controller.js":68,"./copy-texture.js":69,"./cursor-laser.js":70,"./cursor-mesh.js":71,"./curve-follow-rig-reset.js":72,"./cutfx-shader.js":73,"./debug-beat-generator.js":76,"./debug-beat-positioning.js":77,"./debug-controller.js":78,"./debug-cursor.js":79,"./debug-intro.js":80,"./debug-song-time.js":81,"./debug-state.js":82,"./delayed-proxy-event.js":83,"./desktop-input.js":84,"./difficulty-background.js":85,"./difficulty-filter.js":86,"./difficulty-text.js":87,"./follow-position.js":88,"./follow-z.js":89,"./gameover.js":90,"./gpu-preloader.js":91,"./gradient-shader.js":92,"./hand-swapper.js":94,"./handstar-shader.js":95,"./haptics-wall.js":98,"./haptics-weapon.js":99,"./headfist.js":100,"./history.js":101,"./intro-song.js":102,"./keyboard-raycastable.js":103,"./leaderboard.js":104,"./materials.js":110,"./menu-controls.js":125,"./menu-difficulty-select.js":126,"./menu-genre.js":127,"./menu-midsection.js":128,"./menu-mode.js":129,"./menu-playlist-button.js":130,"./menu-playlist.js":131,"./menu-selected-challenge-image.js":132,"./menu-slide-animation.js":133,"./multiplayer.js":134,"./multiplier-ring.js":138,"./no-frustum-cull.js":139,"./panel-shader.js":140,"./pause.js":143,"./pauser.js":144,"./play-sound.js":145,"./player-height.js":147,"./plume.js":148,"./punch.js":149,"./raycaster-target.js":150,"./recenter.js":151,"./ring.js":152,"./score-texts.js":155,"./search-thumbnail-atlas.js":156,"./search.js":157,"./song-info-positioner.js":160,"./song-preview.js":161,"./song-progress-info.js":162,"./song.js":163,"./stage-colors.js":164,"./stage-lasers.js":165,"./stars.js":166,"./stats-param.js":167,"./stepback.js":168,"./sub-object.js":169,"./super-keyboard.js":170,"./supercurve-color.js":171,"./supercurve-shader.js":172,"./supercurve.js":175,"./supercutfx-shader.js":178,"./supercutfx.js":179,"./tail.js":180,"./text-counter.js":181,"./text-geometry.js":241,"./text-truncate.js":182,"./text-uppercase.js":183,"./toggle-pause-play.js":184,"./trail.js":185,"./tunnels.js":186,"./vertex-colors-buffer.js":187,"./victory-accuracy-ring.js":188,"./victory-rank.js":189,"./visible-raycastable.js":190,"./wall-shader.js":191,"./wall.js":194,"./weapon-particles.js":195,"./zip-loader.js":196};function i(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=59},function(e,t,n){if(AFRAME.registerComponent("active-item",{dependencies:["material"],schema:{active:{default:!1},opacity:{default:1}},init:function(){this.defaultOpacity=this.el.getAttribute("material").opacity,this.materialObj={opacity:this.data.opacity}},update:function(){var e=this.el;this.data.active?(e.setAttribute("material",this.materialObj),e.object3D.visible=!0):(e.setAttribute("material","opacity",this.defaultOpacity),e.components.animation__mouseleave&&setTimeout(()=>{e.emit("mouseleave",null,!1)}))}}),AFRAME.registerComponent("active-text-color",{dependencies:["text"],schema:{active:{default:!1},color:{default:"#333"}},init:function(){this.defaultColor=this.el.getAttribute("text").color},update:function(){var e=this.el;this.data.active?e.setAttribute("text","color",this.data.color):e.setAttribute("text","color",this.defaultColor)}}),window.AFRAME){const t=["active-item","active-text-color"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r=["dance","rumba","capoeira","thriller","wave","celebrate","taunt","silly","jump","pray","reaction","sitclap","sitlaugh","kiss","angry","defeated","falling","dying","idle","sitidle"];if(AFRAME.registerComponent("agent-dance",{schema:{base:{default:"assets/clips/"},initial:{default:"dance"}},init:function(){this.clips={},this.currentAction=null;const e=this.el,t=()=>{const t=e.getObject3D("mesh");t&&(this.mixer=new THREE.AnimationMixer(t),this.play(this.data.initial),this.buildUI())};e.getObject3D("mesh")?t():e.addEventListener("model-loaded",t),this.onKeyDown=e=>{if("INPUT"===e.target.tagName||"TEXTAREA"===e.target.tagName)return;const t="1234567890".indexOf(e.key);t>=0&&r[t]&&(this.play(r[t]),this.ui&&(this.ui.value=r[t]))},window.addEventListener("keydown",this.onKeyDown)},remove:function(){window.removeEventListener("keydown",this.onKeyDown),this.ui&&this.ui.remove()},play:function(e){if(!this.mixer)return;const t=e=>{const t=this.mixer.clipAction(e);t.reset().play(),this.currentAction&&this.currentAction!==t&&this.currentAction.crossFadeTo(t,.3,!1),this.currentAction=t};this.clips[e]?t(this.clips[e]):fetch(this.data.base+e+".json").then(e=>e.ok?e.json():null).then(n=>{if(!n)return;const r=THREE.AnimationClip.parse(n);this.clips[e]=r,t(r)}).catch(()=>{})},buildUI:function(){const e=document.createElement("select");e.style.cssText="position:fixed;top:10px;left:10px;z-index:9999998;background:rgba(0,0,0,0.7);color:#fff;font-family:monospace;padding:6px;border:1px solid #444;border-radius:4px;",e.title="Agent animation (1-0 keys also work)",r.forEach((t,n)=>{const r=document.createElement("option");r.value=t;const i=n<10?`[${(n+1)%10}] `:"";r.textContent=i+t,t===this.data.initial&&(r.selected=!0),e.appendChild(r)}),e.addEventListener("change",()=>this.play(e.value)),document.body.appendChild(e),this.ui=e},tick:function(e,t){this.mixer&&this.mixer.update(t/1e3)}}),window.AFRAME){const t=["agent-dance"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r=[{id:"cz",name:"CZ",url:"assets/avatars/cz.glb"}];function i(e){return String(e).replace(/[&<>"']/g,e=>({"&":"&","<":"<",">":">",'"':""","'":"'"}[e]))}function o(e){return"three.ws"===window.location.hostname?e:e.replace(/^https:\/\/pub-2534e921bf9c4314addcd4d8a6e98b7b\.r2\.dev/,"/r2-proxy")}if(AFRAME.registerSystem("agent-picker",{init:function(){this.agents=r.slice(),this.currentId=null,this.companionEl=null,this.searchQuery="";const e=()=>{this.companionEl=document.querySelector("#agentCompanion"),this.companionEl&&(this.buildOverlay(),this.applyInitialSelection(),this.wireSceneEvents(),this.wirePostMessage(),this.fetchPublicAvatars())};this.sceneEl.hasLoaded?e():this.sceneEl.addEventListener("loaded",e)},fetchPublicAvatars:function(e=""){const t=new URL("https://three.ws/api/explore");t.searchParams.set("only3d","1"),t.searchParams.set("limit","40"),e&&t.searchParams.set("q",e),fetch(t.toString()).then(e=>e.ok?e.json():null).then(e=>{if(!e||!Array.isArray(e.items))return;const t=e.items.filter(e=>e.glbUrl).map(e=>({id:`${e.kind}-${e.agentId||e.name}-${e.sortDate}`,name:e.name||"Untitled",url:o(e.glbUrl),owner:e.ownerShort||""}));this.agents=r.concat(t),this.renderList()}).catch(()=>{})},buildOverlay:function(){if(document.getElementById("agentPicker"))return;const e=document.createElement("div");e.id="agentPicker",e.innerHTML='\n <style>\n #agentPicker {\n position: fixed; top: 12px; right: 12px; z-index: 9999;\n font-family: system-ui, sans-serif; user-select: none;\n transition: opacity 0.3s;\n }\n #agentPicker.playing { opacity: 0; pointer-events: none; }\n #agentPicker .ap-toggle {\n background: rgba(8, 10, 24, 0.85); color: #cfd6ff;\n border: 1px solid rgba(120, 140, 255, 0.4); border-radius: 8px;\n padding: 8px 14px; font-size: 12px; letter-spacing: 0.08em;\n cursor: pointer; backdrop-filter: blur(6px);\n }\n #agentPicker .ap-toggle:hover { background: rgba(40, 50, 100, 0.9); }\n #agentPicker .ap-panel {\n margin-top: 8px; background: rgba(8, 10, 24, 0.92);\n border: 1px solid rgba(120, 140, 255, 0.3); border-radius: 8px;\n padding: 8px; width: 260px; display: none;\n backdrop-filter: blur(6px);\n }\n #agentPicker.open .ap-panel { display: block; }\n #agentPicker .ap-search {\n width: 100%; box-sizing: border-box; background: rgba(0,0,0,0.4);\n color: #cfd6ff; border: 1px solid rgba(120, 140, 255, 0.3);\n border-radius: 6px; padding: 6px 8px; font-size: 12px;\n margin-bottom: 6px; outline: none;\n }\n #agentPicker .ap-list { max-height: 320px; overflow-y: auto; }\n #agentPicker .ap-item {\n display: flex; align-items: center; gap: 10px;\n padding: 8px 10px; border-radius: 6px; cursor: pointer;\n color: #cfd6ff; font-size: 13px;\n }\n #agentPicker .ap-item:hover { background: rgba(80, 100, 200, 0.25); }\n #agentPicker .ap-item.active { background: rgba(80, 100, 200, 0.4); }\n #agentPicker .ap-dot {\n width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;\n background: linear-gradient(135deg, #6699ff, #ff4488);\n }\n #agentPicker .ap-name {\n flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;\n }\n #agentPicker .ap-owner { color: #6677aa; font-size: 10px; }\n #agentPicker .ap-empty { padding: 10px; color: #6677aa; font-size: 12px; text-align: center; }\n </style>\n <button class="ap-toggle" type="button">AGENT</button>\n <div class="ap-panel">\n <input class="ap-search" type="text" placeholder="Search avatars on three.ws..." />\n <div class="ap-list"></div>\n </div>\n ',document.body.appendChild(e);const t=e.querySelector(".ap-toggle"),n=e.querySelector(".ap-search");let r;t.addEventListener("click",()=>e.classList.toggle("open")),n.addEventListener("input",()=>{clearTimeout(r),this.searchQuery=n.value.trim(),r=setTimeout(()=>this.fetchPublicAvatars(this.searchQuery),300)}),this.overlayEl=e,this.listEl=e.querySelector(".ap-list")},renderList:function(){this.listEl&&(this.listEl.innerHTML="",this.agents.length?this.agents.forEach(e=>{const t=document.createElement("div");t.className="ap-item"+(e.id===this.currentId?" active":""),t.dataset.id=e.id,t.innerHTML=`\n <span class="ap-dot"></span>\n <span class="ap-name">${i(e.name)}</span>\n ${e.owner?`<span class="ap-owner">${i(e.owner)}</span>`:""}\n `,t.addEventListener("click",()=>{this.selectAgent(e.id),this.overlayEl.classList.remove("open")}),this.listEl.appendChild(t)}):this.listEl.innerHTML='<div class="ap-empty">No avatars found.</div>')},applyInitialSelection:function(){const e=new URLSearchParams(window.location.search).get("agent");e&&this.agents.some(t=>t.id===e)?this.selectAgent(e):this.selectAgent(this.agents[0].id),this.renderList()},selectAgent:function(e){let t;"string"==typeof e?t=this.agents.find(t=>t.id===e):e&&e.url&&(t=e,this.agents.some(e=>e.id===t.id)||this.agents.push(t)),t&&this.companionEl&&(this.currentId=t.id,this.companionEl.setAttribute("gltf-model",t.url),this.renderList(),this.sceneEl.emit("agentchanged",{agentId:t.id,url:t.url}))},wireSceneEvents:function(){const e=()=>this.overlayEl&&this.overlayEl.classList.remove("playing");this.sceneEl.addEventListener("songstartfade",()=>this.overlayEl&&this.overlayEl.classList.add("playing")),this.sceneEl.addEventListener("cleargame",e),this.sceneEl.addEventListener("gameover",e),this.sceneEl.addEventListener("songcomplete",e)},wirePostMessage:function(){window.addEventListener("message",e=>{const t=e.data;t&&"rider:setAgent"===t.type&&(t.url?this.selectAgent({id:t.agentId||"external-"+Date.now(),name:t.name||"Agent",url:t.url}):t.agentId&&this.selectAgent(t.agentId))})}}),window.AFRAME){const t=[],n=[],r=["agent-picker"];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r=new THREE.Vector3,i={right:0,upright:45,up:90,upleft:135,left:180,downleft:225,down:270,downright:315},o={right:new THREE.Vector2(0,1),upright:new THREE.Vector2(-.5,.5),up:new THREE.Vector2(-1,0),upleft:new THREE.Vector2(-.5,-.5),left:new THREE.Vector2(0,-1),downleft:new THREE.Vector2(.5,-.5),down:new THREE.Vector2(1,0),downright:new THREE.Vector2(.5,.5)};function a(e,t){e.x+=(Math.random()-.5)*t,e.y+=(Math.random()-.5)*t,e.z+=(Math.random()-.5)*t}if(AFRAME.registerComponent("beat-cut-fx",{schema:{color:{type:"string"},type:{oneOf:["beat","dot","mine"],default:"beat"}},init:function(){this.breaking=!1,this.fx=null,this.fxpool=null,this.pieces=[],this.pool=null,this.returnToPoolTimer=500,this.el.addEventListener("model-loaded",this.setupModel.bind(this)),this.el.addEventListener("explode",this.explode.bind(this),!1)},update:function(){const e=this.el.sceneEl,t=this.data.color;"beat"===this.data.type?(this.material=e.systems.materials[t+"BeatPieces"],this.poolBeat=e.components["pool__beat-broken-"+t],this.poolBeatFx=e.components["pool__beat-fx-"+t],this.poolPunchFx=e.components["pool__punch-fx-"+t]):"dot"===this.data.type?(this.material=e.systems.materials[t+"BeatPieces"],this.poolBeat=e.components[`pool__beat-broken-${t}-dot`],this.poolPunch=e.components[`pool__punch-broken-${t}-dot`],this.poolBeatFx=e.components["pool__beat-fx-"+t],this.poolPunchFx=e.components["pool__punch-fx-"+t]):(this.material=e.systems.materials.minePieces,this.poolBeat=e.components["pool__beat-broken-mine"],this.poolBeatFx=e.components["pool__beat-fx-mine"],this.poolPunchFx=e.components["pool__punch-fx-mine"])},setupModel:function(e){const t=e.detail.model;this.pieces=t.children;for(let e=0;e<this.pieces.length;e++){let t=this.pieces[e];t.restPosition=t.position.clone(),t.restRotation=t.rotation.clone(),t.posVelocity=new THREE.Vector3,t.rotVelocity=new THREE.Vector3,t.material=this.material}},explode:function(e){const t=e.detail.direction,n=e.detail.gameMode,s=e.detail.correctHit,c=e.detail.position,l=e.detail.rotation;let u=e.detail.beatDirection;if(c&&l&&t&&this.data.color===e.detail.color){if(this.el.object3D.position.copy(c),"classic"===n&&"mine"!==this.data.type){const e="dot"===this.data.type;e&&(u=Math.abs(t.x)>Math.abs(t.y)?"right":"down"),t.z*=.01,r.copy(t).multiplyScalar(-.0025).clampLength(0,.01);for(let t=0;t<this.pieces.length;t++){let n=this.pieces[t];if(n.posVelocity.copy(r),n.rotation.z=THREE.Math.degToRad(i[u]),s){let r=t%2==0?-.001:.001;n.posVelocity.x+=o[u].x*r,n.posVelocity.y+=o[u].y*r,!e||t<2?(a(n.posVelocity,.002),a(n.rotVelocity,.004)):(n.posVelocity.copy(this.pieces[t-2].posVelocity),n.rotVelocity.copy(this.pieces[t-2].rotVelocity))}else n.posVelocity.y+=.001,n.rotVelocity.z+=.01}}else for(let e=0;e<this.pieces.length;e++){let t=this.pieces[e];s?(t.posVelocity.copy(t.position).normalize().multiplyScalar(.002),t.posVelocity.z=-.004,a(t.posVelocity,.001),a(t.rotVelocity,.01)):(t.posVelocity.y+=.001,t.posVelocity.z-=.001)}this.pool=this["classic"===n?"poolBeat":"poolPunch"],null===this.fx&&(this.fxpool=this["classic"===n?"poolBeatFx":"poolPunchFx"],this.fx=this.fxpool.requestEntity()),this.fx&&(this.fx.play(),this.fx.object3D.position.copy(c),this.fx.object3D.rotation.copy(l),this.fx.emit("explode")),this.returnToPoolTimer=500,this.breaking=!0,this.el.play()}},returnToPool:function(){for(let e=0;e<this.pieces.length;e++){let t=this.pieces[e];t.position.copy(t.restPosition),t.rotation.copy(t.restRotation),t.posVelocity.set(0,0,0),t.rotVelocity.set(0,0,0),t.scale.set(1,1,1)}this.fx&&(this.fxpool.returnEntity(this.fx),this.fx=null),this.pool.returnEntity(this.el),this.breaking=!1},tick:function(e,t){if(this.breaking)if(this.returnToPoolTimer-=t,this.returnToPoolTimer<=0)this.returnToPool();else for(let e=0;e<this.pieces.length;e++){const n=this.pieces[e];n.position.addScaledVector(n.posVelocity,t),n.rotation.set(n.rotation.x+n.rotVelocity.x*t,n.rotation.y+n.rotVelocity.y*t,n.rotation.z+n.rotVelocity.z*t),"mine"!==this.data.type?(this.returnToPoolTimer<250&&n.scale.multiplyScalar(.94),n.posVelocity.multiplyScalar(.97),n.posVelocity.y-=3e-6*t):(n.scale.multiplyScalar(.94),n.posVelocity.multiplyScalar(.97))}}}),window.AFRAME){const t=["beat-cut-fx"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("beat-hit-sound",{directionsToSounds:{up:"",down:"",upleft:"left",upright:"right",downleft:"left",downright:"right",left:"left",right:"right"},init:function(){this.currentBeatEl=null,this.currentCutDirection="",this.processSound=this.processSound.bind(this),this.sourceCreatedCallback.bind(this);for(let e=1;e<=10;e++)this.el.setAttribute("sound__beathit"+e,{poolSize:8,positional:!1,src:"#hitSound"+e,volume:.185}),this.el.setAttribute(`sound__beathit${e}left`,{poolSize:8,positional:!1,src:`#hitSound${e}left`,volume:.185}),this.el.setAttribute(`sound__beathit${e}right`,{poolSize:8,positional:!1,src:`#hitSound${e}right`,volume:.185})},play:function(){for(let e=1;e<=10;e++)this.el.components["sound__beathit"+e].loaded||(this.el.setAttribute("sound__beathit"+e,"src",""),this.el.setAttribute("sound__beathit"+e,"src","#hitSound"+e)),this.el.components[`sound__beathit${e}left`].loaded||(this.el.setAttribute(`sound__beathit${e}left`,"src",""),this.el.setAttribute(`sound__beathit${e}left`,"src",`#hitSound${e}left`)),this.el.components[`sound__beathit${e}right`].loaded||(this.el.setAttribute(`sound__beathit${e}right`,"src",""),this.el.setAttribute(`sound__beathit${e}right`,"src",`#hitSound${e}right`))},playSound:function(e,t,n){const r=1+Math.floor(10*Math.random()),i=this.directionsToSounds[n||"up"];this.el.components[`sound__beathit${r}${i}`].playSound(this.processSound)},processSound:function(e){e.detune=0},sourceCreatedCallback:function(e){const t=this.getLayer(this.currentBeatEl.object3D.position.y);"bottom"===t?e.detune.setValueAtTime(-400,0):"top"===t&&e.detune.setValueAtTime(200,0),"down"===this.currentCutDirection&&e.detune.linearRampToValueAtTime(-400,1),"up"===this.currentCutDirection&&e.detune.linearRampToValueAtTime(400,1)},getLayer:function(e){return 1===e?"bottom":1.7===e?"top":"middle"}}),window.AFRAME){const t=["beat-hit-sound"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("blade",{schema:{enabled:{default:!1}},init:function(){const e=this.el;this.data;this.bladeHandle=e.querySelector(".bladeHandleHelper").object3D,this.bladeTip=e.querySelector(".bladeTipHelper").object3D,this.rigEl=document.getElementById("curveFollowRig"),this.strokeDirectionVector=new THREE.Vector3,this.strokeSpeed=0,this.bladeBottomPosition=new THREE.Vector3,this.bladeTipPositions=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3],this.bladeWorldPositions=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3],this.bladeEl=this.el.querySelector(".blade")},update:function(e){!e.enabled&&this.data.enabled&&this.bladeEl.emit("drawblade")},tickBeatSystem:function(e,t){this.data.enabled&&this.updateVelocity(t)},updateVelocity:function(e){const t=this.bladeTipPositions,n=this.bladeWorldPositions;this.data;n[2].copy(n[0]),n[3].copy(n[1]),this.bladeTip.getWorldPosition(n[0]),this.bladeHandle.getWorldPosition(n[1]),t[2].copy(n[0]),this.rigEl.object3D.worldToLocal(t[2]),this.strokeDirectionVector.copy(t[2]).sub(t[0]);const r=this.strokeDirectionVector.length();this.strokeSpeed=r/(e/1e3),this.strokeDirectionVector.z=0,this.strokeDirectionVector.normalize();const i=t.shift();t.push(i)},checkCollision:function(){const e=new THREE.Box3,t=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3],n=new THREE.Triangle;return function(r){if(this.strokeSpeed<1)return!1;for(let e=0;e<3;e++)t[e].copy(this.bladeWorldPositions[e]),r.blockEl.object3D.worldToLocal(t[e]),t[e].multiplyScalar(1.75);return n.set(t[0],t[1],t[2]),e.copy(r.bbox),e.expandByScalar(.02),"left"!==r.horizontalPosition&&"right"!==r.horizontalPosition||e.expandByScalar(.07),!!e.intersectsTriangle(n)||(t[3].copy(this.bladeWorldPositions[3]),r.blockEl.object3D.worldToLocal(t[3]),n.set(t[2],t[3],t[0]),!!e.intersectsTriangle(n))}}(),createDebugCube:function(e,t){const n=new THREE.BoxGeometry(.05,.05,.05),r=new THREE.Mesh(n,new THREE.MeshBasicMaterial({color:t,side:THREE.DoubleSide}));r.position.copy(e),this.el.sceneEl.object3D.add(r)}}),window.AFRAME){const t=["blade"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerSystem("check-vr",{init:function(){AFRAME.utils.device.isMobile()&&(document.getElementById("vrButton").style.display="none"),setTimeout(()=>{AFRAME.utils.device.checkHeadsetConnected()&&this.el.emit("displayconnected")},250)}}),window.AFRAME){const t=[],n=[],r=["check-vr"];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("console-shortcuts",{play:function(){window.$=e=>document.querySelector(e),window.$$=e=>document.querySelectorAll(e),window.$$$=e=>document.querySelector(`[${e}]`).getAttribute(e),window.$$$$=e=>document.querySelector(`[${e}]`).components[e],window.scene=this.el,window.state=this.el.systems.state.state}}),window.AFRAME){const t=["console-shortcuts"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("controller",{schema:{hand:{default:"right",oneOf:["left","right"]}},init:function(){const e=this.el,t=this.data;this.controllerType="",e.addEventListener("controllerconnected",e=>{this.controllerType=e.detail.name,this.el.setAttribute("cursor",this.config[this.controllerType].cursor||{})});const n={hand:t.hand,model:!1};e.setAttribute("daydream-controls",n),e.setAttribute("oculus-go-controls",n),e.setAttribute("oculus-touch-controls",{hand:t.hand,model:!1,orientationOffset:{x:0,y:0,z:0}}),e.setAttribute("vive-controls",n),e.setAttribute("vive-focus-controls",n),e.setAttribute("windows-motion-controls",n),e.setAttribute("generic-tracked-controller-controls",n)},config:{"daydream-controls":{cursor:{downEvents:["trackpaddown","triggerdown"],upEvents:["trackpadup","triggerup"]}},"oculus-go-controls":{cursor:{downEvents:["trackpaddown","triggerdown"],upEvents:["trackpadup","triggerup"]}},"oculus-touch-controls":{cursor:{downEvents:["triggerdown","gripdown","abuttondown","bbuttondown","xbuttondown","ybuttondown"],upEvents:["triggerup","gripup","abuttonup","bbuttonup","xbuttonup","ybuttonup"]}},"vive-controls":{cursor:{downEvents:["trackpaddown","triggerdown","gripdown"],upEvents:["trackpadup","triggerup","gripup"]}},"vive-focus-controls":{cursor:{downEvents:["trackpaddown","triggerdown","gripdown"],upEvents:["trackpadup","triggerup","gripup"]}},"windows-motion-controls":{cursor:{downEvents:["trackpaddown","triggerdown","gripdown"],upEvents:["trackpadup","triggerup","gripup"]}},"generic-tracked-controller-controls":{cursor:{downEvents:["triggerdown"],upEvents:["triggerup"]}}}}),window.AFRAME){const t=["controller"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("copy-texture",{dependencies:["geometry","material"],schema:{from:{type:"selector"}},init:function(){this.data.from.addEventListener("materialtextureloaded",()=>{this.copyTexture()}),this.copyTexture()},copyTexture:function(){const e=this.el,t=this.data.from,n=e.getObject3D("mesh").material;t.getObject3D("mesh")&&(n.map=t.getObject3D("mesh").material.map,n.map&&(n.map.needsUpdate=!0,n.needsUpdate=!0))}}),window.AFRAME){const t=["copy-texture"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("cursor-laser",{dependencies:["geometry"],schema:{enabled:{default:!0}},init:function(){const e=this.el;this.weaponEl=this.el.closest(".weapon");const t=this.el.getAttribute("geometry");e.object3D.position.z=-1*t.height/2,this.originalSize=t.height,this.currentLength=t.height},update:function(){this.el.object3D.visible=this.data.enabled},tick:function(){const e=this.el;if(!this.data.enabled)return;const t=this.weaponEl.components.cursor;if(!t)return;if(!t.intersectedEl)return e.object3D.position.z=-24.98,e.object3D.scale.x=.75,e.getObject3D("mesh").scale.y=50,void(this.currentLength=1);const n=this.weaponEl.components.raycaster.intersections[0];n&&(e.object3D.scale.x=1,e.object3D.position.z=-n.distance/2,e.getObject3D("mesh").scale.y=this.currentLength=n.distance)}}),window.AFRAME){const t=["cursor-laser"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("cursor-mesh",{schema:{active:{default:!0},cursorEl:{type:"selector"}},init:function(){this.scenePivotEl=document.getElementById("scenePivot")},update:function(){this.el.object3D.visible=this.data.active},tick:function(){var e,t,n=this.data.cursorEl,r=this.el,i=this.scenePivotEl;this.data.active&&n.components.cursor&&((t=n.components.cursor.intersectedEl)?(r.object3D.visible=!0,(e=n.components.raycaster.getIntersection(t))&&(r.object3D.position.copy(e.point),i&&r.object3D.rotation.copy(i.object3D.rotation))):r.object3D.visible=!1)}}),window.AFRAME){const t=["cursor-mesh"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("curve-follow-rig-reset",{schema:{isVictory:{type:"string"}},init:function(){this.el.sceneEl.addEventListener("cleargame",()=>{this.reset()})},update:function(e){const t=this.data;this.el;!e.isVictory&&t.isVictory&&this.reset()},reset:function(){this.el.components["supercurve-follow"].curveProgress=0,this.el.object3D.position.set(0,0,0),this.el.object3D.rotation.set(0,0,0)}}),window.AFRAME){const t=["curve-follow-rig-reset"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerShader("cutfxShader",{schema:{src:{type:"map",is:"uniform",default:"#cutfxImg"},color:{type:"color",is:"uniform",default:"#fff"},progress:{type:"number",is:"uniform"},transparent:{default:!0},blending:{default:"additive"},side:{default:"double"},depthTest:{default:!1},depthWrite:{default:!1}},vertexShader:n(74),fragmentShader:n(75)}),window.AFRAME){const t=[],n=["cutfxShader"],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t){e.exports="varying vec2 uvs;\nvoid main() {\n uvs.xy = uv.xy;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n"},function(e,t){e.exports="varying vec2 uvs;\nuniform sampler2D src;\nuniform vec3 color;\nuniform float progress;\n\nvoid main() {\n vec3 col = color;\n float alpha = smoothstep(progress, 1.0, texture2D(src, uvs).a);\n gl_FragColor = vec4(col, alpha);\n}\n"},function(e,t,n){if(AFRAME.registerComponent("debug-beat-generator",{dependencies:["beat-generator"],schema:{beatEnabled:{default:!1},stageEnabled:{default:!1}},init:function(){this.beatLoader=this.el.components["beat-generator"],this.selectedBeat={color:"red",position:"middleCenterLeft",type:"arrow",orientation:"up"},this.beats={},this.onKeyDown=this.onKeyDown.bind(this),(this.data.stageEnabled||AFRAME.utils.getUrlParameter("debugstage"))&&this.addDebugStageControls(),(this.data.beatEnabled||"gameplay"===AFRAME.utils.getUrlParameter("debugstate").trim())&&(window.addEventListener("keydown",this.onKeyDown),this.addDebugBeatControls())},spawn:function(){var e=this;Object.keys(this.beats).forEach((function(t){e.generateBeat(e.beats[t])}))},generateBeat:function(e){var t;"wall"!==e.type?(t="mine"===e.type?3:"red"===e.color?0:1,this.beatLoader.generateBeat({_lineIndex:this.beatLoader.positionHumanized[e.position].index,_lineLayer:this.beatLoader.positionHumanized[e.position].layer,_cutDirection:"dot"===e.type?8:this.beatLoader.orientationsHumanized.indexOf(e.orientation),_type:t})):this.generateWall(e)},generateWall:function(e){this.beatLoader.bpm=90,this.beatLoader.generateWall({_lineIndex:this.beatLoader.positionHumanized[e.position].index,_width:1,_duration:3})},onKeyDown:function(e){switch(e.keyCode){case 32:this.spawn()}},addDebugBeatControls:function(){const e=document.createElement("div"),t=this;var n;function r(t){const n=document.createElement("div");return n.id=t,n.style.marginBottom="20px",n.style.width="500px",n.style.display="inline-block",e.appendChild(n),n}function i(e,n,r){const i=document.createElement("div"),o=r||function(){const e=i.parentElement.querySelectorAll(".button");for(let t=0;t<e.length;t++)e[t].style.background="#000";i.style.background="#66f",t.selectedBeat[i.parentElement.id]=this.id,t["selected"+i.parentElement.id.charAt(0).toUpperCase()+i.parentElement.id.slice(1)+"El"]=this};return i.classList.add("button"),i.id=e,i.style.width="100px",i.style.height="30px",i.style.background="#000",i.style.color="#fff",i.style.zIndex=999999999,i.style.padding="5px",i.style.margin="5px",i.style.font="14px sans-serif",i.style.textAlign="center",i.style.lineHeight="30px",i.style.cursor="pointer",i.style.display="inline-block",i.innerHTML=e,n.appendChild(i),i.addEventListener("click",o),i}e.style.position="absolute",e.style.right="0",e.style.top="0",e.style.padding="10px",e.style.width="500px",e.style.height="600px",document.body.appendChild(e),function(){const t=r("type");i("arrow",t),i("dot",t),i("mine",t),i("wall",t),e.appendChild(t)}(),function(){const t=r("color");i("blue",t),i("red",t),e.appendChild(t)}(),function(){const t=r("orientation");i("top",t),i("left",t),i("right",t),i("down",t),e.appendChild(t)}(),(n=i("Set Beat",e,(function(){var e="mine"!==t.selectedBeat.type?" "+t.selectedBeat.color:"",n="arrow"!==t.selectedBeat.type?"":" "+t.selectedBeat.orientation;t.selectedBeat={position:t.selectedBeat.position,type:t.selectedBeat.type,orientation:t.selectedBeat.orientation,color:t.selectedBeat.color},t.selectedPositionEl&&(t.selectedPositionEl.innerHTML=t.selectedBeat.type+e+n,t.beats[t.selectedPositionEl.id]={position:t.selectedBeat.position,type:t.selectedBeat.type,orientation:t.selectedBeat.orientation,color:t.selectedBeat.color})}))).style.width="460px",n.style.bottomMargin="10px",function(){const e=r("position");i("topLeft",e),i("topCenterLeft",e),i("topCenterRight",e),i("topRight",e),i("middleLeft",e),i("middleCenterLeft",e),i("middleCenterRight",e),i("middleRight",e),i("bottomLeft",e),i("bottomCenterLeft",e),i("bottomCenterRight",e),i("bottomRight",e)}(),function(n,r){const o=i("Spawn (Space Bar)",e,()=>{t.spawn()});o.style.width="460px",o.style.bottomMargin="10px"}()},addDebugStageControls:function(){var e=0;const t=(t,n,r)=>{const i=document.createElement("div");i.style.position="absolute",i.id="stagecontrol"+t,i.style.width="100px",i.style.height="30px",i.style.top="element"===r?"20px":"70px",i.style.background="#000",i.style.color="#fff",i.style.zIndex=999999999,i.style.padding="5px",i.style.font="14px sans-serif",i.style.textAlign="center",i.style.cursor="pointer",i.style.left=20+120*t+"px",i.innerHTML=n,"element"===r?i.addEventListener("click",()=>{document.getElementById("stagecontrol"+e).style.background="#000",i.style.background="#66f",e=t}):i.addEventListener("click",()=>{this.beatLoader.generateEvent({_type:e,_value:t})}),document.body.appendChild(i)};["sky","tunnelNeon","leftStageLasers","rightStageLasers","floor"].forEach((e,n)=>{t(n,e,"element")}),["off","blue","blue","bluefade","","red","red","redfade"].forEach((e,n)=>{t(n,e,"value")})}}),window.AFRAME){const t=["debug-beat-generator"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r=["left","middleleft","middleright","right"],i=["bottom","middle","top"];if(AFRAME.registerComponent("debug-beat-positioning",{play:function(){let e=AFRAME.utils.getUrlParameter("debugbeatpositioning");e&&("punch"!==e&&"classic"!==e&&(e="classic"),this.el.emit("debugbeatpositioning"),setTimeout(()=>{const t=this.el.sceneEl.components["beat-generator"];t.data.gameMode=e,scene.components["beat-system"].data.gameMode=e,scene.components["beat-system"].updateBeatPositioning(),r.forEach(n=>{i.forEach(r=>{let i=t.requestBeat("punch"===e?"dot":"arrow","red"),o=Math.random()<.5?"left":"right";i.components.beat.onGenerate(.001,n,r,o),i.object3D.renderOrder=9999,i.play(),i=t.requestBeat("dot","blue"),o=Math.random()<.5?"down":"up",i.components.beat.onGenerate(.0015,n,r,o),i.object3D.renderOrder=9999,i.play()})});const n=scene.components.pool__wall.requestEntity();n.components.wall.onGenerate(.0015,"left",4,4,!0),n.play(),document.getElementById("beatContainer").removeAttribute("bind__visible"),document.getElementById("beatContainer").object3D.visible=!0},500))}}),window.AFRAME){const t=["debug-beat-positioning"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("debug-controller",{init:function(){var e,t;AFRAME.utils.getUrlParameter("debug")&&(console.log("%c debug-controller enabled ","background: #111; color: red"),e=document.getElementById("rightHand"),t=document.getElementById("leftHand"),e.setAttribute("tracked-controls","autoHide",!1),e.object3D.visible=!0,t.object3D.visible=!0,t.setAttribute("tracked-controls","autoHide",!1),AFRAME.utils.getUrlParameter("headfist")||(window.addEventListener("click",t=>{t.isTrusted&&(e.emit("triggerdown"),e.emit("triggerup"))}),"oculus"===AFRAME.utils.getUrlParameter("debug")?(e.emit("controllerconnected",{name:"oculus-touch-controls"}),t.emit("controllerconnected",{name:"oculus-touch-controls"}),e.setAttribute("controller","controllerType","oculus-touch-controls"),t.setAttribute("controller","controllerType","oculus-touch-controls")):(e.emit("controllerconnected",{name:"vive-controls"}),t.emit("controllerconnected",{name:"vive-controls"}),e.setAttribute("controller","controllerType","vive-controls"),t.setAttribute("controller","controllerType","vive-controls")),this.el.emit("enter-vr",null,!1),document.addEventListener("keydown",n=>{var r,i,o,a;n.shiftKey&&(32!==n.keyCode?81!==n.keyCode?(78===n.keyCode&&(this.secondaryGripDown?(t.emit("gripup"),this.secondaryGripDown=!1):(t.emit("gripdown"),this.secondaryGripDown=!0)),77===n.keyCode&&(this.primaryGripDown?(e.emit("gripup"),this.primaryGripDown=!1):(e.emit("gripdown"),this.primaryGripDown=!0)),49===n.keyCode&&t.emit("menudown"),n.ctrlKey?(o=t.getAttribute("position"),72===n.keyCode&&(o.x-=.02),74===n.keyCode&&(o.y-=.02),75===n.keyCode&&(o.y+=.02),76===n.keyCode&&(o.x+=.02),59!==n.keyCode&&186!==n.keyCode||(o.z-=.01),222===n.keyCode&&(o.z+=.01),t.setAttribute("position",AFRAME.utils.clone(o))):(r=e.getAttribute("position"),72===n.keyCode&&(r.x-=.02),74===n.keyCode&&(r.y-=.02),75===n.keyCode&&(r.y+=.02),76===n.keyCode&&(r.x+=.02),59!==n.keyCode&&186!==n.keyCode||(r.z-=.02),222===n.keyCode&&(r.z+=.02),e.setAttribute("position",AFRAME.utils.clone(r))),n.ctrlKey?(a=t.getAttribute("rotation"),89===n.keyCode&&(a.x-=10),79===n.keyCode&&(a.x+=10),85===n.keyCode&&(a.y-=10),73===n.keyCode&&(a.y+=10),t.setAttribute("rotation",AFRAME.utils.clone(a))):(i=e.getAttribute("rotation"),89===n.keyCode&&(i.x-=10),79===n.keyCode&&(i.x+=10),85===n.keyCode&&(i.y-=10),73===n.keyCode&&(i.y+=10),e.setAttribute("rotation",AFRAME.utils.clone(i)))):this.isSecondaryTriggerDown?(t.emit("triggerup"),this.isSecondaryTriggerDown=!1):(t.emit("triggerdown"),this.isSecondaryTriggerDown=!0):this.isTriggerDown?(e.emit("triggerup"),this.isTriggerDown=!1):(e.emit("triggerdown"),this.isTriggerDown=!0))})))},play:function(){var e,t;if(this.bounds=document.body.getBoundingClientRect(),!AFRAME.utils.getUrlParameter("debug"))return;if(AFRAME.utils.getUrlParameter("headfist"))return;e=document.getElementById("rightHand"),(t=document.getElementById("leftHand")).object3D.position.set(-.2,1.5,-.5),e.object3D.position.set(.2,1.5,-.5),t.setAttribute("rotation",{x:35,y:0,z:0});const n=AFRAME.utils.getUrlParameter("type");[e,t].forEach(e=>{e.querySelector(".laser").object3D.visible=!1,"classic"===n?(e.querySelector(".bladeContainer").removeAttribute("bind__visible"),e.querySelector(".bladeContainer").object3D.visible=!0,e.querySelector(".bladeContainer").object3D.scale.set(1,1,1)):"punch"===n?(e.querySelector(".punch").removeAttribute("bind__visible"),e.querySelector(".punch").object3D.visible=!0,e.querySelector(".punch").object3D.visible=!0,e.querySelector(".bladeHandle").object3D.visible=!1):"ride"===n&&(e.querySelector(".handStar").removeAttribute("bind__visible"),e.querySelector(".handStar").object3D.visible=!0,e.querySelector(".bladeHandle").object3D.visible=!1)})},onMouseMove:function(){const e=new THREE.Vector3,t=new THREE.Vector2,n=new THREE.Vector3;return function(r){const i=this.bounds,o=this.el.sceneEl.camera,a=r.clientX-i.left,s=r.clientY-i.top;t.x=a/i.width*2-1,t.y=-s/i.height*2-1,document.getElementById("camera").object3D.getWorldPosition(n),e.set(t.x,t.y,.5).unproject(o).sub(n).normalize();const c=document.getElementById("rightHand").object3D.position,l=-n.z/e.z;o.getWorldPosition(c).add(e.multiplyScalar(l)),c.y+=.8}}()}),window.AFRAME){const t=["debug-controller"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("debug-cursor",{init:function(){},log:function(e,t,n){t.id?console.log(`%c[${e}] ${t.id}`,"color: "+n):(console.log(`%c[${e}]`,"color: "+n),console.log(t))}}),window.AFRAME){const t=["debug-cursor"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r=AFRAME.utils.getUrlParameter("skipintro");if(AFRAME.registerComponent("debug-intro",{play:function(){r&&document.getElementById("startButton").emit("click")}}),window.AFRAME){const t=["debug-intro"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("debug-song-time",{dependencies:["song"],init:function(){AFRAME.utils.getUrlParameter("debug-song-time")&&setInterval(()=>{console.log(this.el.components.song.getCurrentTime())},250)}}),window.AFRAME){const t=["debug-song-time"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("debug-state",{play:function(){const e=AFRAME.utils.getUrlParameter("debugstate").trim();e&&setTimeout(()=>{e.split(",").forEach(e=>{this.el.sceneEl.emit("debug"+e.trim(),null,!1)})},500)}}),window.AFRAME){const t=["debug-state"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("delayed-proxy-event",{schema:{captureBubbles:{default:!1},enabled:{default:!0},event:{type:"string"},from:{type:"string"},to:{type:"string"},as:{type:"string"},bubbles:{default:!1},delay:{default:0,type:"int"}},multiple:!0,init:function(){var e,t,n,r=this.data,i=this.el,o=this;if(r.from?e="PARENT"===r.from?[i.parentNode]:document.querySelectorAll(r.from):n="CHILDREN"===r.to?i.querySelectorAll("*"):"SELF"===r.to?[i]:document.querySelectorAll(r.to),r.from)for(t=0;t<e.length;t++)this.addEventListenerFrom(e[t]);else i.addEventListener(r.event,(function(e){setTimeout(()=>{var r=o.data;if(r.enabled&&(r.captureBubbles||e.target===i))for(t=0;t<n.length;t++)n[t].emit(r.as||r.event,e.detail?e.detail:null,r.bubbles)},r.delay)}))},addEventListenerFrom:function(e){var t=this.data,n=this;e.addEventListener(t.event,(function(r){setTimeout(()=>{var t=n.data;t.enabled&&(t.captureBubbles||r.target===e)&&n.el.emit(t.as||t.event,r.detail?r.detail:null,!1)},t.delay)}))}}),window.AFRAME){const t=["delayed-proxy-event"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r=.6,i=.5;if(AFRAME.registerComponent("desktop-input",{schema:{hand:{default:"right",oneOf:["left","right"]}},init:function(){this.target=new THREE.Vector3("right"===this.data.hand?.25:-.25,1.4,0),this.lungeUntil=0,this.hasController=!1,this.el.addEventListener("controllerconnected",()=>{this.hasController=!0}),this.onMouseMove=this.onMouseMove.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onContextMenu=e=>e.preventDefault(),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mousedown",this.onMouseDown),window.addEventListener("contextmenu",this.onContextMenu)},remove:function(){window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mousedown",this.onMouseDown),window.removeEventListener("contextmenu",this.onContextMenu)},onMouseMove:function(e){const t=e.clientX/window.innerWidth*2-1,n=e.clientY/window.innerHeight*2-1;this.target.x=("right"===this.data.hand?.25:-.25)+t*r,this.target.y=1.4-n*i},onMouseDown:function(e){const t="right"===this.data.hand,n=2===e.button||e.shiftKey;t&&n||(t||n)&&(this.lungeUntil=performance.now()+140,this.el.emit("triggerdown",null,!1),setTimeout(()=>this.el.emit("triggerup",null,!1),140))},tick:function(){if(this.hasController)return;const e=this.el.object3D,t=performance.now()<this.lungeUntil;e.position.x+=.35*(this.target.x-e.position.x),e.position.y+=.35*(this.target.y-e.position.y);const n=t?-.6:this.target.z;e.position.z+=.5*(n-e.position.z)}}),window.AFRAME){const t=["desktop-input"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("difficulty-background",{schema:{enabled:{type:!1}},update:function(){this.data.enabled?this.el.setAttribute("raycastable",""):this.el.removeAttribute("raycastable")}}),window.AFRAME){const t=["difficulty-background"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("difficulty-filter",{events:{click:function(e){this.el.sceneEl.emit("difficultyfilter",e.target.parentNode.dataset.difficultyFilter)}}}),window.AFRAME){const t=["difficulty-filter"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("difficulty-text",{schema:{id:{value:"Standard-Easy"}},update:function(){this.el.setAttribute("text","value",this.data.id.replace("Standard-","").replace("-","\n"))}}),window.AFRAME){const t=["difficulty-text"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("follow-position",{schema:{target:{type:"selector"}},tick:function(){this.el.object3D.position.copy(this.data.target.object3D.position)}}),window.AFRAME){const t=["follow-position"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("follow-z",{schema:{offset:{type:"vec3"},target:{type:"selector"}},tick:function(){this.data.target&&(this.el.object3D.position.copy(this.data.offset),this.el.object3D.position.z+=this.data.target.object3D.position.z)}}),window.AFRAME){const t=["follow-z"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("gameover",{schema:{isGameOver:{default:!1}},init:function(){this.beatContainer=document.getElementById("beatContainer"),this.gameOverEls=document.querySelectorAll("[animation__gameover]")},update:function(e){this.data;!e.isGameOver&&this.data.isGameOver&&(this.triggerAnimations(),this.countDown=1),e.isGameOver&&!this.data.isGameOver&&this.reset()},tick:function(e,t){this.data.isGameOver&&this.countDown>=0&&(this.beatContainer.object3D.position.z=1.5*-Math.pow(1-this.countDown,2),this.countDown-=t/1e3)},reset:function(){this.beatContainer.object3D.position.z=0,this.el.sceneEl.setAttribute("stage-colors","color","blue")},triggerAnimations:function(){for(let e=0;e<this.gameOverEls.length;e++)this.gameOverEls[e].emit("gameover",null,!1);this.el.emit("textglowoff",null,!1),this.el.emit("bgcolorgameover",null,!1)}}),window.AFRAME){const t=["gameover"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){let r=0;if(AFRAME.registerComponent("gpu-preloader",{dependencies:["materials"],play:function(){setTimeout(()=>{this.preloadFromSelector("#mainLogo"),this.preloadFromSelector("#prevArrow"),this.preloadFromSelector("#stepback"),this.preloadFromSelector(".difficultyBackground"),this.preloadFromSelector(".genreIcon"),this.preloadFromSelector(".merkababloom"),this.preloadFromSelector(".searchResultBackground"),this.preloadMaterialsComponentTextures(),this.preloadKeyboard(),this.preloadSlice(),this.preloadEnvMap(),this.preloadFXs()},1e3)},preloadFromSelector:function(e){const t=document.querySelector(e);this.preloadTexture(t.getObject3D("mesh").material.map)},preloadMaterialsComponentTextures:function(){const e=this.el.systems.materials.textureList;for(var t=0;t<e.length;t++)this.preloadTexture(e[t])},preloadKeyboard:function(){const e=document.getElementById("keyboard").components["super-keyboard"];this.preloadTexture(e.kbImg.getObject3D("mesh").material.map),this.preloadTexture(e.keyColorPlane.getObject3D("mesh").material.map)},preloadSlice:function(){const e=document.getElementById("searchPrevPage");this.preloadTexture(e.components.slice9.material.map)},preloadEnvMap:function(){const e=document.querySelector("#wallContainer [wall]");this.preloadTexture(e.components.material.material.uniforms.environment.value)},preloadFXs:function(){const e=document.querySelector("#rigContainer [mixin~=blueBeatFX]");this.preloadTexture(e.components.material.material.uniforms.src.value);const t=document.querySelector("#rigContainer [mixin~=mineFX]");this.preloadTexture(t.components.material.material.map)},preloadTexture:function(e){e&&e.image?e.image.complete?this.el.renderer.setTexture2D(e,r++%8):console.warn("[gpu-preloader] Error preloading, image not loaded",e):console.warn("[gpu-preloader] Error preloading texture",e)}}),window.AFRAME){const t=["gpu-preloader"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerShader("gradientShader",{schema:{color1:{type:"color",is:"uniform"},color2:{type:"color",is:"uniform"}},vertexShader:n(17),fragmentShader:n(93)}),window.AFRAME){const t=[],n=["gradientShader"],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t){e.exports="varying vec2 uvs;\nuniform vec3 color1;\nuniform vec3 color2;\n\nvoid main () {\n float mixDistance = distance(uvs, vec2(0.5, 0));\n float alphaDistance = min(1., (0.5 - distance(uvs, vec2(0.5))) * 2.5);\n gl_FragColor = vec4(mix(color1, color2, pow(mixDistance, 2.4)), alphaDistance);\n}\n"},function(e,t,n){const r=["triggerdown","gripdown","abuttondown","bbuttondown","xbuttondown","ybuttondown","trackpaddown"];if(AFRAME.registerComponent("hand-swapper",{schema:{enabled:{default:!1}},init:function(){this.swapHand=this.swapHand.bind(this),r.forEach(e=>{this.el.addEventListener(e,this.swapHand)})},swapHand:function(){this.data.enabled&&this.el.sceneEl.emit("activehandswap",null,!1)}}),window.AFRAME){const t=["hand-swapper"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){"use strict";n.r(t);var r=n(0),i=n.n(r);if(AFRAME.registerShader("handStar",{schema:{colorPrimary:{type:"color",is:"uniform",default:i.a.initial.primary},colorSecondary:{type:"color",is:"uniform",default:i.a.initial.secondary},colorTertiary:{type:"color",is:"uniform",default:i.a.initial.tertiary},pulse:{type:"number",is:"uniform",default:0},transparent:{default:!0},side:{default:"back"},depthTest:{default:!1}},vertexShader:n(96),fragmentShader:n(97)}),window.AFRAME){const t=[],n=["handStar"],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t){e.exports="varying vec3 vWorldPosition;\nvarying float fresnel;\nuniform float pulse;\n\nvoid main() {\n vWorldPosition = (modelMatrix * vec4(position, 1.0)).xyz;\n vec3 worldNormal = normalize(mat3(modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz) * normal);\n vec3 viewVector = normalize(vWorldPosition - cameraPosition);\n fresnel = 0.08 * pow(0.4 + dot(viewVector, worldNormal), 6.0 + pulse);\n\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n"},function(e,t){e.exports="varying vec3 vWorldPosition;\nvarying float fresnel;\nuniform float pulse;\nuniform vec3 colorPrimary;\nuniform vec3 colorSecondary;\nuniform vec3 colorTertiary;\n\nvoid main() {\n vec3 colorize = vWorldPosition-cameraPosition;\n colorize = clamp(colorize + 0.5, vec3(0.0), vec3(1.0));\n vec3 col = mix(mix(colorPrimary, colorSecondary, colorize.x), colorTertiary, colorize.z);\n col += (fresnel * pulse) * 0.1;\n gl_FragColor = vec4 (col, clamp(fresnel, 0.0, 1.0));\n}\n"},function(e,t,n){if(AFRAME.registerComponent("haptics-wall",{schema:{enabled:{default:!1}},init:function(){const e=this.el;this.isHittingWall=!1,e.setAttribute("haptics__wall",{dur:50,force:.15}),this.checkIfHittingWall=this.checkIfHittingWall.bind(this),e.addEventListener("mouseenter",this.checkIfHittingWall),e.addEventListener("mouseleave",this.checkIfHittingWall),this.tick=AFRAME.utils.throttleTick(this.tick.bind(this),50)},checkIfHittingWall:function(){const e=this.el.components.raycaster__game.intersectedEls;this.isHittingWall=!1;for(let t=0;t<e.length;t++)if(e[t].components.wall)return void(this.isHittingWall=!0)},tick:function(){this.data.enabled&&this.isHittingWall&&this.el.components.haptics__wall.pulse()}}),window.AFRAME){const t=["haptics-wall"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("haptics-weapons",{schema:{enabled:{default:!1}},init:function(){const e=this.el;this.isColliding=!1,this.tick=AFRAME.utils.throttleTick(this.tick.bind(this),100),e.setAttribute("haptics__weapon",{dur:100,force:.075}),e.addEventListener("mouseenter",t=>{if(!t.detail||!t.detail.intersectedEl||!this.data.enabled)return;const n=t.detail.intersectedEl;n.classList.contains("blade")&&n!==e?(this.isColliding=!0,this.el.components.haptics__weapon.pulse()):this.isColliding=!1}),e.addEventListener("mouseleave",e=>{this.isColliding=!1})},tick:function(){this.isColliding&&this.data.enabled&&this.el.components.haptics__weapon.pulse()}}),window.AFRAME){const t=["haptics-weapons"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r=!!AFRAME.utils.getUrlParameter("headfist");if(AFRAME.registerComponent("headfist",{schema:{hand:{type:"string"},isPlaying:{default:!1}},init:function(){console.log("[headfist] "+r),r&&(this.camera=document.getElementById("camera").object3D,this.originalParent=this.el.object3D.parent)},update:function(){const e=this.el;if(r&&this.camera)return this.data.isPlaying?(this.camera.add(e.object3D),e.object3D.rotation.set(-5,0,0),e.object3D.position.set("right"===this.data.hand?.175:-.175,.15,-.2),e.components["tracked-controls"].pause(),e.components["tracked-controls-webvr"]&&e.components["tracked-controls-webvr"].pause(),void(e.components["tracked-controls-webxr"]&&e.components["tracked-controls-webxr"].pause())):void(e.object3D.parent!==this.originalParent&&(console.log("[headfist] Detach."),this.originalParent.add(e.object3D),e.components["tracked-controls-webvr"]&&e.components["tracked-controls-webvr"].play(),e.components["tracked-controls-webxr"]&&e.components["tracked-controls-webxr"].play()))}}),window.AFRAME){const t=["headfist"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("history",{schema:{challengeId:{type:"string"},songName:{type:"string"},songSubName:{type:"string"}},update:function(){const e=this.data;history.pushState("",e.songName,updateQueryParam(window.location.href,"challenge",e.challengeId)),document.title="Super Saber - "+e.songName}}),window.AFRAME){const t=["history"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("intro-song",{schema:{isPlaying:{default:!0},isSearching:{default:!1}},init:function(){this.analyserEl=document.getElementById("audioAnalyser"),this.audio=document.getElementById("introSong"),this.timeout=null},update:function(e){const t=this.audio;this.el.sceneEl.isPlaying&&(!e.isSearching&&this.data.isSearching||(!e.isPlaying&&this.data.isPlaying&&(this.analyserEl.components.audioanalyser.resumeContext(),this.analyserEl.setAttribute("audioanalyser","src",t),this.fadeInAudio()),e.isPlaying&&!this.data.isPlaying&&t.pause()))},pause:function(){this.audio.pause()},play:function(){this.fadeInAudio()},fadeInAudio:function(){if(AFRAME.utils.getUrlParameter("mute"))return;const e=this.analyserEl.components.audioanalyser.context,t=this.analyserEl.components.audioanalyser.gainNode;t.gain.setValueAtTime(0,e.currentTime),this.audio.play(),t.gain.linearRampToValueAtTime(.5,e.currentTime+.5)}}),window.AFRAME){const t=["intro-song"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("keyboard-raycastable",{dependencies:["super-keyboard"],schema:{condition:{default:""}},play:function(){this.el.components["super-keyboard"].kbImg.setAttribute("bind-toggle__raycastable",this.data.condition)}}),window.AFRAME){const t=["keyboard-raycastable"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r=n(25),i=n(105);n(107);const o=/(fuc)|(ass)|(nig)|(shit)|(retard)/gi;if(AFRAME.registerComponent("leaderboard",{schema:{challengeId:{default:""},difficulty:{default:""},beatmapCharacteristic:{default:""},inVR:{default:!1},gameMode:{type:"string"},menuSelectedChallengeId:{default:""},isVictory:{default:!1}},init:function(){this.qualifyingIndex=void 0,this.scores=[],this.eventDetail={scores:this.scores},this.addEventDetail={scoreData:void 0,index:void 0},this.username=localStorage.getItem("threewsusername")||"Super Zealot",this.el.addEventListener("leaderboardusername",e=>{this.username=e.detail.value,localStorage.setItem("threewsusername",this.username)}),this.el.addEventListener("leaderboardsubmit",this.addScore.bind(this)),this.initFirebase()},initFirebase:async function(){try{const e=await fetch("/api/rider/firebase"),t=await e.json();t.apiKey&&!r.apps.length&&(r.initializeApp(t),this.firestore=r.firestore(),this.firestore.settings({}),this.db=this.firestore.collection("scores"))}catch(e){console.error("Error fetching Firebase config",e)}},update:function(e){!r.apps.length&&this.data.apiKey&&(r.initializeApp({apiKey:this.data.apiKey,authDomain:this.data.authDomain,databaseURL:this.data.databaseURL,projectId:this.data.projectId,storageBucket:this.data.storageBucket,messagingSenderId:this.data.messagingSenderId}),this.firestore=r.firestore(),this.firestore.settings({}),this.db=this.firestore.collection("scores")),!e.isVictory&&this.data.isVictory&&this.checkLeaderboardQualify(),this.data.difficulty&&e.difficulty!==this.data.difficulty||this.data.menuSelectedChallengeId&&e.menuSelectedChallengeId!==this.data.menuSelectedChallengeId?this.fetchScores(this.data.menuSelectedChallengeId):this.data.challengeId&&e.challengeId!==this.data.challengeId&&this.fetchScores(this.data.challengeId)},addScore:function(){const e=this.el.sceneEl.systems.state.state;if(!e.isVictory||!e.inVR)return;const t={accuracy:e.score.accuracy,challengeId:e.challenge.id,gameMode:this.data.gameMode,score:e.score.score,username:this.username,difficulty:this.data.difficulty||e.challenge.difficulty,time:new Date};i.includes(this.username.toLowerCase())||this.username.match(o)||this.db.add(t),this.addEventDetail.scoreData=t,this.el.emit("leaderboardscoreadded",this.addEventDetail,!1)},fetchScores:function(e){if("ride"===this.data.gameMode)return;const t=this.el.sceneEl.systems.state.state;this.db.where("challengeId","==",e).where("difficulty","==",t.menuSelectedChallenge.id?t.menuSelectedChallenge.difficulty:t.challenge.difficulty).where("gameMode","==",this.data.gameMode).orderBy("score","desc").orderBy("time","asc").limit(10).get().then(t=>{this.eventDetail.challengeId=e,this.scores.length=0,t.empty||t.forEach(e=>this.scores.push(e.data())),this.el.sceneEl.emit("leaderboard",this.eventDetail,!1)}).catch(e=>{console.error("[firestore]",e)})},checkLeaderboardQualify:function(){const e=this.el.sceneEl.systems.state.state.score.score;if(!AFRAME.utils.getUrlParameter("dot")){if(this.scores.length<10)return this.qualifyingIndex=this.scores.length,void this.el.sceneEl.emit("leaderboardqualify",this.scores.length,!1);for(let t=0;t<this.scores.length;t++)if(e>this.scores[t].score)return this.qualifyingIndex=t,void this.el.sceneEl.emit("leaderboardqualify",t,!1)}}}),window.AFRAME){const t=["leaderboard"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){e.exports=n(106)},function(e){e.exports=JSON.parse('["2 girls 1 cup","2g1c","4r5e","5h1t","5hit","5ht","666","@$$","a s s","a s shole","a55","a55hole","a_s_s","abbo","abeed","abuse","acrotomophilia","addicts","aeolus","africoon","ahole","alabama hot pocket","alaskan pipeline","alligator bait","alligatorbait","amcik","anal","analannie","analprobe","analsex","andskota","anilingus","anus","apeshit","ar5e","arabush","arabushs","areola","areole","argie","arian","armo","armos","aroused","arrse","arschloch","arse","arsehole","aryan","ash0le","ash0les","asholes","ass monkey","ass","ass-fucker","ass-hat","ass-pirate","assbag","assbagger","assbandit","assbang","assbanged","assbanger","assbangs","assbite","assblaster","assclown","asscock","asscowboy","asscracker","asses","assface","assfuck","assfucker","assfukka","assgoblin","assh0le","assh0lez","asshat","asshead","assho1e","asshole","assholes","assholz","asshopper","asshore","assjacker","assjockey","asskiss","asskisser","assklown","asslick","asslicker","asslover","assman","assmaster","assmonkey","assmunch","assmuncher","assnigger","asspacker","asspirate","asspuppies","assrammer","assranger","assshit","assshole","asssucker","asswad","asswhole","asswhore","asswipe","asswipes","auto erotic","autoerotic","ayir","azazel","azz","azzhole","b a s t a r d","b i t c h","b o o b","b!+ch","b!tch","b!tchin","b*tch","b00b","b00bies","b00biez","b00bs","b00bz","b17ch","b1tch","b7ch","babeland","babes","baby batter","baby juice","backdoor","backdoorman","badfuck","bagging","ball gag","ball gravy","ball kicking","ball licking","ball sack","ball sucking","ballbag","balllicker","ballsack","bampot","bangbro","bangbros","banger","banging","bareback","barely legal","barelylegal","barenaked","barf","barface","barfface","bassterd","bassterds","bastard","bastardo","bastards","bastardz","basterds","basterdz","bastinado","bawdy","bazongas","bazooms","bbw","bdsm","beaner","beaners","beaney","beaneys","beardedclam","beastality","beastial","beastiality","beastility","beatch","beatoff","beatyourmeat","beaver cleaver","beaver lips","beaver","beeyotch","bellend","beotch","bestial","bestiality","bi curious","bi+ch","bi7ch","biatch","bicurious","big black","big breasts","big knockers","big tits","bigass","bigbastard","bigbreasts","bigbutt","bigtits","bimbo","bimbos","bint","birdlock","bitch","bitchass","bitched","bitcher","bitchers","bitches","bitchez","bitchin","bitching","bitchslap","bitchtit","bitchy","biteme","black cock","blackcock","blackman","blackout","blacks","blonde action","blonde on blonde action","blonde on blonde","bloody","blow j","blow job","blow your l","blow your load","blowjob","blowjobs","blue waffle","bluegum","bluegums","blumpkin","bo ob","bo obs","boang","boche","boches","bodily","boffing","bogan","bohunk","boink","boiolas","bollick","bollock","bollocks","bollok","bollox","bombers","bombing","bomd","bondage","boned","boner","boners","bong","boob","boobies","boobs","booby","boobz","boody","booger","bookie","boong","boonga","boongas","boongs","boonie","boonies","booobs","boooobs","booooobs","booooooobs","bootee","bootlip","bootlips","booty call","booty","bootycall","boozer","boozy","bosch","bosche","bosches","boschs","bosomy","bounty bar","bounty bars","bountybar","brea5t","breastjob","breastlover","breastman","brothel","brown showers","brunette action","btch","buceta","buddhahead","buddhaheads","buffies","bugger","buggered","buggery","bukkake","bule","bules","bullcrap","bulldike","bulldyke","bullet vibe","bullshit","bullshits","bullshitted","bullturds","bumblefuck","bumfuck","bung hole","bung","bunga","bungas","bunghole","bunny fucker","burr head","burr heads","burrhead","burrheads","butchbabes","butchdike","butchdyke","butt plug","butt-pirate","buttbang","buttcheeks","buttface","buttfuck","buttfucker","buttfuckers","butthead","butthole","buttman","buttmuch","buttmunch","buttmuncher","buttons","buttpirate","buttplug","buttstain","buttwipe","byatch","c u n t","c-0-c-k","c-o-c-k","c-u-n-t","c.0.c.k","c.o.c.k.","c.u.n.t","c0ck","c0cks","c0cksucker","c0k","cabron","caca","cacker","cahone","camel jockey","camel jockeys","camel toe","cameljockey","cameltoe","camgirl","camslut","camwhore","carpet muncher","carpetmuncher","carruth","cawk","cawks","cazzo","cervix","chav","cheese eating surrender monkey","cheese eating surrender monkies","cheeseeating surrender monkey","cheeseeating surrender monkies","cheesehead","cheeseheads","cherrypopper","chickslick","china swede","china swedes","chinaman","chinamen","chinaswede","chinaswedes","chinc","chincs","ching chong","ching chongs","chinga","chingchong","chingchongs","chink","chinks","chinky","choad","chocolate rosebuds","chode","chodes","chonkies","chonky","chonkys","chraa","christ killer","christ killers","chug","chugs","chuj","chunger","chungers","chunkies","chunkys","chute","cipa","circlejerk","cl1t","clamdigger","clamdiver","clamps","clansman","clansmen","clanswoman","clanswomen","cleveland steamer","climax","clit","clitface","clitfuck","clitoris","clitorus","clits","clitty","clogwog","clover clamps","clusterfuck","cnts","cntz","cnut","cocain","cocaine","cock","cock-head","cock-sucker","cockbite","cockblock","cockblocker","cockburger","cockcowboy","cockface","cockfight","cockfucker","cockhead","cockholster","cockknob","cockknocker","cocklicker","cocklover","cockmonkey","cockmunch","cockmuncher","cocknob","cocknose","cocknugget","cockqueen","cockrider","cocks","cockshit","cocksman","cocksmith","cocksmoker","cocksucer","cocksuck","cocksucked","cocksucker","cocksucking","cocksucks","cocksuka","cocksukka","cocktease","cocky","cohee","coital","coitus","cok","cokmuncher","coksucka","commie","condom","coochie","coochy","coolie","coolies","cooly","coon ass","coon asses","coon","coonass","coonasses","coondog","coons","cooter","coprolagnia","coprophilia","copulate","corksucker","cornhole","cowgirl","cox","cra5h","crabs","crackcocain","cracker","crackpipe","crackwhore","crap","crapola","crapper","crappy","crash","creampie","crotch","crotchjockey","crotchmonkey","crotchrot","cum","cumbubble","cumdumpster","cumfest","cumjockey","cumm","cummer","cummin","cumming","cumquat","cumqueen","cums","cumshot","cumshots","cumslut","cumstain","cumtart","cunilingus","cunillingus","cunn","cunnie","cunnilingus","cunntt","cunny","cunt","cunteyed","cuntface","cuntfuck","cuntfucker","cunthole","cunthunter","cuntlick","cuntlicker","cuntlicking","cuntrag","cunts","cuntslut","cuntsucker","cuntz","curry muncher","curry munchers","currymuncher","currymunchers","cushi","cushis","cyalis","cyberfuc","cyberfuck","cyberfucked","cyberfucker","cyberfuckers","cyberfucking","cybersex","cyberslimer","d0ng","d0uch3","d0uche","d1ck","d1ld0","d1ldo","d4mn","dago","dagos","dahmer","damm","dammit","damn","damnation","damned","damnit","darkey","darkeys","darkie","darkies","darky","date rape","daterape","datnigga","dawgie style","dawgie-style","daygo","deapthroat","deep throat","deep throating","deepaction","deepthroat","deepthroating","defecate","deggo","dego","degos","demon","dendrophilia","destroyyourpussy","deth","diaper head","diaper heads","diaperhead","diaperheads","dick pic","dick","dick-ish","dickbag","dickbeaters","dickbrain","dickdipper","dickface","dickflipper","dickforbrains","dickfuck","dickhead","dickheads","dickhole","dickish","dickjuice","dickless","dicklick","dicklicker","dickman","dickmilk","dickpic","dickripper","dicks","dicksipper","dickslap","dickwad","dickweasel","dickweed","dickwhipper","dickwod","dickzipper","diddle","dike","dild0","dild0s","dildo","dildos","dilf","diligaf","dilld0","dilld0s","dillweed","dimwit","dingle","dingleberries","dingleberry","dink","dinks","dipship","dipshit","dipstick","dirsa","dirty pillows","dirty sanchez","dix","dixiedike","dixiedyke","dlck","dog style","dog-fucker","doggie style","doggie","doggie-style","doggiestyle","doggin","dogging","doggy style","doggy-style","doggystyle","dolcett","domination","dominatricks","dominatrics","dominatrix","dommes","dong","donkey punch","donkeypunch","donkeyribber","doochbag","doodoo","doofus","dookie","doosh","dot head","dot heads","dothead","dotheads","double dong","double penetration","doubledong","doublepenetration","douch3","douche bag","douche","douche-fag","douchebag","douchebags","douchewaffle","douchey","dp action","dp","dpaction","dragqueen","dragqween","dripdick","drug","dry hump","dryhump","duche","dudette","dumass","dumb ass","dumbass","dumbasses","dumbbitch","dumbfuck","dumbshit","dummy","dumshit","dune coon","dune coons","dupa","dvda","dyefly","dyke","dykes","dziwka","earotics","easyslut","eat my ass","eat my","eatballs","eatme","eatmyass","eatpussy","ecchi","ejackulate","ejaculate","ejaculated","ejaculates","ejaculating","ejaculatings","ejaculation","ejaculations","ejakulate","ekrem","ekto","enculer","enema","enlargement","erect","erection","ero","erotic","erotism","escort","esqua","essohbee","ethical slut","evl","excrement","exkwew","explosion","extacy","extasy","f u c k e r","f u c k e","f u c k","f u k","f*ck","f-u-c-k","f.u.c.k","f4nny","f_u_c_k","facefucker","fack","faeces","faen","fag","fag1t","fagbag","faget","fagfucker","fagg","fagg1t","fagged","fagging","faggit","faggitt","faggot","faggotcock","faggs","fagit","fagot","fagots","fags","fagt","fagtard","fagz","faig","faigs","faigt","fanculo","fannybandit","fannyflaps","fannyfucker","fanyy","fartknocker","farty","fastfuck","fatah","fatass","fatfuck","fatfucker","fatso","fck","fckcum","fckd","fcuk","fcuker","fcuking","fecal","feces","feck","fecker","feg","felatio","felch","felcher","felching","fellate","fellatio","feltch","feltcher","feltching","female squirting","femalesquirtin","femalesquirting","femdom","fetish","ficken","figging","fingerbang","fingerfood","fingerfuck","fingerfucked","fingerfucker","fingerfuckers","fingerfucking","fingerfucks","fingering","fisted","fister","fistfuck","fistfucked","fistfucker","fistfuckers","fistfucking","fistfuckings","fistfucks","fisting","fisty","fitt","flamer","flange","flasher","flikker","flipping the bird","floo","floozy","flydie","flydye","foad","fok","fondle","foobar","fook","fooker","foot fetish","footaction","footfetish","footfuck","footfucker","footjob","footlicker","footstar","foreskin","forni","fornicate","fotze","foursome","fourtwenty","freakfuck","freakyfucker","freefuck","freex","frigg","frigga","frotting","fubar","fucck","fuck buttons","fuck","fuck-tard","fucka","fuckable","fuckass","fuckbag","fuckbook","fuckboy","fuckbrain","fuckbuddy","fuckbutt","fuckd","fucked","fuckedup","fucker","fuckers","fuckersucker","fuckface","fuckfest","fuckfreak","fuckfriend","fuckhead","fuckheads","fuckher","fuckhole","fuckin","fuckina","fucking","fuckingbitch","fuckings","fuckingshitmotherfucker","fuckinnuts","fuckinright","fuckit","fuckknob","fuckme","fuckmehard","fuckmonkey","fuckn","fucknugget","fucknut","fucknuts","fucknutt","fucknutz","fuckoff","fuckpig","fuckr","fucks","fuckstick","fucktard","fucktards","fuckup","fuckwad","fuckwhit","fuckwhore","fuckwit","fuckwitt","fuckyou","fudge packer","fudgepacker","fugly","fuk","fukah","fuken","fuker","fukin","fuking","fukk","fukkah","fukken","fukker","fukkin","fuks","fuktard","fuktards","fukwhit","fukwit","funeral","funfuck","fungus","futanari","futkretzn","fuuck","fux","fux0r","fvck","fvk","fxck","g-spot","g00k","gae","gai","gang bang","gangbang","gangbanged","gangbanger","gangbangs","gangsta","ganja","gator bait","gatorbait","gay sex","gayboy","gaygirl","gaylord","gaymuthafuckinwhore","gays","gaysex","gayz","geezer","geni","genital","genitals","getiton","gey","gfy","ghay","ghey","giant cock","gigolo","ginzo","ginzos","gipp","gippo","gippos","gipps","girl on top","girl on","girls gone wild","givehead","glans","glazeddonut","goatcx","goatse","gob","god dammit","god damn","god damnit","god-dam","god-damned","godam","godammit","godamn","godamnit","goddam","goddamit","goddamm","goddammit","goddamn","goddamned","goddamnes","goddamnit","goddamnmuthafucker","gokkun","golden shower","goldenshower","golliwog","golliwogs","gonad","gonads","gonorrehea","gonzagas","goo girl","gooch","goodpoop","gook eye","gook eyes","gook","gookeye","gookeyes","gookies","gooks","gooky","gora","goras","goregasm","gotohell","goy","goyim","greaseball","greaseballs","gringo","gringos","groe","groid","groids","grope","gross","grostulation","group sex","gspot","gstring","gtfo","gub","gubba","gubbas","gubs","guido","guiena","guineas","guizi","gummer","guro","gwailo","gwailos","gweilo","gweilos","gyopo","gyopos","gyp","gyped","gypo","gypos","gypp","gypped","gyppie","gyppies","gyppo","gyppos","gyppy","gyppys","gypsys","h e l l","h o m","h00r","h0ar","h0m0","h0mo","h0r","h0re","h4x0r","hadji","hadjis","hairyback","hairybacks","haji","hajis","hajji","hajjis","half breed","half caste","halfbreed","halfcaste","hamas","hand job","handjob","haole","haoles","hapa","hard core","hardcore","hardcoresex","hardon","harem","he11","headfuck","hebe","hebes","heeb","heebs","hell","hells","helvete","henhouse","hentai","heroin","herp","herpes","herpy","heshe","hijacker","hijacking","hillbillies","hillbilly","hindoo","hiscock","hitler","hitlerism","hitlerist","ho","hobag","hodgie","hoe","hoer","hoes","holestuffer","hom0","homey","homicide","homo","homobangers","homodumbshit","homoey","honger","honkers","honkey","honkeys","honkie","honkies","honky","hooch","hooker","hookers","hoor","hoore","hootch","hooter","hooters","hore","hori","horis","hork","horndawg","horndog","horney","horniest","horny","horseshit","hosejob","hoser","hot carl","hot chick","hotcarl","hotdamn","hotpussy","hotsex","hottotrot","how to kill","how to murder","huevon","huge fat","hugefat","hui","hummer","humped","humper","humpher","humphim","humpin","humping","husky","hussy","hustler","hymen","hymie","hymies","iblowu","ike","ikes","ikey","ikeymo","ikeymos","ikwe","illegal","illegals","inbred","incest","indon","indons","injun","injuns","insest","intercourse","interracial","intheass","inthebuff","israels","j3rk0ff","jack off","jack-off","jackass","jackhole","jackoff","jackshit","jacktheripper","jail bait","jailbait","jap","japcrap","japie","japies","japs","jebus","jelly donut","jerk off","jerk","jerk-off","jerk0ff","jerked","jerkoff","jerries","jerry","jesuschrist","jewed","jewess","jig","jiga","jigaboo","jigaboos","jigarooni","jigaroonis","jigg","jigga","jiggabo","jiggaboo","jiggabos","jiggas","jigger","jiggerboo","jiggers","jiggs","jiggy","jigs","jihad","jijjiboo","jijjiboos","jimfish","jisim","jism","jiss","jiz","jizim","jizin","jizjuice","jizm","jizn","jizz","jizzd","jizzed","jizzim","jizzin","jizzn","jizzum","jugg","juggs","jugs","jungle bunnies","jungle bunny","junglebunny","junkie","junky","kacap","kacapas","kacaps","kaffer","kaffir","kaffre","kafir","kanake","kanker","katsap","katsaps","kawk","khokhol","khokhols","kicking","kigger","kike","kikes","killer","kills","kimchis","kinbaku","kink","kinkster","kinky","kissass","kkk","klan","klansman","klansmen","klanswoman","klanswomen","klootzak","knobbing","knobead","knobed","knobend","knobhead","knobjocky","knobjokey","knobz","knockers","knulle","kock","kondum","kondums","kooch","kooches","koon","kootch","krap","krappy","kraut","krauts","kuffar","kuk","kuksuger","kum","kumbubble","kumbullbe","kumer","kummer","kumming","kumquat","kums","kunilingus","kunnilingus","kunt","kunts","kuntz","kurac","kurwa","kushi","kushis","kusi","kwa","kwai lo","kwai los","ky","kyke","kykes","kyopo","kyopos","kyrpa","l3i+ch","l3i\\\\+ch","l3itch","labia","lapdance","lds","leather restraint","leather straight jacket","leather straight","leatherrestraint","lebo","lebos","lech","lemon party","lemonparty","leper","lesbain","lesbayn","lesbian","lesbin","lesbo","lez","lezbe","lezbefriends","lezbian","lezbians","lezbo","lezbos","lezz","lezzian","lezzie","lezzies","lezzo","lezzy","libido","licker","licking","lickme","lilniglet","limey","limpdick","limy","lingerie","lipshits","lipshitz","livesex","lmfao","loadedgun","loin","loins","lolita","lovebone","lovegoo","lovegun","lovejuice","lovemaking","lovemuscle","lovepistol","loverocket","lowlife","lsd","lubejob","lubra","lucifer","luckycammeltoe","lugan","lugans","lust","lusting","lusty","lynch","m-fucking","m0f0","m0fo","m45terbate","ma5terb8","ma5terbate","mabuno","mabunos","macaca","macacas","magicwand","mahbuno","mahbunos","make me come","makemecome","makemecum","male squirting","mamhoon","mams","manhater","manpaste","maricon","maricón","marijuana","masochist","masokist","massa","massterbait","masstrbait","masstrbate","mastabate","mastabater","master-bate","masterb8","masterbaiter","masterbat","masterbat3","masterbate","masterbates","masterbating","masterbation","masterbations","masterblaster","mastrabator","masturbat","masturbate","masturbating","masturbation","mattressprincess","mau mau","mau maus","maumau","maumaus","mcfagget","meatbeatter","meatrack","menage a trois","menage","menses","menstruate","menstruation","merd","meth","mgger","mggor","mibun","mick","mickeyfinn","mideast","mierda","milf","minge","missionary position","missionary","mo-fo","mockey","mockie","mocky","mof0","mofo","moky","molest","molestation","molester","molestor","moneyshot","monkleigh","moolie","moon cricket","moon crickets","mooncricket","mooncrickets","mormon","moron","moskal","moskals","moslem","mosshead","motha fucker","motha fuker","motha fukkah","motha fukker","mothafuck","mothafucka","mothafuckas","mothafuckaz","mothafucked","mothafucker","mothafuckers","mothafuckin","mothafucking","mothafuckings","mothafucks","mother fucker","mother fukah","mother fuker","mother fukkah","mother fukker","mother-fucker","motherfuck","motherfucka","motherfucked","motherfucker","motherfuckers","motherfuckin","motherfucking","motherfuckings","motherfuckka","motherfucks","motherfvcker","motherlovebone","mothrfucker","mouliewop","mound of venus","moundofvenus","mr hands","mrhands","mtherfucker","mthrfuck","mthrfucker","mthrfucking","mtrfck","mtrfuck","mtrfucker","muff diver","muff","muffdive","muffdiver","muffdiving","muffindiver","mufflikcer","muie","mulatto","mulkku","muncher","munging","munt","murder","murderer","muschi","mutha fucker","mutha fukah","mutha fuker","mutha fukkah","mutha fukker","mutha","muthafecker","muthafuckaz","muthafucker","muthafuckker","muther","mutherfucker","mutherfucking","muthrfucking","mzungu","mzungus","n1gga","n1gger","n1gr","nad","nads","naked","nambla","nastt","nasty","nastybitch","nastyho","nastyslut","nastywhore","nawashi","nazi","nazis","nazism","necro","negres","negress","negro","negroes","negroid","negros","neonazi","nepesaurio","nig nog","nig","niga","nigar","nigars","nigas","niger","nigerian","nigerians","nigers","nigette","nigettes","nigg","nigg3r","nigg4h","nigga","niggah","niggahs","niggar","niggaracci","niggard","niggarded","niggarding","niggardliness","niggardlinesss","niggardly","niggards","niggars","niggas","niggaz","nigger","niggerhead","niggerhole","niggers","niggle","niggled","niggles","niggling","nigglings","niggor","niggress","niggresses","nigguh","nigguhs","niggur","niggurs","niglet","nignog","nigor","nigors","nigr","nigra","nigras","nigre","nigres","nigress","nigs","nigur","niiger","niigr","nimphomania","nimrod","ninny","nip","nipple","nipplering","nipples","nips","nittit","nlgger","nlggor","nob jokey","nob","nobhead","nobjocky","nobjokey","nofuckingway","nog","nookey","nookie","nooky","noonan","nooner","nsfw images","nsfw","nude","nudger","nudie","nudies","nudity","numbnuts","nut sack","nutfucker","nutsack","nymph","nympho","nymphomania","o c k","octopussy","omorashi","one cup two girls","one guy one jar","one guy","one jar","ontherag","orafis","oral","orally","orga","orgasim","orgasim;","orgasims","orgasm","orgasmic","orgasms","orgasum","orgies","orgy","oriface","orifice","orifiss","orospu","osama","ovum","ovums","p e n i s","p i s","p u s s y","p.u.s.s.y.","p0rn","packi","packie","packy","paddy","paedophile","paki","pakie","pakis","paky","palesimian","pancake face","pancake faces","panooch","pansies","pansy","panti","pantie","panties","panty","paska","pastie","pasty","payo","pcp","pearlnecklace","peck","pecker","peckerhead","peckerwood","pedo","pedobear","pedophile","pedophilia","pedophiliac","pee","peeenus","peeenusss","peehole","peenus","peepee","peepshow","peepshpw","pegging","peinus","pen1s","penas","pendejo","pendy","penetrate","penetration","peni5","penial","penile","penis","penis-breath","penises","penisfucker","penisland","penislick","penislicker","penispuffer","penthouse","penus","penuus","perse","perv","perversion","peyote","phalli","phallic","phone sex","phonesex","phuc","phuck","phuk","phuked","phuker","phuking","phukked","phukker","phukking","phuks","phungky","phuq","pi55","picaninny","piccaninny","picka","pickaninnies","pickaninny","piece of shit","pieceofshit","piefke","piefkes","pierdol","pigfucker","piker","pikey","piky","pillowbiter","pillu","pimmel","pimp","pimped","pimper","pimpis","pimpjuic","pimpjuice","pimpsimp","pindick","pinko","pis","pises","pisin","pising","pisof","piss pig","piss","piss-off","pissed","pisser","pissers","pisses","pissflaps","pisshead","pissin","pissing","pissoff","pisspig","pistol","pizda","playboy","playgirl","pleasure chest","pleasurechest","pms","pocha","pochas","pocho","pochos","pocketpool","pohm","pohms","polac","polack","polacks","polak","pole smoker","polesmoker","pollock","pollocks","pommie grant","pommie grants","pommie","pommies","pommy","ponyplay","poo","poof","poon","poonani","poonany","poontang","poontsee","poop chute","poop","poopchute","pooper","pooperscooper","pooping","poorwhitetrash","popimp","porch monkey","porch monkies","porchmonkey","porn","pornflick","pornking","porno","pornography","pornos","pornprincess","pound town","poundtown","pplicker","pr0n","pr1c","pr1ck","pr1k","prairie nigger","prairie niggers","premature","preteen","pric","prick","prickhead","pricks","prig","prince albert piercing","pron","propaganda","prostitute","pthc","pu55i","pu55y","pube","pubes","pubic","pubiclice","pubis","pud","pudboy","pudd","puddboy","puke","pula","pule","punanny","punany","punkass","punky","punta","puntang","purinapricness","pusies","puss","pusse","pussee","pussi","pussie","pussies","pussy","pussycat","pussydestroyer","pussyeater","pussyfucker","pussylicker","pussylicking","pussylips","pussylover","pussypounder","pussys","pusy","puta","puto","puuke","puuker","qahbeh","quashie","queaf","queef","queero","queers","queerz","quickie","quicky","quiff","quim","qweers","qweerz","qweir","r-tard","r-tards","r5e","ra8s","racial","radicals","raghead","ragheads","raging boner","raging","ragingboner","randy","rape","raped","raper","raping","rapist","raunch","rautenberg","rearend","rearentry","recktum","rectal","rectum","rectus","redleg","redlegs","redlight","redneck","rednecks","redskin","redskins","reefer","reestie","reetard","refugee","reich","renob","rentafuck","rere","retard","retarded","retards","retardz","reverse cowgirl","reversecowgirl","rigger","rimjaw","rimjob","rimming","ritard","rosebuds","rosy palm and her 5 sisters","rosy palm","rosypalm","rosypalmandher5sisters","rosypalmandherefivesisters","round eyes","roundeye","rtard","rtards","rump","rumprammer","ruski","russki","russkie","rusty trombone","rustytrombone","s h i t","s hit","s&m","s-h-1-t","s-h-i-t","s-o-b","s.h.i.t.","s.o.b.","s0b","s_h_i_t","sac","sack","sadis","sadism","sadist","sadom","sambo","sambos","samckdaddy","sanchez","sand nigger","sand niggers","sandm","sandnigger","santorum","scag","scallywag","scank","scantily","scat","schaffer","scheiss","schizo","schlampe","schlong","schmuck","schvartse","schvartsen","schwartze","schwartzen","scissoring","screwed","screwing","screwyou","scroat","scrog","scrot","scrote","scrotum","scrud","seduce","semen","seppo","seppos","septics","sex","sexed","sexfarm","sexhound","sexhouse","sexi","sexing","sexkitten","sexo","sexpot","sexslave","sextogo","sextoy","sextoys","sexual","sexually","sexwhore","sexx","sexxi","sexxx","sexxxi","sexxxy","sexxy","sexy","sexymoma","sexyslim","sh!+","sh!t","sh1t","sh1ter","sh1ts","sh1tter","sh1tz","shag","shagger","shaggin","shagging","shamedame","sharmuta","sharmute","shat","shav","shaved beaver","shaved pussy","shaved","shavedbeaver","shavedpussy","shawtypimp","sheeney","shemale","shhit","shi+","shibari","shinola","shipal","shit","shitass","shitbag","shitbagger","shitblimp","shitbrain","shitbreath","shitcan","shitcunt","shitdick","shite","shiteater","shited","shitey","shitface","shitfaced","shitfit","shitforbrains","shitfuck","shitfucker","shitfull","shithapens","shithappens","shithead","shithole","shithouse","shiting","shitings","shitlist","shitola","shitoutofluck","shits","shitspitter","shitstain","shitt","shitted","shitter","shitters","shittiest","shitting","shittings","shitty","shity","shitz","shiz","shiznit","shortfuck","shota","shrimping","shylock","shylocks","shyt","shyte","shytty","shyty","sissy","sixsixsix","sixtynine","sixtyniner","skag","skanck","skank","skankbitch","skankee","skankey","skankfuck","skanks","skankwhore","skanky","skankybitch","skankywhore","skeet","skinflute","skribz","skullfuck","skum","skumbag","skurwysyn","skwa","skwe","slag","slant","slanteye","slanty","slapper","slaughter","slave","slavedriver","sleaze","sleazy","sleezebag","sleezeball","slideitin","slimeball","slimebucket","slopehead","slopeheads","sloper","slopers","slopes","slopey","slopeys","slopies","slopy","slut","slutbag","slutdumper","slutkiss","sluts","slutt","slutting","slutty","slutwear","slutwhore","slutz","smack","smackthemonkey","smeg","smegma","smoker","smut","smutty","snatch","snatchpatch","snigger","sniggered","sniggering","sniggers","sniper","snowback","snowballing","snownigger","snuff","sob","socksucker","sodom","sodomise","sodomite","sodomize","sodomy","son of a bitch","son-of-a-bitch","sonofabitch","sonofbitch","sooties","sooty","souse","soused","spac","spade","spades","spaghettibender","spaghettinigger","spank","spankthemonkey","spearchucker","spearchuckers","sperm","spermacide","spermbag","spermhearder","spermherder","sphencter","spic","spick","spicks","spics","spierdalaj","spig","spigotty","spik","spiks","spitter","splittail","splooge moose","splooge","spludge","spooge","spread legs","spreadeagle","spunk","spunky","sqeh","squa","squarehead","squareheads","squaw","squinty","squirting","stagg","steamy","stfu","stiffy","stoned","stoner","strap on","strapon","strappado","stringer","strip club","stripclub","stroke","stroking","stuinties","stupid","stupidfuck","stupidfucker","style doggy","suck","suckdick","sucked","sucker","sucking","suckme","suckmyass","suckmydick","suckmytit","suckoff","sucks","suicide girl","suicide girls","suicide","suicidegirl","suicidegirls","suka","sultry women","sultry","sultrywoman","sultrywomen","sumofabiatch","swallow","swallower","swalow","swamp guinea","swamp guineas","swastika","swinger","syphilis","t i t","t i ts","t1t","t1tt1e5","t1tties","taboo","tacohead","tacoheads","taff","tainted love","tainted","take off your","tantra","tar babies","tar baby","tarbaby","tard","taste my","tastemy","tawdry","tea bagging","teabagging","teat","teets","teez","terd","terror","terrorist","teste","testee","testes","testical","testicle","testicles","testis","thicklip","thicklips","thirdeye","thirdleg","threesome","threeway","throat","throating","thrust","thug","thundercunt","ti","tied up","tight white","timber nigger","timber niggers","timbernigger","tinkle","tit","titbitnipply","titfuck","titfucker","titfuckin","titi","titjob","titlicker","titlover","tits","titt","tittie","tittie5","tittiefucker","titties","tittis","titty","tittyfuck","tittyfucker","tittys","tittywank","titwank","tity","to murder","toke","tongethruster","tongue in a","tongueina","tonguethrust","tonguetramp","toots","topless","tortur","torture","tosser","towel head","towel heads","towelhead","trailertrash","tramp","trannie","tranny","transsexual","transvestite","trashy","tribadism","triplex","trisexual","trois","trojan","trombone","trots","tub girl","tubgirl","tuckahoe","tunneloflove","turd","turnon","tush","tushy","tw4t","twat","twathead","twatlips","twats","twatty","twatwaffle","twink","twinkie","two girls one cup","twobitwhore","twunt","twunter","udge packer","ukrop","uncle tom","unclefucker","undies","undressing","unfuckable","unwed","upskirt","uptheass","upthebutt","urethra play","urethra","urethraplay","urinal","urinary","urinate","urine","urophilia","usama","ussys","uzi","v a g i n a","v14gra","v1gra","v4gra","va-j-j","va1jina","vag","vag1na","vagiina","vagina","vaginal","vaj1na","vajina","valium","venus mound","vgra","viagra","vibe","vibr","vibrater","vibrator","vietcong","violet wand","virgin","virginbreaker","vittu","vixen","vjayjay","vodka","vomit","vorarephilia","voyeur","vulgar","vullva","vulva","w00se","w0p","wab","wad","wang","wank","wanker","wanking","wanky","waysted","wazoo","wedgie","weed","weenie","weewee","weiner","weirdo","welcher","wench","wet dream","wetb","wetback","wetbacks","wetdream","wetspot","wh00r","wh0re","wh0reface","whacker","whash","whigger","whiggers","whiskeydick","whiskydick","whit","white power","white trash","whitenigger","whitepower","whites","whitetrash","whitey","whiteys","whities","whiz","whoar","whop","whoralicious","whore","whorealicious","whorebag","whored","whoreface","whorefucker","whorehopper","whorehouse","whores","whoring","wichser","wigga","wiggas","wigger","wiggers","willie","willies","williewanker","willy","wn","wog","wogs","woody","wop","wrapping men","wrinkled starfish","wtf","wuss","wuzzie","x-rated","xkwe","xrated","xtc","xx","xxx","xxxxxx","yank","yaoi","yarpie","yarpies","yeasty","yed","yellow showers","yellowman","yellowshowers","yid","yids","yiffy","yobbo","yourboobs","yourpenis","yourtits","zabourah","zigabo","zigabos","zipperhead","zipperheads","zoophile","zoophilia","🖕"]')},function(e,t,n){"use strict";n.r(t);n(108)},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(7),o=(r=n(18))&&"object"==typeof r&&"default"in r?r.default:r,a=n(20),s=n(12),c=n(109),l=n(19),u=new a.Logger("@firebase/firestore");function h(){return u.logLevel}function d(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(u.logLevel<=a.LogLevel.DEBUG){var r=t.map(m);u.debug.apply(u,i.__spreadArrays(["Firestore (7.19.0): "+e],r))}}function p(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(u.logLevel<=a.LogLevel.ERROR){var r=t.map(m);u.error.apply(u,i.__spreadArrays(["Firestore (7.19.0): "+e],r))}}function f(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(u.logLevel<=a.LogLevel.WARN){var r=t.map(m);u.warn.apply(u,i.__spreadArrays(["Firestore (7.19.0): "+e],r))}}function m(e){if("string"==typeof e)return e;try{return t=e,JSON.stringify(t)}catch(t){return e}/*** @license* Copyright 2020 Google LLC@@ -1487,7 +1487,7 @@ var an,sn=function(){this.children={},this.childCount=0,this.value=null},cn=func* See the License for the specific language governing permissions and* limitations under the License.*/-var ln,un=function(){function e(e,t){var n=this;this.app_=e,this.authProvider_=t,this.auth_=null,this.auth_=t.getImmediate({optional:!0}),this.auth_||t.get().then((function(e){return n.auth_=e}))}return e.prototype.getToken=function(e){return this.auth_?this.auth_.getToken(e).catch((function(e){return e&&"auth/token-not-initialized"===e.code?(A("Got auth/token-not-initialized error. Treating as null token."),null):Promise.reject(e)})):Promise.resolve(null)},e.prototype.addTokenChangeListener=function(e){this.auth_?this.auth_.addAuthTokenListener(e):(setTimeout((function(){return e(null)}),0),this.authProvider_.get().then((function(t){return t.addAuthTokenListener(e)})))},e.prototype.removeTokenChangeListener=function(e){this.authProvider_.get().then((function(t){return t.removeAuthTokenListener(e)}))},e.prototype.notifyForInvalidToken=function(){var e='Provided authentication credentials for the app named "'+this.app_.name+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.app_.options?e+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.app_.options?e+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':e+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',M(e)},e}(),hn=function(){function e(){}return e.prototype.getToken=function(t){return Promise.resolve({accessToken:e.EMULATOR_AUTH_TOKEN})},e.prototype.addTokenChangeListener=function(t){t(e.EMULATOR_AUTH_TOKEN)},e.prototype.removeTokenChangeListener=function(e){},e.prototype.notifyForInvalidToken=function(){},e.EMULATOR_AUTH_TOKEN="owner",e}(),dn=function(){function e(){this.repos_={},this.useRestClient_=!1}return e.getInstance=function(){return ln||(ln=new e),ln},e.prototype.interrupt=function(){var e,t,n,r;try{for(var i=s.__values(Object.keys(this.repos_)),o=i.next();!o.done;o=i.next()){var a=o.value;try{for(var c=(n=void 0,s.__values(Object.keys(this.repos_[a]))),l=c.next();!l.done;l=c.next()){var u=l.value;this.repos_[a][u].interrupt()}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},e.prototype.resume=function(){var e,t,n,r;try{for(var i=s.__values(Object.keys(this.repos_)),o=i.next();!o.done;o=i.next()){var a=o.value;try{for(var c=(n=void 0,s.__values(Object.keys(this.repos_[a]))),l=c.next();!l.done;l=c.next()){var u=l.value;this.repos_[a][u].resume()}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},e.prototype.databaseFromApp=function(e,t,n){var i=n||e.options.databaseURL;void 0===i&&T("Can't determine Firebase Database URL. Be sure to include databaseURL option when calling firebase.initializeApp().");var o,a=X(i),s=a.repoInfo,l=void 0;void 0!==r&&(l=r.env.FIREBASE_DATABASE_EMULATOR_HOST),l?(o=!0,i="http://"+l+"?ns="+s.namespace,s=(a=X(i)).repoInfo):o=!a.repoInfo.secure;var u=c.CONSTANTS.NODE_ADMIN&&o?new hn:new un(e,t);return de("Invalid Firebase Database URL",1,a),a.path.isEmpty()||T("Database URL must point to the root of a Firebase Database (not including a child path)."),this.createRepo(s,e,u).database},e.prototype.deleteRepo=function(e){var t=c.safeGet(this.repos_,e.app.name);t&&c.safeGet(t,e.repoInfo_.toURLString())===e||T("Database "+e.app.name+"("+e.repoInfo_+") has already been deleted."),e.interrupt(),delete t[e.repoInfo_.toURLString()]},e.prototype.createRepo=function(e,t,n){var r=c.safeGet(this.repos_,t.name);r||(r={},this.repos_[t.name]=r);var i=c.safeGet(r,e.toURLString());return i&&T("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call."),i=new en(e,this.useRestClient_,t,n),r[e.toURLString()]=i,i},e.prototype.forceRestClient=function(e){this.useRestClient_=e},e}(),pn=function(){function e(e){this.repo_=e,e instanceof en||T("Don't call new Database() directly - please use firebase.database()."),this.root_=new on(e,H.Empty),this.INTERNAL=new fn(this)}return Object.defineProperty(e.prototype,"app",{get:function(){return this.repo_.app},enumerable:!1,configurable:!0}),e.prototype.ref=function(e){return this.checkDeleted_("ref"),c.validateArgCount("database.ref",0,1,arguments.length),e instanceof on?this.refFromURL(e.toString()):void 0!==e?this.root_.child(e):this.root_},e.prototype.refFromURL=function(e){var t="database.refFromURL";this.checkDeleted_(t),c.validateArgCount(t,1,1,arguments.length);var n=X(e);de(t,1,n);var r=n.repoInfo;return r.host!==this.repo_.repoInfo_.host&&T(t+": Host name does not match the current database: (found "+r.host+" but expected "+this.repo_.repoInfo_.host+")"),this.ref(n.path.toString())},e.prototype.checkDeleted_=function(e){null===this.repo_&&T("Cannot call "+e+" on a deleted database.")},e.prototype.goOffline=function(){c.validateArgCount("database.goOffline",0,0,arguments.length),this.checkDeleted_("goOffline"),this.repo_.interrupt()},e.prototype.goOnline=function(){c.validateArgCount("database.goOnline",0,0,arguments.length),this.checkDeleted_("goOnline"),this.repo_.resume()},e.ServerValue={TIMESTAMP:{".sv":"timestamp"},increment:function(e){return{".sv":{increment:e}}}},e}(),fn=function(){function e(e){this.database=e}return e.prototype.delete=function(){return s.__awaiter(this,void 0,void 0,(function(){return s.__generator(this,(function(e){return this.database.checkDeleted_("delete"),dn.getInstance().deleteRepo(this.database.repo_),this.database.repo_=null,this.database.root_=null,this.database.INTERNAL=null,this.database=null,[2]}))}))},e}(),mn=Object.freeze({__proto__:null,forceLongPolling:function(){Zt.forceDisallow(),qt.forceAllow()},forceWebSockets:function(){qt.forceDisallow()},isWebSocketsAvailable:function(){return Zt.isAvailable()},setSecurityDebugCallback:function(e,t){e.repo.persistentConnection_.securityDebugCallback_=t},stats:function(e,t){e.repo.stats(t)},statsIncrementCounter:function(e,t){e.repo.statsIncrementCounter(t)},dataUpdateCount:function(e){return e.repo.dataUpdateCount},interceptServerData:function(e,t){return e.repo.interceptServerData_(t)}}),gn=Kt;Kt.prototype.simpleListen=function(e,t){this.sendRequest("q",{p:e},t)},Kt.prototype.echo=function(e,t){this.sendRequest("echo",{d:e},t)};var yn=Xt,vn=q,bn=Object.freeze({__proto__:null,DataConnection:gn,RealTimeConnection:yn,hijackHash:function(e){var t=Kt.prototype.put;return Kt.prototype.put=function(n,r,i,o){void 0!==o&&(o=e()),t.call(this,n,r,i,o)},function(){Kt.prototype.put=t}},ConnectionTarget:vn,queryIdentifier:function(e){return e.queryIdentifier()},forceRestClient:function(e){dn.getInstance().forceRestClient(e)}}),_n=pn.ServerValue;function wn(t){!function(e){Wt=e}(t.SDK_VERSION);var n=t.INTERNAL.registerComponent(new u.Component("database",(function(e,t){var n=e.getProvider("app").getImmediate(),r=e.getProvider("auth-internal");return dn.getInstance().databaseFromApp(n,r,t)}),"PUBLIC").setServiceProps({Reference:on,Query:Ke,Database:pn,DataSnapshot:Je,enableLogging:E,INTERNAL:mn,ServerValue:_n,TEST_ACCESS:bn}).setMultipleInstances(!0));t.registerVersion("@firebase/database","0.6.11"),c.isNodeSdk()&&(e.exports=n)}wn(a),t.DataSnapshot=Je,t.Database=pn,t.OnDisconnect=fe,t.Query=Ke,t.Reference=on,t.ServerValue=_n,t.enableLogging=E,t.registerDatabase=wn}).call(this,n(2))},function(e,t,n){const r={0:0,1:.5,2:0,3:.25,4:.5,5:.75,6:0,7:.125,8:.25,9:.375,10:.5,11:.625,12:.75,13:.875};if(AFRAME.registerComponent("multiplier-ring",{dependencies:["geometry","material"],schema:{combo:{default:0},multiplier:{default:1}},init:function(){this.animationSet={from:void 0,to:void 0},this.progress=this.el.getObject3D("mesh").material.uniforms.progress,this.el.setAttribute("animation",{property:"components.material.material.uniforms.progress.value",dur:100,autoplay:!1})},update:function(){this.updateRing()},updateRing:function(){const e=this.data,t=this.el,n=this.progress;if(8===e.multiplier)return void(n.value=1);const i=this.animationSet;i.from=n.value,i.to=r[e.combo],t.setAttribute("animation",i),t.components.animation.beginAnimation()}}),window.AFRAME){const t=["multiplier-ring"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("no-frustum-cull",{init:function(){this.el.object3D.frustumCulled=!1}}),window.AFRAME){const t=["no-frustum-cull"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){"use strict";n.r(t);var r=n(0),i=n.n(r);if(AFRAME.registerShader("panelShader",{schema:{activePanel:{type:"number",is:"uniform",default:0},brightness:{type:"number",is:"uniform",default:.3},borderWidth:{type:"number",is:"uniform",default:.004},borderRadius:{type:"number",is:"uniform",default:.15},colorPrimary:{type:"color",is:"uniform",default:i.a.initial.primary},colorSecondary:{type:"color",is:"uniform",default:i.a.initial.secondary},midSection:{type:"number",is:"uniform",default:0},opacity:{type:"number",is:"uniform",default:1},ratio:{type:"number",is:"uniform",default:.5},transparent:{default:!0}},vertexShader:n(141),fragmentShader:n(142),update:function(e){this.updateVariables(e,"attribute"),this.updateVariables(e,"uniform"),this.el.sceneEl.systems.materials.registerPanel(this.material)}}),window.AFRAME){const t=[],n=["panelShader"],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t){e.exports="varying vec2 uvs;\nvoid main() {\n uvs.xy = uv.xy;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}"},function(e,t){e.exports="#if __VERSION__ == 100\n #extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform vec3 colorPrimary;\nuniform vec3 colorSecondary;\n\n#define PI 3.141592\n#define DIFF_SECTION_WIDTH 0.06\n\nuniform float borderWidth;\nuniform float borderRadius;\nuniform float brightness;\nuniform float ratio;\nuniform float midSection;\nuniform float opacity;\nuniform float activePanel;\n\nvarying vec2 uvs;\n\nfloat sdBox( in vec2 p, in vec2 b )\n{\n vec2 d = abs(p)-b;\n return length(max(d,vec2(0.0))) + min(max(d.x,d.y), 0.0);\n}\n\nvoid main()\n{\n vec2 uv = uvs;\n vec2 uv2 = uv * 2.0 - 1.0; // from -1 to 1\n uv2.x *= ratio;\n\n vec3 col = mix(colorSecondary * uv.y, colorPrimary * uv.y, uv.x) * (brightness + activePanel * 0.4);\n vec3 borderCol = mix(colorSecondary, colorPrimary, uv.y);\n\n vec2 size = vec2(0.83 * ratio, 0.86) - borderRadius;\n float grad = sdBox(uv2, size) - borderRadius;\n grad = min(grad, sdBox(uv2 - size, vec2(borderRadius)));\n grad = min(grad, sdBox(uv2 + size, vec2(borderRadius)));\n grad = -grad;\n float aa = fwidth(grad);\n\n float isShape = smoothstep(-aa, 0.0, grad);\n float alpha = clamp(isShape + smoothstep(-0.15, 0.15, grad), 0.0, 1.0);\n float isBorder = smoothstep(-aa - borderWidth, aa - borderWidth, grad) - smoothstep(-aa + borderWidth, aa + borderWidth, grad);\n float mid = clamp(midSection, 0.0, 1.0);\n col *= 1.0 - mid * (step(0.5 - DIFF_SECTION_WIDTH * mid, uv.x) - step(0.5 + DIFF_SECTION_WIDTH * midSection, uv.x)) * 0.3;\n\n gl_FragColor = vec4(mix(col * isShape, borderCol, isBorder), alpha * opacity);\n}\n"},function(e,t,n){if(AFRAME.registerComponent("pause",{schema:{isPaused:{default:!1}},update:function(){this.data.isPaused&&this.el.isPlaying?this.el.pause():this.data.isPaused||this.el.isPlaying||!this.el.sceneEl.isPlaying||this.el.play()}}),window.AFRAME){const t=["pause"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("pauser",{schema:{enabled:{default:!0}},init:function(){this.pauseGame=this.pauseGame.bind(this),document.addEventListener("keydown",e=>{27===e.keyCode&&this.pauseGame()}),this.el.sceneEl.addEventListener("controllerconnected",e=>{"vive-controls"===e.detail.name?this.el.addEventListener("menudown",this.pauseGame):(this.el.addEventListener("thumbstickdown",this.pauseGame),this.el.addEventListener("trackpaddown",this.pauseGame))}),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&this.pauseGame()})},pauseGame:function(){this.data.enabled&&this.el.sceneEl.emit("pausegame",null,!1)}}),window.AFRAME){const t=["pauser"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){var r=n(146);if(AFRAME.registerSystem("play-sound",{init:function(){this.lastSoundPlayed="",this.lastSoundPlayedTime=0,this.pools={}},createPool:function(e,t){this.pools[e]||(this.pools[e]=new r(e,t))},playSound:function(e,t){this.pools[e]||this.createPool(e,t),this.pools[e].play(),this.lastSoundPlayed=e,this.lastSoundTime=this.el.time}}),AFRAME.registerComponent("play-sound",{schema:{enabled:{default:!0},event:{type:"string"},sound:{type:"string"},volume:{type:"number",default:1}},multiple:!0,init:function(){this.el.addEventListener(this.data.event,e=>{this.data.enabled&&this.system.playSound(this.src,this.data.volume)})},update:function(){this.src=this.data.sound,this.data.sound.startsWith("#")&&(this.src=document.querySelector(this.data.sound).getAttribute("src"))}}),window.AFRAME){const t=["play-sound"],n=[],r=["play-sound"];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t){e.exports=function(e,t){var n,r=0,i=[];return(n=new Audio(e)).volume=t,i.push(n),{play:function(){0===i[r].currentTime&&i[r].ended||((n=new Audio(e)).volume=t,i.push(n),r++),(0===i[r].currentTime||i[r].ended)&&i[r].play(),r=(r+1)%i.length}}}},function(e,t,n){function r(e,t){return e-t}if(AFRAME.registerComponent("player-height",{init:function(){this.beatOffset=0,this.heights=[],this.height=0,this.el.sceneEl.addEventListener("menuchallengeselect",this.updateHeight.bind(this)),this.el.sceneEl.addEventListener("playbuttonclick",this.updateHeight.bind(this))},pause:function(){this.heights.length=0},updateHeight:function(){const e=this.heights;e.length>3&&e.shift(),e.push(this.el.object3D.position.y),this.height=function(e){e.sort(r);const t=e.length/2;return t%1?e[t-.5]:(e[t-1]+e[t])/2}(e);const t=(n=this.height,i=1.6,o=2.2,Math.min(Math.max(n,i),o));var n,i,o,a,s;this.beatOffset=(s=0)+(.2-s)*(t-(a=1.6))/(2.2-a)}}),window.AFRAME){const t=["player-height"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("plume",{schema:{color:{default:""},cutDirection:{default:""},horizontalPosition:{default:"middleleft",oneOf:["left","middleleft","middleright","right"]},songPosition:{default:0},type:{default:"arrow",oneOf:["arrow","dot","mine"]},verticalPosition:{default:"middle",oneOf:["bottom","middle","top"]}},horizontalPositions:{left:-.95,middleleft:-.6,middleright:.6,right:.95},init:function(){this.curveEl=document.getElementById("curve"),this.curveFollowRig=document.getElementById("curveFollowRig"),this.handsEls=this.el.sceneEl.querySelectorAll(".handStar"),this.handPos=new THREE.Vector3,this.verticalPositions=this.el.sceneEl.components["beat-system"].verticalPositions,this.el.sceneEl.addEventListener("cleargame",this.returnToPool.bind(this))},update:function(){"mine"===this.data.type?this.poolName="pool__plume-mine":this.poolName=`pool__plume-${this.data.type}-${this.data.color}`},onGenerate:function(e,t,n,r){this.data;const i=this.el,o=this.curveEl.components.supercurve;o.getPointAt(e,i.object3D.position),o.alignToCurve(e,i.object3D),i.object3D.position.x+=this.horizontalPositions[t],i.object3D.position.y+=this.verticalPositions[n]+r,i.object3D.rotation.z=Math.random()*Math.PI*2,this.songPosition=e},tock:function(){if(this.el.object3D.position.z>this.curveFollowRig.object3D.position.z+10)this.returnToPool();else for(let e=0;e<this.handsEls.length;e++){const t=this.handsEls[e];t.object3D.getWorldPosition(this.handPos),this.handPos.distanceToSquared(this.el.object3D.position)<.2&&t.emit("plumepulse")}},returnToPool:function(){this.el.object3D.position.set(0,0,-9999),this.el.object3D.visible=!1,this.el.isPlaying&&this.el.sceneEl.components[this.poolName].returnEntity(this.el)}}),window.AFRAME){const t=["plume"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("punch",{schema:{enabled:{default:!1}},init:function(){this.currentPos=new THREE.Vector3,this.direction=0,this.lastSample=new THREE.Vector3,this.lastSampleTime=0,this.speed=0,this.bbox=new THREE.Box3,this.bboxEl=this.el.querySelector(".punchBbox")},play:function(){this.rig=this.el.closest("#curveFollowRig")},tick:function(e,t){this.data.enabled&&(this.direction=this.currentPos.copy(this.el.object3D.position).sub(this.lastSample),this.speed=this.direction.length()/((e-this.lastSampleTime)/1e3),this.lastSample.copy(this.el.object3D.position),this.lastSampleTime=e)},tickBeatSystem:function(){this.bbox.setFromObject(this.bboxEl.getObject3D("mesh"))},checkCollision:function(){const e=new THREE.Box3,t=new THREE.Vector3(0,0,.2);return function(n){return e.copy(n.bbox).translate(n.el.object3D.position).expandByScalar(.1).expandByVector(t),this.bbox.intersectsBox(e)}}()}),window.AFRAME){const t=["punch"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){var r,i;if(AFRAME.registerComponent("raycaster-target",{schema:{bindToggle:{default:""},depth:{type:"number"},height:{type:"number"},position:{type:"vec3",default:{x:0,y:0,z:0}},rotation:{type:"vec3",default:{x:0,y:0,z:0}},useBoxTarget:{default:!1},width:{type:"number"}},init:(r={primitive:"box"},i={primitive:"plane"},function(){var e,t,n=this.data,o=this.el;(t=document.createElement("a-entity")).classList.add("raycasterTarget"),n.bindToggle?t.setAttribute("bind-toggle__raycastable",n.bindToggle):t.setAttribute("data-raycastable",""),n.useBoxTarget?((e=r).depth=n.depth,e.height=n.height,e.width=n.width):((e=i).height=n.height,e.width=n.width),t.setAttribute("geometry",e),t.object3D.visible=!1,t.object3D.position.copy(n.position),t.object3D.rotation.x=THREE.Math.degToRad(n.rotation.x),t.object3D.rotation.y=THREE.Math.degToRad(n.rotation.y),t.object3D.rotation.z=THREE.Math.degToRad(n.rotation.z),o.appendChild(t)})}),window.AFRAME){const t=["raycaster-target"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){var r,i,o,a;if(AFRAME.registerComponent("recenter",{schema:{enabled:{default:!0}},init:function(){this.el.sceneEl;this.recenter=this.recenter.bind(this),document.querySelectorAll("[tracked-controls]").forEach(e=>{e.addEventListener("menudown",this.recenter),e.addEventListener("thumbstickdown",this.recenter)}),this.el.addEventListener("recenter",this.recenter)},recenter:(r=new THREE.Euler,i=new THREE.Matrix4,o=new THREE.Matrix4,a=new THREE.Matrix4,function(){const e=this.el;if(!this.data.enabled)return;const t=e.sceneEl.camera.el.object3D;i.identity(),r.set(0,-1*t.rotation.y,0),o.makeRotationFromEuler(r),a.makeTranslation(-1*t.position.x,0,-1*t.position.z),i.multiply(o).multiply(a),i.decompose(e.object3D.position,e.object3D.quaternion,e.object3D.scale),e.object3D.updateMatrixWorld(!0),e.emit("recentered",null,!1)})}),window.AFRAME){const t=["recenter"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerShader("ring",{schema:{blur:{default:.01,is:"uniform"},color:{type:"color",is:"uniform"},progress:{default:0,is:"uniform"},radiusInner:{default:.6,is:"uniform"},radiusOuter:{default:1,is:"uniform"}},vertexShader:n(153),fragmentShader:n(154)}),window.AFRAME){const t=[],n=["ring"],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t){e.exports="varying vec2 vUv;\n\nvoid main () {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n"},function(e,t){e.exports="#if __VERSION__ == 100\n #extension GL_OES_standard_derivatives : enable\n#endif\n#define PI 3.14159265358979\nuniform float blur;\nuniform float progress;\nuniform float radiusInner;\nuniform float radiusOuter;\nuniform vec3 color;\n\nvarying vec2 vUv;\n\nvoid main () {\n // make uvs go from -1 to 1\n vec2 uv = vec2(vUv.x * 2.0 - 1.0, vUv.y * 2.0 - 1.0);\n // calculate distance of fragment to center\n float r = uv.x * uv.x + uv.y * uv.y;\n // calculate antialias\n float aa = fwidth(r);\n // make full circle (radiusOuter - radiusInner)\n float col = (1.0 - smoothstep(radiusOuter - aa, radiusOuter + blur + aa, r)) * smoothstep(radiusInner - aa, radiusInner + blur + aa, r);\n // radial gradient\n float a = smoothstep(-PI-aa, PI+aa, atan(uv.y, uv.x));\n // progress angle\n float p = 1.0 - progress - blur;\n // apply progress to full circle (1 for done part, 0 for part to go)\n col *= smoothstep(p, p + blur, a);\n // multiply by user color\n gl_FragColor = vec4(color * col, col);\n}\n"},function(e,t,n){if(AFRAME.registerComponent("score-texts",{schema:{isLoading:{default:!1}},init:function(){this.textEls=this.el.querySelectorAll("[text]");for(let e=0;e<this.textEls.length;e++)this.textEls[e].setAttribute("animation__fadein",{autoplay:!1,property:"components.text.material.uniforms.opacity.value",delay:250,dur:750,easing:"easeInOutCubic",from:0,to:1})},update:function(e){if(e.isLoading&&!this.data.isLoading){for(let e=0;e<this.textEls.length;e++)this.textEls[e].components.animation__fadein.beginAnimation();this.el.sceneEl.emit("textglownormal",null,!1)}if(!e.isLoading&&this.data.isLoading){for(let e=0;e<this.textEls.length;e++)this.textEls[e].components.text.material.uniforms.opacity.value=0;this.el.sceneEl.emit("textglowoff",null,!1)}}}),window.AFRAME){const t=["score-texts"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){"use strict";n.r(t);n(6);if(AFRAME.registerComponent("search-thumbnail-atlas",{dependencies:["geometry","material"],schema:{dummyUpdater:{type:"string"}},init:function(){const e=this.canvas=document.createElement("canvas");e.setAttribute("id","thumbnailAtlasMap"),e.height=512,e.width=64,e.style.visibility="hidden",this.ctx=e.getContext("2d"),this.clearCanvas(),document.body.appendChild(e);const t=this.alphaCanvas=document.createElement("canvas");t.setAttribute("id","thumbnailAlphaMap"),t.height=512,t.width=64,t.style.visibility="hidden",this.alphaCtx=t.getContext("2d"),document.body.appendChild(t),this.el.components.material.material.alphaMap=new THREE.CanvasTexture(t),this.el.setAttribute("material","src",e),this.images=[],this.lastNumResults=6},update:function(){const e=this.el.sceneEl.systems.state.state.searchResultsPage;for(let t=0;t<e.length;t++){let n=this.images[t]=this.images[t]||document.createElement("img");n.crossOrigin="anonymous",n.src=e[t].coverURL,n.complete?this.draw(n,t):n.onload=()=>{this.draw(n,t)}}e.length!==this.lastNumResults&&this.updateAlphaMap(e.length),this.lastNumResults=e.length},draw:function(e,t){this.ctx.drawImage(e,0,t*(512/384*64),64,512/384*64),this.el.getObject3D("mesh").material.map.needsUpdate=!0},clearCanvas:function(){const e=this.canvas;this.ctx.fillStyle="#111",this.ctx.fillRect(0,0,e.width,e.height)},updateAlphaMap:function(e){const t=this.alphaCanvas,n=this.alphaCtx;n.fillStyle="#FFF",n.fillRect(0,0,t.width,t.height),n.fillStyle="#000",n.fillRect(0,e*(512/384*64),t.width,t.height-e*(512/384*64)),this.el.getObject3D("mesh").material.alphaMap.needsUpdate=!0,this.el.getObject3D("mesh").material.needsUpdate=!0}}),window.AFRAME){const t=["search-thumbnail-atlas"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r=n(158),i=n(29),o=n(159).map(i);if(AFRAME.registerComponent("search",{schema:{difficultyFilter:{default:"All"},genre:{default:""},playlist:{default:""},query:{default:""}},init:function(){this.eventDetail={query:"",results:o,url:"",page:0},this.keyboardEl=document.getElementById("keyboard"),this.popularHits=o,function(e){for(let t=e.length-1;t>0;t--){const n=Math.floor(Math.random()*(t+1));[e[t],e[n]]=[e[n],e[t]]}}(this.popularHits),this.queryObject={hitsPerPage:0,query:""},this.el.sceneEl.addEventListener("searchclear",()=>{this.search("")})},update:function(e){this.popularHits&&(e.query&&!this.data.query&&(this.keyboardEl.components["super-keyboard"].data.value="",this.keyboardEl.components["super-keyboard"].updateTextInput("")),this.debouncedSearch=r(this.search.bind(this),1e3),(this.data.genre||this.data.playlist||this.data.query)&&this.search(this.data.query))},play:function(){this.el.sceneEl.emit("searchresults",this.eventDetail),this.search("")},events:{superkeyboardchange:function(e){e.target===this.el&&this.debouncedSearch(e.detail.value)}},search:function(e){if(!e&&"All"===this.data.difficultyFilter&&!this.data.genre&&!this.data.playlist&&this.popularHits)return this.eventDetail.results=this.popularHits,this.eventDetail.query="",void this.el.sceneEl.emit("searchresults",this.eventDetail);if(this.eventDetail.query=e,this.queryObject.query=e,this.queryObject.hitsPerPage=e?30:150,"favorites"===this.data.playlist)return this.eventDetail.results=JSON.parse(localStorage.getItem("favorites-v2")),void this.el.sceneEl.emit("searchresults",this.eventDetail);let t="https://api.beatsaver.com/search/text/CURRENT_PAGE_INDEX?sortOrder=Rating&automapper=true&q="+encodeURIComponent(e);if(this.data.playlist)t=`https://api.beatsaver.com/playlists/id/${this.data.playlist}/CURRENT_PAGE_INDEX`;else if(this.data.genre){const e={Pop:"pop","R&B":"rb",Rap:"hip-hop-rap",Rock:"rock",Soundtrack:"tv-movie-soundtrack","Video Games":"video-game-soundtrack",Electronic:"electronic","Hip Hop":"hip-hop-rap",House:"house","J-Pop":"j-pop","K-Pop":"k-pop",Meme:"comedy-meme",Alternative:"alternative",Anime:"anime",Comedy:"comedy-meme",Dubstep:"dubstep",Dance:"dance"}[this.data.genre];t="https://api.beatsaver.com/search/text/CURRENT_PAGE_INDEX?sortOrder=Rating&automapper=true&tags="+encodeURIComponent(e)}else if(e&&e.length<3)return;fetch(t.replaceAll("CURRENT_PAGE_INDEX",0)).then(e=>e.json()).then(e=>{var n=(e.docs||e.maps).map(i);this.eventDetail.results=n,this.eventDetail.url=t,this.eventDetail.urlPage=0,this.el.sceneEl.emit("searchresults",this.eventDetail)})}}),AFRAME.registerComponent("search-result-list",{init:function(){new MutationObserver(e=>{for(let t=0;t<e.length;t++)"data-index"===e[t].attributeName&&this.refreshLayout()}).observe(this.el,{attributes:!0,childList:!1,subtree:!0})},events:{click:function(e){this.el.sceneEl.emit("menuchallengeselect",e.target.closest(".searchResult").dataset.id,!1)}},refreshLayout:function(){this.el.emit("layoutrefresh",null,!1)}}),window.AFRAME){const t=["search","search-result-list"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,s="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,l=s||c||Function("return this")(),u=Object.prototype.toString,h=Math.max,d=Math.min,p=function(){return l.Date.now()};function f(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(f(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=f(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var s=i.test(e);return s||o.test(e)?a(e.slice(2),s?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,s,c,l=0,u=!1,g=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=r,o=i;return r=i=void 0,l=t,a=e.apply(o,n)}function b(e){return l=e,s=setTimeout(w,t),u?v(e):a}function _(e){var n=e-c;return void 0===c||n>=t||n<0||g&&e-l>=o}function w(){var e=p();if(_(e))return E(e);s=setTimeout(w,function(e){var n=t-(e-c);return g?d(n,o-(e-l)):n}(e))}function E(e){return s=void 0,y&&r?v(e):(r=i=void 0,a)}function A(){var e=p(),n=_(e);if(r=arguments,i=this,c=e,n){if(void 0===s)return b(c);if(g)return s=setTimeout(w,t),v(c)}return void 0===s&&(s=setTimeout(w,t)),a}return t=m(t)||0,f(n)&&(u=!!n.leading,o=(g="maxWait"in n)?h(m(n.maxWait)||0,t):o,y="trailing"in n?!!n.trailing:y),A.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=c=i=s=void 0},A.flush=function(){return void 0===s?a:E(p())},A}}).call(this,n(1))},function(e,t){e.exports=[{id:"43a25",name:"[Extra Sensory II] Porter Robinson - Lifelike",description:"// MAP 3 OF EXTRA SENSORY II\n[ https://beatsaver.com/playlists/797071 ]\n\nthis is only the beginning...*\n\nVideo:\nhttps://www.youtube.com/watch?v=dlqYqNKcLII",uploader:{id:4340055,name:"nasafrasa",avatar:"https://cdn.beatsaver.com/avatar/16a6108559271b0c0a8d254ceb5ad43f896a0a28.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4340055/playlist"},metadata:{bpm:100.72,duration:96,songName:"Lifelike",songSubName:"",songAuthorName:"Porter Robinson",levelAuthorName:"nasafrasa"},stats:{plays:0,downloads:0,upvotes:3632,downvotes:14,score:.9918,reviews:6,sentiment:"VERY_POSITIVE"},uploaded:"2025-01-26T23:35:01.030128Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"cb5470be988e526c08e1c7e98f2ba9c26ec6fbd0",state:"Published",createdAt:"2025-01-26T05:53:34.451213Z",sageScore:5,diffs:[{njs:16,offset:0,notes:123,bombs:0,obstacles:0,nps:1.564,length:132,characteristic:"Standard",difficulty:"Easy",events:77,chroma:!0,me:!1,ne:!0,cinema:!1,vivify:!0,seconds:78.634,paritySummary:{errors:0,warns:0,resets:0},maxScore:106395,label:"Nurture",environment:"BillieEnvironment"},{njs:16,offset:0,notes:145,bombs:0,obstacles:0,nps:1.844,length:132,characteristic:"Standard",difficulty:"Normal",events:77,chroma:!0,me:!1,ne:!0,cinema:!1,vivify:!0,seconds:78.634,paritySummary:{errors:0,warns:0,resets:0},maxScore:128235,label:"Lifelike",environment:"BillieEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/cb5470be988e526c08e1c7e98f2ba9c26ec6fbd0.zip",coverURL:"https://eu.cdn.beatsaver.com/cb5470be988e526c08e1c7e98f2ba9c26ec6fbd0.jpg",previewURL:"https://eu.cdn.beatsaver.com/cb5470be988e526c08e1c7e98f2ba9c26ec6fbd0.mp3"}],curator:{id:4292041,name:"symphonic",avatar:"https://cdn.beatsaver.com/avatar/2dc906ee5b78c2cb723f0eae964c2c203babf3f4.png",type:"DISCORD",admin:!0,curator:!0,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4292041/playlist"},curatedAt:"2025-01-27T00:42:00.509882Z",createdAt:"2025-01-26T05:53:34.451213Z",updatedAt:"2025-11-07T23:01:19.839738Z",lastPublishedAt:"2025-01-26T23:35:01.030128Z",tags:["accuracy","balanced","ambient","classical-orchestral"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"43a1f",name:"[Extra Sensory II] Simplifi - you",description:"// MAP 4 OF EXTRA SENSORY II\n[ https://beatsaver.com/playlists/797071 ]\n\n====================================================\n\neverything you see in this map was created (from scratch!) by me\n\nlong time coming. this map represents the end of a chapter, and the start of a new one. I've been dreaming of releasing a map with Vivify almost as long as I've been a Beat Saber creative. I was stuck for so long, but I finally had a breakthrough!\n\nand it's yours to keep.\n\n====================================================\n\nproject source: https://github.com/Swifter1243/you_map\ngameplay video: https://youtu.be/2SgLtmqxu-k \nExtra Sensory II website: https://exsii.totalbs.dev/",uploader:{id:4284246,name:"Swifter",hash:"5dcf3af29eccad0006a0b45f",avatar:"https://cdn.beatsaver.com/avatar/9473c86aef59ee6780dce3b2f091ee167e75bbc3.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4284246/playlist"},metadata:{bpm:70,duration:157,songName:"you",songSubName:"",songAuthorName:"Simplifi",levelAuthorName:"Swifter"},stats:{plays:0,downloads:0,upvotes:5380,downvotes:28,score:.9914,reviews:35,sentiment:"VERY_POSITIVE"},uploaded:"2025-01-26T23:35:01.797228Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"d265d40935983502ad6f05ddeb5417f3e37c2290",state:"Published",createdAt:"2025-01-26T04:23:47.346441Z",sageScore:3,diffs:[{njs:8,offset:-.25,notes:160,bombs:0,obstacles:0,nps:1.106,length:168.75,characteristic:"Standard",difficulty:"Normal",events:0,chroma:!0,me:!1,ne:!0,cinema:!1,vivify:!0,seconds:144.643,paritySummary:{errors:0,warns:0,resets:0},maxScore:140835,environment:"BillieEnvironment"},{njs:8,offset:-.25,notes:160,bombs:0,obstacles:0,nps:1.106,length:168.75,characteristic:"Standard",difficulty:"Hard",events:0,chroma:!0,me:!1,ne:!0,cinema:!1,vivify:!0,seconds:144.643,paritySummary:{errors:0,warns:0,resets:0},maxScore:140675,environment:"BillieEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/d265d40935983502ad6f05ddeb5417f3e37c2290.zip",coverURL:"https://eu.cdn.beatsaver.com/d265d40935983502ad6f05ddeb5417f3e37c2290.jpg",previewURL:"https://eu.cdn.beatsaver.com/d265d40935983502ad6f05ddeb5417f3e37c2290.mp3"}],curator:{id:4331555,name:"TheBlackParrot",avatar:"https://cdn.beatsaver.com/avatar/213097af5fb746f71825aad761723951ce4807ab.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/4331555/playlist"},curatedAt:"2025-01-26T23:47:25.274685Z",createdAt:"2025-01-26T04:23:47.346441Z",updatedAt:"2025-02-09T02:00:19.217070Z",lastPublishedAt:"2025-01-26T23:35:01.797228Z",tags:["electronic","accuracy"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"1a0b6",name:"[Electro Swing Pack] The Electric Swing Circus - Empires",description:"Nixie Presents: Electro Swing Pack!\n\n10 electro swing songs with expert and expert+ diffs to make your booty swing!\n\nGet The Pack: \nhttps://bsaber.com/electro-swing-pack/\n\nMap Gameplay:\nhttps://youtu.be/WJy6_2cTPYg\n\nComplete Pack Playthrough:\nhttps://youtu.be/yj9rw4MEh7s\n\n\nHuge thanks in particular to:\nMonstor, Bearly, Noxn, Bullet, Vaser888, Tocxx, Jafdy, Storm Knight and Pixelguy!\n\n\nMore Maps: https://beatsaver.com/profile/4286374\nDiscord Tag: Nixie.Korten#6944\nJoin My Server: https://discord.gg/RjxPpZtH7w\nTwitter: https://twitter.com/Nixie_Korten\nInstagram: https://www.instagram.com/nixie.korten/",uploader:{id:4286374,name:"Nixie.Korten",hash:"6096752e12772e0006e2f7e6",avatar:"https://cdn.beatsaver.com/avatar/bb97db2b49d21f5cbc1a5ba50742fa0e5c86ed3c.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4286374/playlist"},metadata:{bpm:120,duration:173,songName:"Empires",songSubName:"",songAuthorName:"The Electric Swing Circus",levelAuthorName:"Nixie.Korten"},stats:{plays:0,downloads:0,upvotes:5096,downvotes:31,score:.9905,reviews:2},uploaded:"2021-07-08T15:24:55.769Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"cecc89118b3a75ea7d65ceff5949b3ef19fea716",key:"1a0b6",state:"Published",createdAt:"2021-07-08T15:24:55.769Z",sageScore:4,diffs:[{njs:16,offset:-.5,notes:522,bombs:0,obstacles:24,nps:3.173,length:329,characteristic:"Standard",difficulty:"Expert",events:2051,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:164.5,paritySummary:{errors:0,warns:0,resets:0},maxScore:472995,environment:"PanicEnvironment"},{njs:19,offset:.25,notes:823,bombs:0,obstacles:0,nps:5.003,length:329,characteristic:"Standard",difficulty:"ExpertPlus",events:2051,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:164.5,paritySummary:{errors:0,warns:0,resets:0},maxScore:749915,environment:"PanicEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/cecc89118b3a75ea7d65ceff5949b3ef19fea716.zip",coverURL:"https://eu.cdn.beatsaver.com/cecc89118b3a75ea7d65ceff5949b3ef19fea716.jpg",previewURL:"https://eu.cdn.beatsaver.com/cecc89118b3a75ea7d65ceff5949b3ef19fea716.mp3"}],curator:{id:57657,name:"Pixelguy",hash:"5cff0b7698cc5a672c8541a8",avatar:"https://cdn.beatsaver.com/avatar/57657.jpg",type:"SIMPLE",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/57657/playlist"},curatedAt:"2021-07-08T15:24:55.769Z",createdAt:"2021-07-08T15:24:55.769Z",updatedAt:"2024-11-02T11:17:18.878282Z",lastPublishedAt:"2021-07-08T15:24:55.769Z",tags:["swing","balanced","dance-style","electronic"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"1e6ff",name:"{Modchart} acloudyskye - Somewhere Out There",description:"MAP 10. https://beatsaver.com/playlists/8713\n\nWhat can I say about this map.\n\nI feel like this is the culmination of everything thats happened for modcharting this entire year. All of the advancements I've made with environments, mawntee has made with notemods, and reddek has made with walls come together into this piece that I can only describe as the next step. \n\nI really hope everyone enjoys this one. It's one of a kind.\n\nVideo: https://www.youtube.com/watch?v=rphHsDxJbpg",uploader:{id:4284246,name:"Swifter",hash:"5dcf3af29eccad0006a0b45f",avatar:"https://cdn.beatsaver.com/avatar/9473c86aef59ee6780dce3b2f091ee167e75bbc3.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4284246/playlist"},metadata:{bpm:160,duration:323,songName:"Somewhere Out There",songSubName:"",songAuthorName:"acloudyskye",levelAuthorName:"Swifter, Mawntee, Reddek"},stats:{plays:0,downloads:0,upvotes:20023,downvotes:170,score:.9901,reviews:34,sentiment:"VERY_POSITIVE"},uploaded:"2021-11-30T01:27:30.018531Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"448d219117992026eb23c98dc920ce73a912f289",state:"Published",createdAt:"2022-09-26T15:58:45.498795Z",sageScore:1,diffs:[{njs:19,offset:-.5,notes:892,bombs:8,obstacles:3746,nps:2.973,length:800,characteristic:"Standard",difficulty:"Expert",events:38114,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:300,paritySummary:{errors:0,warns:0,resets:0},maxScore:813395,label:"Experience Recommended",environment:"BTSEnvironment"},{njs:19,offset:-.5,notes:1134,bombs:8,obstacles:3530,nps:3.78,length:800,characteristic:"Lawless",difficulty:"ExpertPlus",events:38114,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:300,paritySummary:{errors:719,warns:26,resets:1},maxScore:1036035,label:"Busier Mapping",environment:"BTSEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/448d219117992026eb23c98dc920ce73a912f289.zip",coverURL:"https://eu.cdn.beatsaver.com/448d219117992026eb23c98dc920ce73a912f289.jpg",previewURL:"https://eu.cdn.beatsaver.com/448d219117992026eb23c98dc920ce73a912f289.mp3"}],curator:{id:4284942,name:"blackjack",hash:"5e96ca3a16c96800062400fe",avatar:"https://cdn.beatsaver.com/avatar/dcd6d334252b91670180855821886983a1818f4a.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4284942/playlist"},curatedAt:"2021-11-30T01:27:30.018531Z",createdAt:"2021-11-30T01:03:02.982731Z",updatedAt:"2023-08-26T19:08:38.528705Z",lastPublishedAt:"2022-09-26T16:01:29.467930Z",tags:["pop","balanced"],bookmarked:!1,collaborators:[{id:4233941,name:"reddek",hash:"5dbfb4426dea0b0006bd328d",avatar:"https://cdn.beatsaver.com/avatar/fc462a26fa97d9b2fdadbdf5d7a45ef75026f8e9.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4233941/playlist"},{id:4285959,name:"Mawntee",hash:"5cff0b7698cc5a672c854ca6",avatar:"https://cdn.beatsaver.com/avatar/e373d502d75ed37d9cc60d2aa58b08f8ab6ebc90.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4285959/playlist"}],declaredAi:"None",blRanked:!1,blQualified:!1},{id:"d7fa",name:"Geoxor - Gloom [Wallmap]",description:"REUPLOAD due to last minute mapping error\n\nSpecial thanks to:\nNyri0 - For providing scripts that were crucial to making this map possible, and for helping me along the way.\nLayanmeta - For giving me so much encouragement throughout the final stages and making a brilliant YouTube video on this map.\nBSMG discord - For the continued support throughout the development process\nAll you people/birds - For playing my map :D\n\nBRIAN HAS BECOME SENTIENT. ALL HAIL BRIAN",uploader:{id:18761,name:"minething",hash:"5e9b4ead16c9680006287387",avatar:"https://www.gravatar.com/avatar/f9bed76044f22e33e287d984993c59797049f1315d399c641b1ea7778975c926?d=retro",type:"SIMPLE",admin:!1,curator:!1,seniorCurator:!1,playlistUrl:"https://api.beatsaver.com/users/id/18761/playlist"},metadata:{bpm:93,duration:167,songName:"Gloom",songSubName:"",songAuthorName:"Geoxor",levelAuthorName:"Mine Thing"},stats:{plays:0,downloads:0,upvotes:9917,downvotes:81,score:.9896,reviews:8,sentiment:"VERY_POSITIVE"},uploaded:"2020-08-16T19:13:40.774Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"823b4e880baac024728ae96a7c20e28026c4585d",key:"d7fa",state:"Published",createdAt:"2020-08-16T19:13:40.774Z",sageScore:3,diffs:[{njs:12,offset:6,notes:0,bombs:0,obstacles:15605,nps:0,length:0,characteristic:"Standard",difficulty:"Easy",events:144,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:0,paritySummary:{errors:0,warns:0,resets:0},maxScore:0,label:"Lightshow",environment:"RocketEnvironment"},{njs:12,offset:6,notes:202,bombs:0,obstacles:15605,nps:1.309,length:239.125,characteristic:"Standard",difficulty:"Hard",events:144,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:154.274,paritySummary:{errors:48,warns:6,resets:0},maxScore:178595,environment:"RocketEnvironment"},{njs:12,offset:6,notes:411,bombs:4,obstacles:15605,nps:2.665,length:239,characteristic:"Standard",difficulty:"Expert",events:144,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:154.194,paritySummary:{errors:0,warns:0,resets:1},maxScore:370875,environment:"RocketEnvironment"},{njs:12,offset:3,notes:411,bombs:4,obstacles:12340,nps:2.665,length:239,characteristic:"Standard",difficulty:"ExpertPlus",events:144,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:154.194,paritySummary:{errors:0,warns:0,resets:1},maxScore:370875,label:"Less Lag",environment:"RocketEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/823b4e880baac024728ae96a7c20e28026c4585d.zip",coverURL:"https://eu.cdn.beatsaver.com/823b4e880baac024728ae96a7c20e28026c4585d.jpg",previewURL:"https://eu.cdn.beatsaver.com/823b4e880baac024728ae96a7c20e28026c4585d.mp3"}],curator:{id:4316945,name:"BeastSaber",avatar:"https://cdn.beatsaver.com/avatar/4316945.jpg",type:"SIMPLE",admin:!1,curator:!0,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/4316945/playlist"},curatedAt:"2020-08-16T19:13:40.774Z",createdAt:"2020-08-16T19:13:40.774Z",updatedAt:"2020-08-16T19:13:40.774Z",lastPublishedAt:"2020-08-16T19:13:40.774Z",bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"43a24",name:"[Extra Sensory II] Andrew Prahlow - End Times",description:"// MAP 2 OF EXTRA SENSORY II\n[https://beatsaver.com/playlists/797071]\n\n=================================================\n\nFirst off, I just want to say thank you. Thank you to the entire TotalBS team (Especially Swifter and Aeroluna) for giving me a chance with this project. When I started on this map, I honestly never thought it would turn into anything like this. At first, it was just going to be something simple with the sun, stars, and you. But as I kept learning more about Unity and Vivify, the project just kept growing little by little, until it became what it is now.\n\nI’ve gotta give a special shoutout to Swifter for helping so much with the shaders, and to Aeroluna for making the custom UI possible. Without those two, this map would not have been able to become what it is now.\n\nOver the past year or so working on this, I feel like my goals and what I want in life have completely shifted. I’ve got more drive and motivation now than I’ve ever had before, and I’m so thankful for that.\n\nI'd like to also thank my closest friend, Azushii, for introducing me to Outer Wilds and encouraging me to start this map in the first place. Rest in peace buddy.. <3\n\n=================================================\nCustom Saber Model: [Coming Soon]\nCustom Note Model: [Coming Soon]\nProject Source: [Coming Soon]\nGameplay Video: https://youtu.be/YtETILVC4V4\nExtra Sensory II Website: https://exsii.totalbs.dev/",uploader:{id:70911,name:"Chaimzy",hash:"605ae0535ab13d000609b331",avatar:"https://cdn.beatsaver.com/avatar/70911.jpg",type:"SIMPLE",admin:!1,curator:!1,seniorCurator:!1,playlistUrl:"https://api.beatsaver.com/users/id/70911/playlist"},metadata:{bpm:128,duration:157,songName:"End Times",songSubName:"Outer Wilds",songAuthorName:"Andrew Prahlow",levelAuthorName:"Chaimzy"},stats:{plays:0,downloads:0,upvotes:3127,downvotes:20,score:.9889,reviews:8,sentiment:"VERY_POSITIVE"},uploaded:"2025-01-26T23:35:01.057933Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"b4acc042f6541c06e57a384fa9796a10c45ff558",state:"Published",createdAt:"2025-01-26T05:32:44.984680Z",sageScore:3,diffs:[{njs:16,offset:0,notes:32,bombs:8,obstacles:0,nps:.533,length:128,characteristic:"Standard",difficulty:"Hard",events:0,chroma:!0,me:!1,ne:!0,cinema:!1,vivify:!0,seconds:60,paritySummary:{errors:0,warns:0,resets:0},maxScore:22195,label:"There's more to explore here",environment:"DefaultEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/b4acc042f6541c06e57a384fa9796a10c45ff558.zip",coverURL:"https://eu.cdn.beatsaver.com/b4acc042f6541c06e57a384fa9796a10c45ff558.jpg",previewURL:"https://eu.cdn.beatsaver.com/b4acc042f6541c06e57a384fa9796a10c45ff558.mp3"}],curator:{id:4286182,name:"MadChase",avatar:"https://cdn.beatsaver.com/avatar/99feaf0fe97b6c67dde2ae7ba055fab744b0ac61.png",type:"DISCORD",admin:!1,curator:!0,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4286182/playlist"},curatedAt:"2025-01-27T00:06:25.521273Z",createdAt:"2025-01-26T05:32:44.984680Z",updatedAt:"2025-01-30T01:51:28.961316Z",lastPublishedAt:"2025-01-26T23:35:01.057934Z",tags:["accuracy","ambient","video-game-soundtrack"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"d4a5",name:"[FUTURE FUNK PACK] Shiawase No Monosashi (VANTAGE // Short Ver.)",description:'FUTURE FUNK MAP PACK\n2 songs uploaded everyday through August 10th - 14th!\n\n"Shiawase No Monosashi" is performed by Mariya Takeuchi. This version of the song is a short edit I made from VANTAGE //\'s edit. The original length of the song is 5 minutes long\n\nPlease look forward to the upcoming maps!\n\nDM any feedback on Discord\nETAN#8341',uploader:{id:4235140,name:"ETAN",hash:"5cff0b7798cc5a672c855775",avatar:"https://cdn.beatsaver.com/avatar/652a9b5d335007c8668b43aa727c75e84794dbe1.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4235140/playlist"},metadata:{bpm:128,duration:171,songName:"Shiawase No Monosashi",songSubName:"(VANTAGE // Short Ver.)",songAuthorName:"Mariya Takeuchi",levelAuthorName:"ETAN"},stats:{plays:0,downloads:0,upvotes:9325,downvotes:95,score:.9876,reviews:2},uploaded:"2020-08-12T18:17:44.285Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"d7cb32f23041dec272de3da0ac141dd8f91478ca",key:"d4a5",state:"Published",createdAt:"2020-08-12T18:17:44.285Z",sageScore:7,diffs:[{njs:10,offset:1,notes:168,bombs:16,obstacles:1,nps:1.029,length:348.25,characteristic:"Standard",difficulty:"Easy",events:7775,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:163.242,paritySummary:{errors:0,warns:0,resets:0},maxScore:147315,environment:"BigMirrorEnvironment"},{njs:11,offset:1,notes:255,bombs:16,obstacles:1,nps:1.562,length:348.25,characteristic:"Standard",difficulty:"Normal",events:7775,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:163.242,paritySummary:{errors:1,warns:1,resets:0},maxScore:227355,environment:"BigMirrorEnvironment"},{njs:12,offset:1,notes:358,bombs:16,obstacles:1,nps:2.193,length:348.25,characteristic:"Standard",difficulty:"Hard",events:7775,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:163.242,paritySummary:{errors:0,warns:0,resets:0},maxScore:322115,environment:"BigMirrorEnvironment"},{njs:15,offset:0,notes:557,bombs:16,obstacles:1,nps:3.335,length:356.25,characteristic:"Standard",difficulty:"Expert",events:7775,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:166.992,paritySummary:{errors:0,warns:0,resets:0},maxScore:505195,environment:"BigMirrorEnvironment"},{njs:19,offset:-.5,notes:778,bombs:16,obstacles:1,nps:4.659,length:356.25,characteristic:"Standard",difficulty:"ExpertPlus",events:7775,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:166.992,paritySummary:{errors:0,warns:0,resets:0},maxScore:708515,environment:"BigMirrorEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/d7cb32f23041dec272de3da0ac141dd8f91478ca.zip",coverURL:"https://eu.cdn.beatsaver.com/d7cb32f23041dec272de3da0ac141dd8f91478ca.jpg",previewURL:"https://eu.cdn.beatsaver.com/d7cb32f23041dec272de3da0ac141dd8f91478ca.mp3"}],curator:{id:4316945,name:"BeastSaber",avatar:"https://cdn.beatsaver.com/avatar/4316945.jpg",type:"SIMPLE",admin:!1,curator:!0,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/4316945/playlist"},curatedAt:"2020-08-12T18:17:44.285Z",createdAt:"2020-08-12T18:17:44.285Z",updatedAt:"2020-08-12T18:17:44.285Z",lastPublishedAt:"2020-08-12T18:17:44.285Z",tags:["j-pop","house"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"4968d",name:"{Vivify} Jaron - 743⁺Aether*✧ ˳ ⁎ ¹¹¹} ⁺ . ˳",description:"**Originally, this map was going to be my Extra Sensory II map.**\n\nHowever, given the insane density of this song, it demanded rapidly changing visuals that kept up with how dynamic it felt to listen to. I did not have the technical or artistic skill to pull off this song. I tried and failed, for 3 years. Finally, after executing Extra Sensory II this year, I realized it was time to tackle this behemoth of a project. This project took over ~350 hours, and 1000 repository commits. The majority of it was put together over the last 3 months.\n\nI really think that I executed on this vision to a tee, landing every single visual cue that I imagined ever since I heard the song for the first time in 2022. I hope you can feel the electricity of this experience <3\n\n✧\n\n**Special Thanks:**\n- **Frautcres** - Doing extensive technical performance investigations in order to make the map run without a hitch, as well as assisting with technical difficulties\n- **Chaimzy, Astra, HAMCORE, Mawntee, TheBlackParrot, TinyPawb, Klondike, RidgeVR, UGEcko** - Doing loads of playtesting and giving feedback to make the map feel as polished as it does\n- **SKYZA.** - Beautiful ribbon & saber textures\n- **Jaron** - Creating this incredible song, and supporting me over the years as I tried to make visuals that shaped up\n\nvideo: https://youtu.be/qZ1prxep0Wc\nproject source: https://github.com/Swifter1243/aether_map",uploader:{id:4284246,name:"Swifter",hash:"5dcf3af29eccad0006a0b45f",avatar:"https://cdn.beatsaver.com/avatar/9473c86aef59ee6780dce3b2f091ee167e75bbc3.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4284246/playlist"},metadata:{bpm:145,duration:274,songName:"743+Aether*✧ . * 111} + , .",songSubName:"",songAuthorName:"Jaron",levelAuthorName:"Swifter"},stats:{plays:0,downloads:0,upvotes:2252,downvotes:15,score:.9876,reviews:34,sentiment:"VERY_POSITIVE"},uploaded:"2025-08-14T16:00:00.354832Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"cc66335f2b8bf50fe49591dd925860b2e596018e",state:"Published",createdAt:"2025-08-14T16:13:20.156249Z",sageScore:3,diffs:[{njs:12,offset:-.5,notes:444,bombs:0,obstacles:0,nps:1.698,length:632,characteristic:"Standard",difficulty:"Expert",events:0,chroma:!0,me:!1,ne:!0,cinema:!1,vivify:!0,seconds:261.517,paritySummary:{errors:0,warns:0,resets:0},maxScore:401235,label:"✧",environment:"BillieEnvironment"},{njs:16,offset:-.5,notes:703,bombs:0,obstacles:0,nps:2.688,length:632,characteristic:"Lawless",difficulty:"ExpertPlus",events:0,chroma:!0,me:!1,ne:!0,cinema:!1,vivify:!0,seconds:261.517,paritySummary:{errors:0,warns:0,resets:0},maxScore:639515,label:"\\___*",environment:"BillieEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/cc66335f2b8bf50fe49591dd925860b2e596018e.zip",coverURL:"https://eu.cdn.beatsaver.com/cc66335f2b8bf50fe49591dd925860b2e596018e.jpg",previewURL:"https://eu.cdn.beatsaver.com/cc66335f2b8bf50fe49591dd925860b2e596018e.mp3"}],curator:{id:4285538,name:"Darkrealm7",hash:"5ffa2803f2cdd000075e24ed",avatar:"https://cdn.beatsaver.com/avatar/7b66a32ba61dcfb938aa0d2207911eb08d28a06f.png",type:"DISCORD",admin:!1,curator:!0,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4285538/playlist"},curatedAt:"2025-08-14T21:11:11.210516Z",createdAt:"2025-08-14T04:02:49.366190Z",updatedAt:"2025-08-20T16:41:30.561039Z",lastPublishedAt:"2025-08-20T16:41:30.561039Z",bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"1362d",name:"Ghost Choir - Louie Zong (modchart)",description:"This is a relaxing modchart and a technical proof of concept. If you haven't played my modchart Dondante yet, please check it out: https://beatsaver.com/beatmap/123b5\r\n\r\nThe map requires the mods Noodle Extensions and Chroma. If Noodle Extensions is not available yet on ModAssistant, you can get the latest release at https://github.com/Aeroluna/NoodleExtensions/releases/tag/v1.3.5\r\n\r\nTips for a better experience:\r\n- Disable static lights; there are no lights anyway\r\n- Hide the HUD\r\n- Turn the SFX volume down (0 or low value like 0.2)\r\n- Enable bloom post-processing\r\n\r\nPreview: https://youtu.be/XC7RY9C_EHs\r\n\r\nI adapted this from Louie Zong's original animation: https://youtu.be/kXF3VYYa5TI\r\n\r\n",uploader:{id:4288814,name:"nyri0",hash:"5e792df416c9680006086a78",avatar:"https://cdn.beatsaver.com/avatar/233323d456510756fbbc0140c1a0698caf8b096c.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,playlistUrl:"https://api.beatsaver.com/users/id/4288814/playlist"},metadata:{bpm:67,duration:90,songName:"Ghost Choir",songSubName:"",songAuthorName:"Louie Zong",levelAuthorName:"nyri0"},stats:{plays:0,downloads:0,upvotes:4478,downvotes:42,score:.987,reviews:6,sentiment:"VERY_POSITIVE"},uploaded:"2021-01-30T12:31:29.825Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"1d373506c0b2b82867411f18696a1ad53d4ea01d",key:"1362d",state:"Published",createdAt:"2021-01-30T12:31:29.825Z",sageScore:2,diffs:[{njs:14,offset:0,notes:138,bombs:0,obstacles:1460,nps:1.684,length:91.5,characteristic:"Standard",difficulty:"Hard",events:5,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:81.94,paritySummary:{errors:4,warns:3,resets:0},maxScore:119715,label:"Oooo",environment:"BigMirrorEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/1d373506c0b2b82867411f18696a1ad53d4ea01d.zip",coverURL:"https://eu.cdn.beatsaver.com/1d373506c0b2b82867411f18696a1ad53d4ea01d.jpg",previewURL:"https://eu.cdn.beatsaver.com/1d373506c0b2b82867411f18696a1ad53d4ea01d.mp3"}],createdAt:"2021-01-30T12:31:29.825Z",updatedAt:"2021-01-30T12:31:29.825Z",lastPublishedAt:"2021-01-30T12:31:29.825Z",bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"198f3",name:"Spider Dance - Toby Fox (Undertale modchart)",description:"There are countless Undertale maps on Beat Saber, but what if you could actually experience a real boss fight? It's now possible thanks to Noodle Extensions, and I'm proud to present to you the first Undertale modchart: Spider Dance, where you will confront Muffet.\r\n\r\nTips for a better experience:\r\n- Don't use static lights; there shouldn't be any lights\r\n- Hide the HUD in player settings\r\n- Enable \"bloom post-processing\"\r\n- Enable \"screen distortion effects\"\r\n\r\nInstallation instructions:\r\n- You will need Noodle Extensions and Chroma and their dependencies. All are now available on ModAssistant.\r\n- If you read this in a future where the update broke the mods and they haven't been approved on ModAssistant yet, install the basic mods from ModAssistant and get the latest releases of Noodle Extensions, Heck, and Chroma from Aeroluna's GitHub: https://github.com/Aeroluna\r\n\r\nVideo: https://youtu.be/fy8KmUor6fI\r\n\r\nI started this a while ago before Ghost Choir and then abandoned the project. But I finally decided to finish the work, so I hope you'll enjoy it :)\r\nThanks to Reaxt and Cyansnow, who testplayed and made detailed suggestions that helped me improve the quality of this map. I really appreciate it.\r\n\r\nMy social media links (please follow/subscribe): https://linktr.ee/nyri0",uploader:{id:4288814,name:"nyri0",hash:"5e792df416c9680006086a78",avatar:"https://cdn.beatsaver.com/avatar/233323d456510756fbbc0140c1a0698caf8b096c.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,playlistUrl:"https://api.beatsaver.com/users/id/4288814/playlist"},metadata:{bpm:115,duration:114,songName:"Spider Dance",songSubName:"",songAuthorName:"Toby Fox",levelAuthorName:"nyri0"},stats:{plays:0,downloads:0,upvotes:10995,downvotes:123,score:.9868,reviews:6,sentiment:"VERY_POSITIVE"},uploaded:"2021-06-25T17:47:40.296Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"09246637fa63ac55aa518718fd1eb4b876960480",key:"198f3",state:"Published",createdAt:"2021-06-25T17:47:40.296Z",sageScore:2,diffs:[{njs:16,offset:0,notes:434,bombs:88,obstacles:1153,nps:4.377,length:190.063,characteristic:"Standard",difficulty:"ExpertPlus",events:5,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:99.163,paritySummary:{errors:13,warns:13,resets:0},maxScore:392035,label:"9999G",environment:"BigMirrorEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/09246637fa63ac55aa518718fd1eb4b876960480.zip",coverURL:"https://eu.cdn.beatsaver.com/09246637fa63ac55aa518718fd1eb4b876960480.jpg",previewURL:"https://eu.cdn.beatsaver.com/09246637fa63ac55aa518718fd1eb4b876960480.mp3"}],curator:{id:73032,name:"Bytrius",hash:"5de442271dc9e8000696cd15",avatar:"https://cdn.beatsaver.com/avatar/62ed9906317427e9b14435ca144c7189b83a711a.png",type:"DISCORD",admin:!0,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/73032/playlist"},curatedAt:"2021-06-25T17:47:40.296Z",createdAt:"2021-06-25T17:47:40.296Z",updatedAt:"2021-06-25T17:47:40.296Z",lastPublishedAt:"2021-06-25T17:47:40.296Z",tags:["electronic","video-game-soundtrack","balanced"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"23f6b",name:"acloudyskye & N33T - Nothing Else (Modchart)",description:"9 months ago I created my first chroma map. At this time I didn't think I could make a map that you are about to play\nIn these 9 months, I learned a lot about walls, notes, environment enhancement, etc... but mostly how to properly polish a map.\nI wanted to make something big, something even bigger than SOT(as in scale swifter silly u) and here I am today publishing this map.\nThis map contains 7 different unique environments that connect together with seamless transitions.\nThis map is a big step in the journey of modhcarts just like SOT.\nI hope more people will see this modhcart as a place they can start and learn Noodle Extensions, You can also check the script of the modhcart on my Github. https://github.com/TzurS11/NoodleScript/tree/main/Examples/Scripts\n\nLastly, I wanna thank all the people that helped. even if you are not on this list I appreciate What you've done a lot!\n@GojiCrafter, @tall_chilis_boi, @Swifter, @Mawntee, Stick, kiwii.\n\nShowcase: https://youtu.be/qkSe0gOctEU\n\nbtw HAHA get fucked swifter! I got more environments than in SOT",uploader:{id:4284455,name:"TzurS11",hash:"6040a8135ab13d0006093512",avatar:"https://cdn.beatsaver.com/avatar/87d26d1223ba8840e9dca8d433165f717e7584e1.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,playlistUrl:"https://api.beatsaver.com/users/id/4284455/playlist"},metadata:{bpm:125,duration:291,songName:"Nothing Else",songSubName:"",songAuthorName:"acloudyskye & N33T",levelAuthorName:"TzurS11"},stats:{plays:0,downloads:0,upvotes:2949,downvotes:25,score:.9867,reviews:3},uploaded:"2022-04-10T19:30:00.565807Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"e45b69a9428505e93f73f1bdc43909d43fc844e3",state:"Published",createdAt:"2022-04-10T20:32:24.193634Z",sageScore:3,diffs:[{njs:16,offset:0,notes:919,bombs:0,obstacles:0,nps:3.298,length:580.5,characteristic:"Standard",difficulty:"ExpertPlus",events:18391,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:278.64,paritySummary:{errors:25,warns:13,resets:0},maxScore:838235,label:"You can hide away the fears you face\n\nRead Warnings!",environment:"BTSEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/e45b69a9428505e93f73f1bdc43909d43fc844e3.zip",coverURL:"https://eu.cdn.beatsaver.com/e45b69a9428505e93f73f1bdc43909d43fc844e3.jpg",previewURL:"https://eu.cdn.beatsaver.com/e45b69a9428505e93f73f1bdc43909d43fc844e3.mp3"}],curator:{id:4284947,name:"Phoenix",hash:"5fa08b5281e1d70006f1b322",avatar:"https://cdn.beatsaver.com/avatar/4284947.jpg",type:"SIMPLE",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4284947/playlist"},curatedAt:"2022-04-10T20:55:22.272218Z",createdAt:"2022-04-05T14:25:21.240039Z",updatedAt:"2022-08-25T11:32:19.554653Z",lastPublishedAt:"2022-04-10T20:32:58.830331Z",tags:["balanced","electronic","dance"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"32693",name:"Fall Out Boy - The Phoenix",description:"Might be one of my most accessible mapsets yet as a custom-lit full spread of difficulties paired with both a lawless expert+ and one saber difficulties! Made this one for a friend of mine who's a big FoB fan. Enjoy!\n\nFeedback via reviews down below is always appreciated!\n\nPreview: https://youtu.be/2LFQLJd0pOQ\n\nSocials:\nhttps://twitter.com/bytrius\nhttps://www.youtube.com/c/bytrius\nhttps://bsaber.com/members/bytrius/\nhttps://www.twitch.tv/bytrius",uploader:{id:73032,name:"Bytrius",hash:"5de442271dc9e8000696cd15",avatar:"https://cdn.beatsaver.com/avatar/62ed9906317427e9b14435ca144c7189b83a711a.png",type:"DISCORD",admin:!0,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/73032/playlist"},metadata:{bpm:138,duration:246,songName:"The Phoenix",songSubName:"",songAuthorName:"Fall Out Boy",levelAuthorName:"Bytrius"},stats:{plays:0,downloads:0,upvotes:5122,downvotes:52,score:.9865,reviews:6,sentiment:"VERY_POSITIVE"},uploaded:"2023-05-31T23:01:59.709120Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"bf2c367d29b133b66dc27f6f8e20467d0ec3301f",state:"Published",createdAt:"2023-05-31T22:51:42.410637Z",sageScore:5,diffs:[{njs:10,offset:-.95,notes:494,bombs:0,obstacles:44,nps:2.055,length:553,characteristic:"Standard",difficulty:"Easy",events:4607,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:240.435,paritySummary:{errors:0,warns:0,resets:0},maxScore:447235,blStars:2.56,environment:"NiceEnvironment"},{njs:12,offset:.3,notes:545,bombs:0,obstacles:38,nps:2.267,length:553,characteristic:"Standard",difficulty:"Normal",events:4607,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:240.435,paritySummary:{errors:0,warns:0,resets:0},maxScore:494155,blStars:3.04,environment:"NiceEnvironment"},{njs:14,offset:-.2,notes:767,bombs:0,obstacles:6,nps:3.19,length:553,characteristic:"Standard",difficulty:"Hard",events:4607,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:240.435,paritySummary:{errors:0,warns:0,resets:0},maxScore:700075,blStars:4.07,environment:"NiceEnvironment"},{njs:15,offset:-.475,notes:851,bombs:0,obstacles:9,nps:3.539,length:553,characteristic:"Standard",difficulty:"Expert",events:4607,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:240.435,paritySummary:{errors:0,warns:0,resets:0},maxScore:779035,blStars:4.86,environment:"NiceEnvironment"},{njs:17,offset:-.75,notes:1384,bombs:0,obstacles:4,nps:5.756,length:553,characteristic:"Standard",difficulty:"ExpertPlus",events:4607,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:240.435,paritySummary:{errors:0,warns:0,resets:0},maxScore:1272275,blStars:6.51,environment:"NiceEnvironment"},{njs:16,offset:-.65,notes:816,bombs:0,obstacles:29,nps:3.394,length:553,characteristic:"OneSaber",difficulty:"ExpertPlus",events:4607,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:240.435,paritySummary:{errors:0,warns:0,resets:0},maxScore:743475,blStars:8.35,environment:"NiceEnvironment"},{njs:17,offset:-.75,notes:1388,bombs:0,obstacles:4,nps:5.773,length:553,characteristic:"Lawless",difficulty:"ExpertPlus",events:4607,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:240.435,paritySummary:{errors:0,warns:0,resets:0},maxScore:1275955,label:"Double Downs",environment:"NiceEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/bf2c367d29b133b66dc27f6f8e20467d0ec3301f.zip",coverURL:"https://eu.cdn.beatsaver.com/bf2c367d29b133b66dc27f6f8e20467d0ec3301f.jpg",previewURL:"https://eu.cdn.beatsaver.com/bf2c367d29b133b66dc27f6f8e20467d0ec3301f.mp3"}],curator:{id:4284947,name:"Phoenix",hash:"5fa08b5281e1d70006f1b322",avatar:"https://cdn.beatsaver.com/avatar/4284947.jpg",type:"SIMPLE",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4284947/playlist"},curatedAt:"2023-06-01T02:16:21.699148Z",createdAt:"2023-05-16T06:12:18.475582Z",updatedAt:"2024-08-27T09:34:28.073772Z",lastPublishedAt:"2023-05-31T23:01:59.709120Z",tags:["dance-style","pop","punk"],bookmarked:!1,declaredAi:"None",blRanked:!0,blQualified:!1},{id:"1dcf4",name:"DYES IWASAKI - Bad Hatter ft. Lily Mizusaki",description:'Part of my second custom map pack!\n\nGameplay preview:\nhttps://www.youtube.com/watch?v=ZE5enFMVsv8\n\nGet the pack here:\nhttps://bsaber.com/tokyo-neo-swing/\n\nThis time around I took the extra time and made full spreads and chroma lightshows for each of the 6 songs of the album "Tokyo Neo Swing" by DYES IWASAKI & Lily Mizusaki.\n\nHuge thanks to the lovely playtesters MaybeeMae, Cocci, Monstor, Vaser888, and Kansas!\n\nAlso here is my playthrough of the entire pack on Expert Plus:\nhttps://www.youtube.com/watch?v=lgXR4sBl_kk\n\n\nMore Maps: https://beatsaver.com/profile/4286374\nDiscord Tag: Nixie.Korten#6944\nJoin My Server: https://discord.gg/RjxPpZtH7w\nTwitter: https://twitter.com/Nixie_Korten\nInstagram: https://www.instagram.com/nixie.korten/',uploader:{id:4286374,name:"Nixie.Korten",hash:"6096752e12772e0006e2f7e6",avatar:"https://cdn.beatsaver.com/avatar/bb97db2b49d21f5cbc1a5ba50742fa0e5c86ed3c.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4286374/playlist"},metadata:{bpm:122,duration:176,songName:"Bad Hatter",songSubName:"(ft. Lily Mizusaki)",songAuthorName:"DYES IWASAKI",levelAuthorName:"Nixie.Korten"},stats:{plays:0,downloads:0,upvotes:4470,downvotes:44,score:.9865,reviews:3},uploaded:"2021-11-11T13:06:30.332180Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"ebcf0c8780551bfe0feb96fbc255accad548798b",state:"Published",createdAt:"2021-11-14T11:39:03.473167Z",sageScore:6,diffs:[{njs:12,offset:1,notes:212,bombs:0,obstacles:0,nps:1.249,length:345.167,characteristic:"Standard",difficulty:"Easy",events:4454,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:169.754,paritySummary:{errors:46,warns:12,resets:0},maxScore:187795,environment:"FitBeatEnvironment"},{njs:12,offset:.5,notes:320,bombs:0,obstacles:0,nps:1.885,length:345.167,characteristic:"Standard",difficulty:"Normal",events:4454,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:169.754,paritySummary:{errors:29,warns:14,resets:0},maxScore:287155,environment:"FitBeatEnvironment"},{njs:14,offset:0,notes:491,bombs:0,obstacles:2,nps:2.89,length:345.5,characteristic:"Standard",difficulty:"Hard",events:4454,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:169.918,paritySummary:{errors:4,warns:0,resets:0},maxScore:444475,environment:"FitBeatEnvironment"},{njs:16,offset:-.5,notes:697,bombs:0,obstacles:0,nps:4.102,length:345.5,characteristic:"Standard",difficulty:"Expert",events:4454,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:169.918,paritySummary:{errors:0,warns:9,resets:0},maxScore:633995,environment:"FitBeatEnvironment"},{njs:19,offset:.25,notes:924,bombs:0,obstacles:0,nps:5.438,length:345.5,characteristic:"Standard",difficulty:"ExpertPlus",events:4454,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:169.918,paritySummary:{errors:0,warns:0,resets:0},maxScore:842835,environment:"FitBeatEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/ebcf0c8780551bfe0feb96fbc255accad548798b.zip",coverURL:"https://eu.cdn.beatsaver.com/ebcf0c8780551bfe0feb96fbc255accad548798b.jpg",previewURL:"https://eu.cdn.beatsaver.com/ebcf0c8780551bfe0feb96fbc255accad548798b.mp3"}],curator:{id:4299228,name:"tan",avatar:"https://cdn.beatsaver.com/avatar/19d0c285757c0eea70e922961581953cfd96769b.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/4299228/playlist"},curatedAt:"2021-11-11T13:06:30.332180Z",createdAt:"2021-11-10T18:01:16.390803Z",updatedAt:"2024-11-02T11:19:03.182227Z",lastPublishedAt:"2021-11-14T11:39:08.754762Z",tags:["swing","dance-style","balanced","electronic"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"b7aa",name:"Powerwolf - Venom of Venus",description:"Back to my more regular style, Powerwolf is a power-metal band that perform around the themes of werewolves and religion, a strange but interesting mixture.\r\n\r\nEx+ has a no-colours mode for those who wish to play without the custom block colours, but unfortunately I can't fit such an option for all difficulties.\r\n\r\nNormal 1.85 NPS\r\nHard 3.15 NPS\r\nExpert 4.43 NPS\r\nExpert+ 5.11 NPS\r\n\r\nThere is no easy difficulty, as that I needed the slot for the no-colour mode.",uploader:{id:4285369,name:"Cyrix",hash:"5eb6eb9a7abb000006c85add",avatar:"https://cdn.beatsaver.com/avatar/4213c7b05b9778149ae4536dd10842c6ed307ec5.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4285369/playlist"},metadata:{bpm:164,duration:211,songName:"Venom of Venus",songSubName:"",songAuthorName:"Powerwolf",levelAuthorName:"Cyrix"},stats:{plays:0,downloads:0,upvotes:8e3,downvotes:91,score:.9862,reviews:14,sentiment:"VERY_POSITIVE"},uploaded:"2020-06-29T18:24:10.081Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"f88b43c770dcd85a4ba18368853fbf062d41a09c",key:"b7aa",state:"Published",createdAt:"2020-06-29T18:24:10.081Z",sageScore:7,diffs:[{njs:12,offset:.5,notes:392,bombs:0,obstacles:63,nps:1.948,length:549.938,characteristic:"Standard",difficulty:"Easy",events:4188,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:201.197,paritySummary:{errors:44,warns:15,resets:0},maxScore:353395,label:"Normal",environment:"PanicEnvironment"},{njs:13,offset:1,notes:666,bombs:8,obstacles:36,nps:3.31,length:549.938,characteristic:"Standard",difficulty:"Normal",events:4188,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:201.197,paritySummary:{errors:1,warns:0,resets:1},maxScore:605475,label:"Hard",environment:"PanicEnvironment"},{njs:17,offset:0,notes:934,bombs:9,obstacles:7,nps:4.642,length:549.938,characteristic:"Standard",difficulty:"Hard",events:4188,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:201.197,paritySummary:{errors:0,warns:0,resets:2},maxScore:852035,label:"Ex",environment:"PanicEnvironment"},{njs:20,offset:-.25,notes:1079,bombs:4,obstacles:7,nps:5.353,length:551,characteristic:"Standard",difficulty:"Expert",events:4192,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:201.585,paritySummary:{errors:1,warns:0,resets:2},maxScore:985435,label:"Ex+ No Colour",environment:"PanicEnvironment"},{njs:20,offset:-.25,notes:1079,bombs:4,obstacles:7,nps:5.353,length:551,characteristic:"Standard",difficulty:"ExpertPlus",events:4192,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:201.585,paritySummary:{errors:1,warns:0,resets:2},maxScore:985435,label:"Ex+",environment:"PanicEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/f88b43c770dcd85a4ba18368853fbf062d41a09c.zip",coverURL:"https://eu.cdn.beatsaver.com/f88b43c770dcd85a4ba18368853fbf062d41a09c.jpg",previewURL:"https://eu.cdn.beatsaver.com/f88b43c770dcd85a4ba18368853fbf062d41a09c.mp3"}],curator:{id:4316945,name:"BeastSaber",avatar:"https://cdn.beatsaver.com/avatar/4316945.jpg",type:"SIMPLE",admin:!1,curator:!0,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/4316945/playlist"},curatedAt:"2020-06-29T18:24:10.081Z",createdAt:"2020-06-29T18:24:10.081Z",updatedAt:"2020-06-29T18:24:10.081Z",lastPublishedAt:"2020-06-29T18:24:10.081Z",tags:["metal","balanced"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"210e3",name:"[Modchart] Sarah Cothran - As The World Caves In",description:"This started out as just a simple environment animation test, and then quickly snowballed out into one of my favourite maps I've made so far!\n\nAlso big ups to Fatalution for doing the lighting on this!\nThis is our first collab together, and the first time I've collaborated on a map with someone who shared the same ideas/thought process as myself. \nThis definitely won't be our last collab :)\n\nCheck out their profile and lightshow preview here:\nhttps://beatsaver.com/profile/84945\nhttps://youtu.be/1Fh5jL_UJBc\n\n\nWARNING:\nThis map may cause mild motion sickness! \nIf you feel sick at any point, remember that you can pause and it will stop everything!\n\n(If you have frequent issues with motion sickness in VR, I recommend having a fan on, or keeping smaller carpet with a different texture in your playspace)",uploader:{id:4285959,name:"Mawntee",hash:"5cff0b7698cc5a672c854ca6",avatar:"https://cdn.beatsaver.com/avatar/e373d502d75ed37d9cc60d2aa58b08f8ab6ebc90.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4285959/playlist"},metadata:{bpm:124,duration:164,songName:"As The World Caves In",songSubName:"",songAuthorName:"Sarah Cothran",levelAuthorName:"Mawntee & Fatalution"},stats:{plays:0,downloads:0,upvotes:8562,downvotes:100,score:.986,reviews:22,sentiment:"VERY_POSITIVE"},uploaded:"2022-02-02T20:18:54.976546Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"d4d847465bff16bc936e8281b5e3c703a4ca1c93",state:"Published",createdAt:"2022-02-02T20:27:55.445283Z",sageScore:4,diffs:[{njs:18,offset:1.961111,notes:259,bombs:20,obstacles:0,nps:1.63,length:328.466,characteristic:"Standard",difficulty:"ExpertPlus",events:31028,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:158.935,paritySummary:{errors:403,warns:36,resets:11},maxScore:231035,label:"Our Final Night Alive",environment:"TimbalandEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/d4d847465bff16bc936e8281b5e3c703a4ca1c93.zip",coverURL:"https://eu.cdn.beatsaver.com/d4d847465bff16bc936e8281b5e3c703a4ca1c93.jpg",previewURL:"https://eu.cdn.beatsaver.com/d4d847465bff16bc936e8281b5e3c703a4ca1c93.mp3"}],curator:{id:4234800,name:"AllieeCute",avatar:"https://cdn.beatsaver.com/avatar/f3788635ba87f3e1144e26501fe02c26b29aaccc.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/4234800/playlist"},curatedAt:"2022-02-02T20:18:54.976546Z",createdAt:"2022-02-02T20:07:53.311141Z",updatedAt:"2023-10-16T18:16:00.863418Z",lastPublishedAt:"2023-06-06T14:03:19.315272Z",tags:["accuracy","dance-style"],bookmarked:!1,collaborators:[{id:84945,name:"fatalution",hash:"5cff0b7398cc5a672c84f30a",avatar:"https://cdn.beatsaver.com/avatar/7b7e7792dd5a8b250b5205c3a823d7d4006182f5.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/84945/playlist"}],declaredAi:"None",blRanked:!1,blQualified:!1},{id:"352d8",name:"Belle - Lend Me Your Voice [Noodle Extension, Chrom+] (Remastered!!!)",description:'If you are seasick in VR, do not play the "ALL EFFECTS" and "NO rotation (360 °)". For you, difficulty - "NO effects"\n\nIf there are performance problems disable "Mirror" in the graphics settings\n\nSong - https://music.youtube.com/watch?v=nSbhUCM5Z6s',uploader:{id:4284370,name:"hickeychan",hash:"6001ba1539ce5b000682a59f",avatar:"https://cdn.beatsaver.com/avatar/ecb540d442d3dbcd21881c32b050977d282a7438.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4284370/playlist"},metadata:{bpm:121,duration:304,songName:"Lend Me Your Voice",songSubName:"",songAuthorName:"Kaho Nakamura",levelAuthorName:"HickeyChan"},stats:{plays:0,downloads:0,upvotes:1156,downvotes:6,score:.9859,reviews:3},uploaded:"2023-08-24T10:14:50.865197Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"be0ab6e5f1b5581a9a053f4a4c144c785696d349",state:"Published",createdAt:"2023-08-24T10:12:42.966966Z",sageScore:1,diffs:[{njs:16,offset:-.7,notes:687,bombs:0,obstacles:2859,nps:2.34,length:592.155,characteristic:"Standard",difficulty:"Hard",events:25577,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:293.631,paritySummary:{errors:0,warns:0,resets:0},maxScore:624795,label:"NO effects",environment:"BTSEnvironment"},{njs:16,offset:-.7,notes:687,bombs:0,obstacles:2859,nps:2.34,length:592.155,characteristic:"Standard",difficulty:"Expert",events:25577,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:293.631,paritySummary:{errors:0,warns:0,resets:0},maxScore:624795,label:"NO rotation (360 °)",environment:"BTSEnvironment"},{njs:16,offset:-.7,notes:687,bombs:0,obstacles:2859,nps:2.34,length:592.155,characteristic:"Standard",difficulty:"ExpertPlus",events:25577,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:293.631,paritySummary:{errors:0,warns:0,resets:0},maxScore:624795,label:"ALL EFFECTS",environment:"BTSEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/be0ab6e5f1b5581a9a053f4a4c144c785696d349.zip",coverURL:"https://eu.cdn.beatsaver.com/be0ab6e5f1b5581a9a053f4a4c144c785696d349.jpg",previewURL:"https://eu.cdn.beatsaver.com/be0ab6e5f1b5581a9a053f4a4c144c785696d349.mp3"}],curator:{id:4292041,name:"symphonic",avatar:"https://cdn.beatsaver.com/avatar/2dc906ee5b78c2cb723f0eae964c2c203babf3f4.png",type:"DISCORD",admin:!0,curator:!0,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4292041/playlist"},curatedAt:"2023-08-25T06:09:54.756879Z",createdAt:"2023-08-24T10:12:42.966966Z",updatedAt:"2023-09-04T05:38:48.731043Z",lastPublishedAt:"2023-08-24T10:14:50.865197Z",tags:["accuracy","balanced","anime","classical-orchestral"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"1a0b8",name:"[Electro Swing Pack] Wolfgang Lohr & The Swinghoppers - Party Like It's 1920",description:"Nixie Presents: Electro Swing Pack!\n\n10 electro swing songs with expert and expert+ diffs to make your booty swing!\n\nGet The Pack: \nhttps://bsaber.com/electro-swing-pack/\n\nMap Gameplay:\nhttps://youtu.be/ye22W_xrXnk\n\nComplete Pack Playthrough:\nhttps://youtu.be/yj9rw4MEh7s\n\n\nHuge thanks in particular to:\nMonstor, Bearly, Noxn, Bullet, Vaser888, Tocxx, Jafdy, Storm Knight and Pixelguy!\n\n\nMore Maps: https://beatsaver.com/profile/4286374\nDiscord Tag: Nixie.Korten#6944\nJoin My Server: https://discord.gg/RjxPpZtH7w\nTwitter: https://twitter.com/Nixie_Korten\nInstagram: https://www.instagram.com/nixie.korten/",uploader:{id:4286374,name:"Nixie.Korten",hash:"6096752e12772e0006e2f7e6",avatar:"https://cdn.beatsaver.com/avatar/bb97db2b49d21f5cbc1a5ba50742fa0e5c86ed3c.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4286374/playlist"},metadata:{bpm:120,duration:187,songName:"Party Like It's 1920",songSubName:"",songAuthorName:"The Swinghoppers & Wolfgang Lohr",levelAuthorName:"Nixie.Korten"},stats:{plays:0,downloads:0,upvotes:4194,downvotes:45,score:.9855,reviews:1},uploaded:"2021-07-08T15:25:28.451Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"973bab980b568e41b0a17a772e61377b01ef85ec",key:"1a0b8",state:"Published",createdAt:"2021-07-08T15:25:28.451Z",sageScore:4,diffs:[{njs:16,offset:-.5,notes:556,bombs:0,obstacles:0,nps:3.063,length:363,characteristic:"Standard",difficulty:"Expert",events:2057,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:181.5,paritySummary:{errors:0,warns:0,resets:0},maxScore:504275,environment:"PanicEnvironment"},{njs:19,offset:.25,notes:850,bombs:0,obstacles:0,nps:4.683,length:363,characteristic:"Standard",difficulty:"ExpertPlus",events:2057,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:181.5,paritySummary:{errors:0,warns:0,resets:0},maxScore:774755,environment:"PanicEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/973bab980b568e41b0a17a772e61377b01ef85ec.zip",coverURL:"https://eu.cdn.beatsaver.com/973bab980b568e41b0a17a772e61377b01ef85ec.jpg",previewURL:"https://eu.cdn.beatsaver.com/973bab980b568e41b0a17a772e61377b01ef85ec.mp3"}],curator:{id:73032,name:"Bytrius",hash:"5de442271dc9e8000696cd15",avatar:"https://cdn.beatsaver.com/avatar/62ed9906317427e9b14435ca144c7189b83a711a.png",type:"DISCORD",admin:!0,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/73032/playlist"},curatedAt:"2021-07-08T15:25:28.451Z",createdAt:"2021-07-08T15:25:28.451Z",updatedAt:"2024-11-02T11:17:34.643709Z",lastPublishedAt:"2021-07-08T15:25:28.451Z",tags:["swing","balanced","dance-style","electronic"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"1181f",name:"Royal & the Serpent - Overwhelmed",description:"Feeling that finals crunch? Worried about the pandemic? General anxiety with the news, and just feeling overwhelmed? Don't forget to take a step back and take a breath. Maybe by dancing along to this song that perfectly captures all of those feelings! Complete with overwhelming Chroma 2.0 lights! And now the extra details:\n\nBPM: 87\nNPS: Ez - 1.71; N - 2.09; H - 2.75; Ex - 3.19; Ex+ - 4.11\nNotes: Ez - 277; N - 338; H - 444; Ex - 516; Ex+ - 664\nBombs: Ez - 0; N - 0; H - 4; Ex - 4; Ex+ - 4\nWalls: Ez - 136; N - 134; H - 144; Ex - 109; Ex+ - 109\n\nSpecial thanks to qwasyx, Smay, and Cyrix for playtesting!",uploader:{id:4285188,name:"fruhead",hash:"5cff0b7598cc5a672c852683",avatar:"https://cdn.beatsaver.com/avatar/bcfbb8e5ac8665ae28d37b76a402daf0b88a68d0.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4285188/playlist"},metadata:{bpm:87,duration:161,songName:"Overwhelmed",songSubName:"",songAuthorName:"Royal & the Serpent",levelAuthorName:"fruhead"},stats:{plays:0,downloads:0,upvotes:7135,downvotes:85,score:.9854,reviews:4},uploaded:"2020-11-29T23:09:47.309Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"b748894960a346f1568b9f4876643f1358cfa897",key:"1181f",state:"Published",createdAt:"2020-11-29T23:09:47.309Z",sageScore:6,diffs:[{njs:10,offset:0,notes:277,bombs:0,obstacles:136,nps:1.793,length:224,characteristic:"Standard",difficulty:"Easy",events:7200,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:154.483,paritySummary:{errors:43,warns:9,resets:0},maxScore:247595,environment:"PanicEnvironment"},{njs:12,offset:-.3,notes:338,bombs:0,obstacles:134,nps:2.188,length:224,characteristic:"Standard",difficulty:"Normal",events:7200,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:154.483,paritySummary:{errors:22,warns:11,resets:0},maxScore:303715,environment:"PanicEnvironment"},{njs:14,offset:.4,notes:444,bombs:4,obstacles:144,nps:2.874,length:224,characteristic:"Standard",difficulty:"Hard",events:7200,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:154.483,paritySummary:{errors:14,warns:4,resets:4},maxScore:401235,environment:"PanicEnvironment"},{njs:16,offset:.25,notes:516,bombs:4,obstacles:109,nps:3.34,length:224,characteristic:"Standard",difficulty:"Expert",events:7200,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:154.483,paritySummary:{errors:0,warns:0,resets:2},maxScore:467475,environment:"PanicEnvironment"},{njs:18,offset:.1,notes:664,bombs:4,obstacles:109,nps:4.298,length:224,characteristic:"Standard",difficulty:"ExpertPlus",events:7200,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:154.483,paritySummary:{errors:0,warns:0,resets:2},maxScore:603635,environment:"PanicEnvironment"},{njs:16,offset:0,notes:0,bombs:0,obstacles:0,nps:0,length:0,characteristic:"Lightshow",difficulty:"Expert",events:7200,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:0,paritySummary:{errors:0,warns:0,resets:0},maxScore:0,label:"Overwhelmed",environment:"PanicEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/b748894960a346f1568b9f4876643f1358cfa897.zip",coverURL:"https://eu.cdn.beatsaver.com/b748894960a346f1568b9f4876643f1358cfa897.jpg",previewURL:"https://eu.cdn.beatsaver.com/b748894960a346f1568b9f4876643f1358cfa897.mp3"}],curator:{id:76372,name:"brightknight",hash:"5f30421b8a13d900061fe595",avatar:"https://cdn.beatsaver.com/avatar/236b93ff0df8c0f0305e52b6d3d01fa3e588b7ec.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/76372/playlist"},curatedAt:"2020-11-29T23:09:47.309Z",createdAt:"2020-11-29T23:09:47.309Z",updatedAt:"2020-11-29T23:09:47.309Z",lastPublishedAt:"2020-11-29T23:09:47.309Z",tags:["balanced"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"4980",name:"(Old Version) Paradise - Coldplay",description:"\"Paradise\" is a song by the British rock band Coldplay. The song was released on 12 September 2011. I kinda like this song for relaxing on long car rides and I don't know how it will feel as a beat saber map but I'ma try mapping it anyways. So here it is :)\n\n2022 EDIT: Download the new map here: https://beatsaver.com/maps/28102",uploader:{id:58338,name:"Joetastic",hash:"5cff0b7498cc5a672c85050e",avatar:"https://cdn.beatsaver.com/avatar/91bb7b0510cea647179bc95e032f8a25608b09f1.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/58338/playlist"},metadata:{bpm:70,duration:278,songName:"Paradise",songSubName:"",songAuthorName:"Coldplay",levelAuthorName:"Joetastic"},stats:{plays:0,downloads:0,upvotes:6216,downvotes:74,score:.9852,reviews:1},uploaded:"2019-04-30T05:45:51Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"b14639af36673a43fe32bc7563619deff438d438",key:"4980",state:"Published",createdAt:"2019-04-30T05:45:51Z",sageScore:6,diffs:[{njs:13,offset:0,notes:1023,bombs:0,obstacles:35,nps:3.816,length:312.75,characteristic:"Standard",difficulty:"Expert",events:4651,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:268.071,paritySummary:{errors:28,warns:29,resets:0},maxScore:933915,environment:"TriangleEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/b14639af36673a43fe32bc7563619deff438d438.zip",coverURL:"https://eu.cdn.beatsaver.com/b14639af36673a43fe32bc7563619deff438d438.jpg",previewURL:"https://eu.cdn.beatsaver.com/b14639af36673a43fe32bc7563619deff438d438.mp3"}],curator:{id:4316945,name:"BeastSaber",avatar:"https://cdn.beatsaver.com/avatar/4316945.jpg",type:"SIMPLE",admin:!1,curator:!0,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/4316945/playlist"},curatedAt:"2019-04-30T05:45:51Z",createdAt:"2019-04-30T05:45:51Z",updatedAt:"2022-07-22T08:36:01.092595Z",lastPublishedAt:"2019-04-30T05:45:51Z",tags:["alternative","indie"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"bdc7",name:"That's Life - Frank Sinatra",description:"Here is an honest-to-goodness human-mapped version of Frank Sinatra's 1966 hit, That's Life. This song is way too good to just have a crappy beat sage map.\n\nNormal and Hard Standard levels, and Expert Standard, 90, and 360 levels. Note that the expert levels are all essentially the same, just with varying degrees of wobbles.\n\nThanks to Maybeemae for the playtests!\n\nhttps://youtu.be/QXjj2-fgK8U",uploader:{id:78593,name:"techbutterfly",hash:"5cff0b7798cc5a672c8566f7",avatar:"https://cdn.beatsaver.com/avatar/99c0065fcfac5bfcf11adc69a58a8d3251bd748e.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/78593/playlist"},metadata:{bpm:77,duration:187,songName:"That's Life",songSubName:"",songAuthorName:"Frank Sinatra",levelAuthorName:"TechButterfly"},stats:{plays:0,downloads:0,upvotes:3713,downvotes:40,score:.9851,reviews:8,sentiment:"VERY_POSITIVE"},uploaded:"2020-07-11T22:35:42.033Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"7cca8c1afecd782cfd74f158c312201b780043d8",key:"bdc7",state:"Published",createdAt:"2020-07-11T22:35:42.033Z",sageScore:4,diffs:[{njs:10,offset:-.3,notes:321,bombs:0,obstacles:6,nps:1.768,length:233,characteristic:"Standard",difficulty:"Normal",events:1086,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:181.558,paritySummary:{errors:30,warns:41,resets:0},maxScore:288075,environment:"NiceEnvironment"},{njs:12,offset:.3,notes:418,bombs:0,obstacles:8,nps:2.302,length:233,characteristic:"Standard",difficulty:"Hard",events:1086,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:181.558,paritySummary:{errors:24,warns:38,resets:0},maxScore:377315,environment:"NiceEnvironment"},{njs:13,offset:.1,notes:492,bombs:0,obstacles:8,nps:2.71,length:233,characteristic:"Standard",difficulty:"Expert",events:1086,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:181.558,paritySummary:{errors:24,warns:26,resets:0},maxScore:445395,environment:"NiceEnvironment"},{njs:13,offset:.3,notes:489,bombs:0,obstacles:8,nps:2.693,length:233,characteristic:"90Degree",difficulty:"Expert",events:1192,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:181.558,paritySummary:{errors:25,warns:27,resets:0},maxScore:442635,label:"Expert 90",environment:"GlassDesertEnvironment"},{njs:13,offset:.3,notes:489,bombs:0,obstacles:8,nps:2.693,length:233,characteristic:"360Degree",difficulty:"Expert",events:1166,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:181.558,paritySummary:{errors:25,warns:26,resets:0},maxScore:442635,label:"Expert360",environment:"GlassDesertEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/7cca8c1afecd782cfd74f158c312201b780043d8.zip",coverURL:"https://eu.cdn.beatsaver.com/7cca8c1afecd782cfd74f158c312201b780043d8.jpg",previewURL:"https://eu.cdn.beatsaver.com/7cca8c1afecd782cfd74f158c312201b780043d8.mp3"}],curator:{id:32269,name:"maybeemae",hash:"5e1123516d774b0006a953ec",avatar:"https://cdn.beatsaver.com/avatar/d2119e1ff402b2cd380caf8b074d3f7c037f0ec2.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/32269/playlist"},curatedAt:"2020-07-11T22:35:42.033Z",createdAt:"2020-07-11T22:35:42.033Z",updatedAt:"2020-07-11T22:35:42.033Z",lastPublishedAt:"2020-07-11T22:35:42.033Z",tags:["pop","jazz","dance-style"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"3bbb0",name:"[Modchart] Leslie Wai - Paradigm",description:"MAP IS NOT WORKING ON QUEST 1.37+\nMAP IS NOT WORKING ON QUEST 1.37+\nMAP IS NOT WORKING ON QUEST 1.37+\n\nNOTE: If your sabers are in the wrong position after the intro try disabling any room offset/rotation\nNOTE 2: The map is broken on some versions including 1.34 and quest, I am gonna work on report all the issues\nNOTE 3: The map should be playable now on Quest native (just a few visual bugs)\n\nMy biggest project so far!\nenjoy it\n\nMap preview: https://youtu.be/gokZx0QjqZQ\n\nReupload: Thanks for the 429 people that played the map so far! i am reuploading to fix a few bugs:\n- Fix saber positions being wrong for some people\n- Disable left handed option\n- Disable Intro Skip\n\nReupload 2: Thanks for the another 170 plays I hope this is the final reupload:\n- Fix light id errors\n- Fix cinema suggestion not needed\n- Trying another fix for sabers wrong position\n\nReupload 3: And I hope this is the last one, thanks for the 124 new plays!\n- Fix player position bug on quest\n- Fix notes position bug on quest\n- Fix gimmik part on quest\n- Added suggested colors for notes\n- Changed NJS and JD\n- Fix sabers coming from the wrong direction in the intro",uploader:{id:4284535,name:"Elecast",hash:"6069279f5ab13d000609e874",avatar:"https://cdn.beatsaver.com/avatar/4dd111a1ec473c3559cfc73caaac650be56b65a1.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4284535/playlist"},metadata:{bpm:130,duration:441,songName:"Paradigm",songSubName:"",songAuthorName:"Leslie Wai",levelAuthorName:"Elecast"},stats:{plays:0,downloads:0,upvotes:2734,downvotes:27,score:.9851,reviews:35,sentiment:"VERY_POSITIVE"},uploaded:"2024-04-13T20:59:13.608905Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"a504aafe70cf723f46503568f65813ef616d030f",state:"Published",createdAt:"2024-04-24T23:51:45.788382Z",sageScore:3,diffs:[{njs:17,offset:-.75,notes:1051,bombs:360,obstacles:249,nps:3.038,length:749.5,characteristic:"Standard",difficulty:"ExpertPlus",events:12016,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:345.923,paritySummary:{errors:0,warns:0,resets:0},maxScore:959675,label:"You can't escape",environment:"BillieEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/a504aafe70cf723f46503568f65813ef616d030f.zip",coverURL:"https://eu.cdn.beatsaver.com/a504aafe70cf723f46503568f65813ef616d030f.jpg",previewURL:"https://eu.cdn.beatsaver.com/a504aafe70cf723f46503568f65813ef616d030f.mp3"}],curator:{id:4284445,name:"Emilia",hash:"5cff0b7898cc5a672c856ed3",avatar:"https://cdn.beatsaver.com/avatar/4284445.jpg",type:"SIMPLE",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4284445/playlist"},curatedAt:"2024-04-13T23:47:05.160104Z",createdAt:"2024-04-12T23:23:24.101391Z",updatedAt:"2024-08-18T18:18:25.185313Z",lastPublishedAt:"2024-04-24T23:51:50.910171Z",tags:["balanced","electronic"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"1a0ba",name:"[Electro Swing Pack] Wolfgang Lohr & Maskarade - Hit The Road Jack",description:"Nixie Presents: Electro Swing Pack!\n\n10 electro swing songs with expert and expert+ diffs to make your booty swing!\n\nGet The Pack: \nhttps://bsaber.com/electro-swing-pack/\n\nMap Gameplay:\nhttps://youtu.be/0ObNR9n_dDs\n\nComplete Pack Playthrough:\nhttps://youtu.be/yj9rw4MEh7s\n\n\nHuge thanks in particular to:\nMonstor, Bearly, Noxn, Bullet, Vaser888, Tocxx, Jafdy, Storm Knight and Pixelguy!\n\n\nMore Maps: https://beatsaver.com/profile/4286374\nDiscord Tag: Nixie.Korten#6944\nJoin My Server: https://discord.gg/RjxPpZtH7w\nTwitter: https://twitter.com/Nixie_Korten\nInstagram: https://www.instagram.com/nixie.korten/",uploader:{id:4286374,name:"Nixie.Korten",hash:"6096752e12772e0006e2f7e6",avatar:"https://cdn.beatsaver.com/avatar/bb97db2b49d21f5cbc1a5ba50742fa0e5c86ed3c.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4286374/playlist"},metadata:{bpm:124,duration:159,songName:"Hit The Road Jack",songSubName:"",songAuthorName:"Wolfgang Lohr & Maskarade",levelAuthorName:"Nixie.Korten"},stats:{plays:0,downloads:0,upvotes:3787,downvotes:42,score:.9849},uploaded:"2021-07-08T15:26:18.072Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"75f10751d58f6f1ab0bc36e94039a144256adccb",key:"1a0ba",state:"Published",createdAt:"2021-07-08T15:26:18.072Z",sageScore:4,diffs:[{njs:16,offset:-.25,notes:475,bombs:0,obstacles:0,nps:3.089,length:317.75,characteristic:"Standard",difficulty:"Expert",events:1846,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:153.75,paritySummary:{errors:0,warns:0,resets:0},maxScore:429755,environment:"PanicEnvironment"},{njs:19,offset:.25,notes:750,bombs:0,obstacles:0,nps:4.878,length:317.75,characteristic:"Standard",difficulty:"ExpertPlus",events:1846,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:153.75,paritySummary:{errors:0,warns:0,resets:0},maxScore:682755,environment:"PanicEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/75f10751d58f6f1ab0bc36e94039a144256adccb.zip",coverURL:"https://eu.cdn.beatsaver.com/75f10751d58f6f1ab0bc36e94039a144256adccb.jpg",previewURL:"https://eu.cdn.beatsaver.com/75f10751d58f6f1ab0bc36e94039a144256adccb.mp3"}],curator:{id:73032,name:"Bytrius",hash:"5de442271dc9e8000696cd15",avatar:"https://cdn.beatsaver.com/avatar/62ed9906317427e9b14435ca144c7189b83a711a.png",type:"DISCORD",admin:!0,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/73032/playlist"},curatedAt:"2021-07-08T15:26:18.072Z",createdAt:"2021-07-08T15:26:18.072Z",updatedAt:"2024-11-02T11:17:50.904586Z",lastPublishedAt:"2021-07-08T15:26:18.072Z",tags:["swing","balanced","dance-style","electronic"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"1a0b7",name:"[Electro Swing Pack] Jamie Berry - Lost In The Rhythm (ft. Octavia Rose)",description:"Nixie Presents: Electro Swing Pack!\n\n10 electro swing songs with expert and expert+ diffs to make your booty swing!\n\nGet The Pack: \nhttps://bsaber.com/electro-swing-pack/\n\nMap Gameplay:\nhttps://youtu.be/4O8l7rq4eHI\n\nComplete Pack Playthrough:\nhttps://youtu.be/yj9rw4MEh7s\n\n\nHuge thanks in particular to:\nMonstor, Bearly, Noxn, Bullet, Vaser888, Tocxx, Jafdy, Storm Knight and Pixelguy!\n\n\nMore Maps: https://beatsaver.com/profile/4286374\nDiscord Tag: Nixie.Korten#6944\nJoin My Server: https://discord.gg/RjxPpZtH7w\nTwitter: https://twitter.com/Nixie_Korten\nInstagram: https://www.instagram.com/nixie.korten/",uploader:{id:4286374,name:"Nixie.Korten",hash:"6096752e12772e0006e2f7e6",avatar:"https://cdn.beatsaver.com/avatar/bb97db2b49d21f5cbc1a5ba50742fa0e5c86ed3c.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4286374/playlist"},metadata:{bpm:121,duration:187,songName:"Lost In The Rhythm",songSubName:"(ft. Octavia Rose)",songAuthorName:"Jamie Berry",levelAuthorName:"Nixie.Korten"},stats:{plays:0,downloads:0,upvotes:3307,downvotes:36,score:.9847,reviews:1},uploaded:"2021-07-08T15:24:57.679Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"6d006d47880a45a134844f3787f3c184881d4673",key:"1a0b7",state:"Published",createdAt:"2021-07-08T15:24:57.679Z",sageScore:5,diffs:[{njs:16,offset:-.25,notes:591,bombs:0,obstacles:8,nps:3.274,length:364,characteristic:"Standard",difficulty:"Expert",events:3271,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:180.496,paritySummary:{errors:0,warns:0,resets:0},maxScore:536475,environment:"PanicEnvironment"},{njs:19,offset:.25,notes:821,bombs:0,obstacles:8,nps:4.549,length:364,characteristic:"Standard",difficulty:"ExpertPlus",events:3271,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:180.496,paritySummary:{errors:0,warns:0,resets:0},maxScore:748075,environment:"PanicEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/6d006d47880a45a134844f3787f3c184881d4673.zip",coverURL:"https://eu.cdn.beatsaver.com/6d006d47880a45a134844f3787f3c184881d4673.jpg",previewURL:"https://eu.cdn.beatsaver.com/6d006d47880a45a134844f3787f3c184881d4673.mp3"}],curator:{id:73032,name:"Bytrius",hash:"5de442271dc9e8000696cd15",avatar:"https://cdn.beatsaver.com/avatar/62ed9906317427e9b14435ca144c7189b83a711a.png",type:"DISCORD",admin:!0,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/73032/playlist"},curatedAt:"2021-07-08T15:24:57.679Z",createdAt:"2021-07-08T15:24:57.679Z",updatedAt:"2024-11-02T11:17:26.961219Z",lastPublishedAt:"2021-07-08T15:24:57.679Z",tags:["swing","balanced","dance-style","electronic"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"77e9",name:"Jingo Jungle [Saga of Tanya the Evil Opening] - AmaLee",description:'AmaLee\'s English cover of "Jingo Jungle", the opening from Saga of Tanya the Evil (Youjo Senki). Original song by MYTH & ROID.',uploader:{id:58338,name:"Joetastic",hash:"5cff0b7498cc5a672c85050e",avatar:"https://cdn.beatsaver.com/avatar/91bb7b0510cea647179bc95e032f8a25608b09f1.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/58338/playlist"},metadata:{bpm:130,duration:226,songName:"Jingo Jungle",songSubName:"",songAuthorName:"AmaLee",levelAuthorName:"Joetastic"},stats:{plays:0,downloads:0,upvotes:4125,downvotes:48,score:.9846,reviews:1},uploaded:"2019-12-21T02:44:34.295Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"f90a2e4f8ee7b1f33543cddccb8baea660253d4a",key:"77e9",state:"Published",createdAt:"2019-12-21T02:44:34.295Z",sageScore:5,diffs:[{njs:12,offset:0,notes:581,bombs:104,obstacles:28,nps:2.647,length:475.5,characteristic:"Standard",difficulty:"Hard",events:5987,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:219.462,paritySummary:{errors:35,warns:15,resets:10},maxScore:527275,environment:"DefaultEnvironment"},{njs:15,offset:0,notes:950,bombs:78,obstacles:14,nps:4.329,length:475.5,characteristic:"Standard",difficulty:"Expert",events:5987,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:219.462,paritySummary:{errors:42,warns:48,resets:8},maxScore:866755,environment:"DefaultEnvironment"},{njs:17,offset:0,notes:1184,bombs:105,obstacles:17,nps:5.395,length:475.5,characteristic:"Standard",difficulty:"ExpertPlus",events:5987,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:219.462,paritySummary:{errors:32,warns:43,resets:16},maxScore:1082035,environment:"DefaultEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/f90a2e4f8ee7b1f33543cddccb8baea660253d4a.zip",coverURL:"https://eu.cdn.beatsaver.com/f90a2e4f8ee7b1f33543cddccb8baea660253d4a.jpg",previewURL:"https://eu.cdn.beatsaver.com/f90a2e4f8ee7b1f33543cddccb8baea660253d4a.mp3"}],createdAt:"2019-12-21T02:44:34.295Z",updatedAt:"2019-12-21T02:44:34.295Z",lastPublishedAt:"2019-12-21T02:44:34.295Z",tags:["pop","anime"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"a438",name:"Wait - M83 (wall map)",description:"I wanted to do something special for this great song, and also see the potential of Noodle Extensions. A few tips for a better experience:\r\n- disable the mirror effect in the game settings\r\n- turn the SFX volume down in the player settings\r\n- hide the HUD in the player settings\r\n\r\nVideo: https://youtu.be/oe6ThhijPy0\r\n\r\nThe map has a lot of walls, so you might not be able to run it on the lower-end hardware. I've included a version with less walls in case it helps.",uploader:{id:4288814,name:"nyri0",hash:"5e792df416c9680006086a78",avatar:"https://cdn.beatsaver.com/avatar/233323d456510756fbbc0140c1a0698caf8b096c.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,playlistUrl:"https://api.beatsaver.com/users/id/4288814/playlist"},metadata:{bpm:148,duration:336,songName:"Wait",songSubName:"",songAuthorName:"M83",levelAuthorName:"nyri0"},stats:{plays:0,downloads:0,upvotes:4116,downvotes:48,score:.9845,reviews:9,sentiment:"VERY_POSITIVE"},uploaded:"2020-05-08T23:53:02.030Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"0d8921ef06a889cbd9db13afcc43f09a1619b173",key:"a438",state:"Published",createdAt:"2020-05-08T23:53:02.030Z",sageScore:6,diffs:[{njs:8,offset:6,notes:735,bombs:0,obstacles:6684,nps:2.225,length:815,characteristic:"Standard",difficulty:"Easy",events:5,chroma:!1,me:!1,ne:!0,cinema:!1,seconds:330.405,paritySummary:{errors:93,warns:27,resets:0},maxScore:668955,label:"Hard (less lag)",environment:"BigMirrorEnvironment"},{njs:8,offset:6,notes:735,bombs:0,obstacles:10499,nps:2.225,length:815,characteristic:"Standard",difficulty:"Hard",events:5,chroma:!1,me:!1,ne:!0,cinema:!1,seconds:330.405,paritySummary:{errors:93,warns:27,resets:0},maxScore:668955,label:"Hard (original)",environment:"BigMirrorEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/0d8921ef06a889cbd9db13afcc43f09a1619b173.zip",coverURL:"https://eu.cdn.beatsaver.com/0d8921ef06a889cbd9db13afcc43f09a1619b173.jpg",previewURL:"https://eu.cdn.beatsaver.com/0d8921ef06a889cbd9db13afcc43f09a1619b173.mp3"}],curator:{id:4316945,name:"BeastSaber",avatar:"https://cdn.beatsaver.com/avatar/4316945.jpg",type:"SIMPLE",admin:!1,curator:!0,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/4316945/playlist"},curatedAt:"2020-05-08T23:53:02.030Z",createdAt:"2020-05-08T23:53:02.030Z",updatedAt:"2020-05-08T23:53:02.030Z",lastPublishedAt:"2020-05-08T23:53:02.030Z",tags:["rock","indie","techno"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"12ad1",name:"Minnesota - Colors (ft. Jackie Rain) | Chroma RGB",description:"Chroma 2.0 HIGHLY RECOMMENDED!\n\nHad this map sitting in my project folder for some months and finally got to finish it! \nIt features a Chroma RGB lightshow AND Rainbow notes, for the full COLOR experience :)\n\nPreview: https://www.youtube.com/watch?v=8Omzd7IdJt0",uploader:{id:4284201,name:"nitronik.exe",hash:"5cff0b7798cc5a672c855d84",avatar:"https://cdn.beatsaver.com/avatar/ab054640a94777ed7e92d91a505a85f8c5047be5.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4284201/playlist"},metadata:{bpm:140,duration:202,songName:"Colors",songSubName:"(ft. Jackie Rain)",songAuthorName:"Minnesota",levelAuthorName:"nitronik.exe"},stats:{plays:0,downloads:0,upvotes:4295,downvotes:51,score:.9844,reviews:7,sentiment:"VERY_POSITIVE"},uploaded:"2021-01-13T15:55:44.846Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"03fcb98091e50600d9d777251d765c53384c2735",key:"12ad1",state:"Published",createdAt:"2021-01-13T15:55:44.846Z",sageScore:4,diffs:[{njs:13,offset:.5,notes:395,bombs:0,obstacles:221,nps:2.057,length:448,characteristic:"Standard",difficulty:"Hard",events:16569,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:192,paritySummary:{errors:0,warns:0,resets:0},maxScore:356155,environment:"BigMirrorEnvironment"},{njs:16,offset:0,notes:601,bombs:0,obstacles:113,nps:3.13,length:448,characteristic:"Standard",difficulty:"Expert",events:16569,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:192,paritySummary:{errors:0,warns:0,resets:0},maxScore:545675,environment:"BigMirrorEnvironment"},{njs:19,offset:-.5,notes:911,bombs:0,obstacles:120,nps:4.745,length:448,characteristic:"Standard",difficulty:"ExpertPlus",events:16569,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:192,paritySummary:{errors:0,warns:0,resets:0},maxScore:830875,label:"Colors",environment:"BigMirrorEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/03fcb98091e50600d9d777251d765c53384c2735.zip",coverURL:"https://eu.cdn.beatsaver.com/03fcb98091e50600d9d777251d765c53384c2735.jpg",previewURL:"https://eu.cdn.beatsaver.com/03fcb98091e50600d9d777251d765c53384c2735.mp3"}],curator:{id:1096,name:"pyrowarfare",hash:"5e99c7df3f476a0006596cdf",avatar:"https://www.gravatar.com/avatar/28fcd25e8adfa72a17daa766767daf781bee89776333a3ed7a4cc84146e6a3e8?d=retro",type:"SIMPLE",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/1096/playlist"},curatedAt:"2021-01-13T15:55:44.846Z",createdAt:"2021-01-13T15:55:44.846Z",updatedAt:"2021-01-13T15:55:44.846Z",lastPublishedAt:"2021-01-13T15:55:44.846Z",tags:["dubstep","balanced"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"4a2b3",name:"[Vivify] Turret Orchestra (Cara Mia Addio) - Portal 2",description:"Portal •⩊•\n\nWork done:\nMadChase - Vivify and Standard Mapping\nRateGyro - OneSaber Mapping\nXentha - 3d Modeling \n\nAll Lawless: No Vivify difficulties \n\nThis took FAR too long to make too..... hope you enjoy this product of my sufferings as much as I do :)\n\nGo check out @rategyro, they did the mapping for all the Onesaber diffs and HUGE thanks to @Xentha for making a majority of the env used in this map, this would not have been possible without them. \n\nCredits: https://docs.google.com/document/d/1gR8x4iIk_n2i4ScYRPGEyD8OfZNsrDftmy6Z9cC5L_E/edit?usp=sharing",uploader:{id:4286182,name:"MadChase",avatar:"https://cdn.beatsaver.com/avatar/99feaf0fe97b6c67dde2ae7ba055fab744b0ac61.png",type:"DISCORD",admin:!1,curator:!0,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4286182/playlist"},metadata:{bpm:204,duration:120,songName:"Turret Orchestra",songSubName:"(Cara Mia Addio)",songAuthorName:"Portal 2",levelAuthorName:"MadChase, RateGyro, Xentha\r"},stats:{plays:0,downloads:0,upvotes:758,downvotes:3,score:.9844},uploaded:"2025-09-05T19:09:19.619055Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"3a2a0fead6eb8a8ab325aa54efdfb84bd4220375",state:"Published",createdAt:"2025-09-06T02:29:05.366Z",sageScore:4,diffs:[{njs:12,offset:0,notes:107,bombs:0,obstacles:0,nps:1.304,length:279,characteristic:"Standard",difficulty:"Hard",events:0,chroma:!0,me:!1,ne:!0,cinema:!1,vivify:!0,seconds:82.059,paritySummary:{errors:0,warns:0,resets:0},maxScore:91195,label:"Basic Bloqs",environment:"GagaEnvironment"},{njs:15,offset:-1.625,notes:149,bombs:0,obstacles:0,nps:1.816,length:279,characteristic:"Standard",difficulty:"Expert",events:0,chroma:!0,me:!1,ne:!0,cinema:!1,vivify:!0,seconds:82.059,paritySummary:{errors:0,warns:0,resets:0},maxScore:129835,label:"Bloqs",environment:"GagaEnvironment"},{njs:15,offset:-1.625,notes:714,bombs:0,obstacles:0,nps:8.701,length:279,characteristic:"Standard",difficulty:"ExpertPlus",events:0,chroma:!0,me:!1,ne:!0,cinema:!1,vivify:!0,seconds:82.059,paritySummary:{errors:0,warns:0,resets:0},maxScore:649635,label:"Poodles",environment:"GagaEnvironment"},{njs:15,offset:-1.625,notes:131,bombs:0,obstacles:0,nps:1.591,length:279.937,characteristic:"OneSaber",difficulty:"Expert",events:0,chroma:!0,me:!1,ne:!0,cinema:!1,vivify:!0,seconds:82.334,paritySummary:{errors:0,warns:0,resets:0},maxScore:113275,label:"Bloqs",environment:"GagaEnvironment"},{njs:15,offset:-1.625,notes:612,bombs:0,obstacles:0,nps:7.433,length:279.937,characteristic:"OneSaber",difficulty:"ExpertPlus",events:0,chroma:!0,me:!1,ne:!0,cinema:!1,vivify:!0,seconds:82.334,paritySummary:{errors:0,warns:0,resets:0},maxScore:555795,label:"Poodles",environment:"GagaEnvironment"},{njs:15,offset:-1.625,notes:0,bombs:0,obstacles:0,nps:0,length:0,characteristic:"Lightshow",difficulty:"ExpertPlus",events:0,chroma:!0,me:!1,ne:!0,cinema:!1,vivify:!0,seconds:0,paritySummary:{errors:0,warns:0,resets:0},maxScore:0,label:"Just Viv",environment:"GagaEnvironment"},{njs:12,offset:0,notes:111,bombs:0,obstacles:473,nps:1.343,length:281,characteristic:"Lawless",difficulty:"Easy",events:7,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:82.647,paritySummary:{errors:0,warns:0,resets:0},maxScore:94875,label:"Basic Bloqs",environment:"GagaEnvironment"},{njs:15,offset:-1.625,notes:130,bombs:0,obstacles:473,nps:1.584,length:279,characteristic:"Lawless",difficulty:"Normal",events:7,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:82.059,paritySummary:{errors:0,warns:0,resets:0},maxScore:112355,label:"One Saber Bloqs",environment:"GagaEnvironment"},{njs:15,offset:-1.625,notes:153,bombs:0,obstacles:473,nps:1.851,length:281,characteristic:"Lawless",difficulty:"Hard",events:7,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:82.647,paritySummary:{errors:0,warns:0,resets:0},maxScore:133515,label:"Bloqs",environment:"GagaEnvironment"},{njs:15,offset:-1.625,notes:611,bombs:0,obstacles:473,nps:7.446,length:279,characteristic:"Lawless",difficulty:"Expert",events:7,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:82.059,paritySummary:{errors:0,warns:0,resets:0},maxScore:554875,label:"One Saber Poodles",environment:"GagaEnvironment"},{njs:15,offset:-1.625,notes:734,bombs:0,obstacles:473,nps:8.859,length:281.688,characteristic:"Lawless",difficulty:"ExpertPlus",events:7,chroma:!1,me:!1,ne:!0,cinema:!1,seconds:82.849,paritySummary:{errors:0,warns:0,resets:0},maxScore:668035,label:"Poodles",environment:"GagaEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/3a2a0fead6eb8a8ab325aa54efdfb84bd4220375.zip",coverURL:"https://eu.cdn.beatsaver.com/3a2a0fead6eb8a8ab325aa54efdfb84bd4220375.jpg",previewURL:"https://eu.cdn.beatsaver.com/3a2a0fead6eb8a8ab325aa54efdfb84bd4220375.mp3"}],createdAt:"2025-09-05T18:27:26.937639Z",updatedAt:"2025-09-30T15:48:59.259473Z",lastPublishedAt:"2025-09-06T02:29:10.640787Z",tags:["video-game-soundtrack","balanced","poodle"],bookmarked:!1,collaborators:[{id:103109,name:"Xentha",avatar:"https://cdn.beatsaver.com/avatar/da02df6ec7f6d28e226510b3f8ecb786d24634ca.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,playlistUrl:"https://api.beatsaver.com/users/id/103109/playlist"},{id:4280701,name:"rategyro",hash:"605e50f0cd73ba00060a45e3",avatar:"https://cdn.beatsaver.com/avatar/06d29645455d6652940b240658617d968fc53d91.png",type:"DISCORD",admin:!0,curator:!0,seniorCurator:!0,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4280701/playlist"}],declaredAi:"None",blRanked:!1,blQualified:!1},{id:"14d64",name:"Try - MitiS Feat. RORY",description:"Twenty-Sixth Upload\n\nThis map means the whole world to me, so I hope everyone enjoys this map. My father passed away on Jan. 23, 2021, in the middle of making this map. I am dedicating this map for him because of how much this songs means to me now. \nPouring my heart and soul into this map took a lot out of me, making it as perfect to my little abilities I have for mapping.\n\nBig shout outs to Lonely and Jamman for lighting this beautiful song and for agreeing to light it, it means the world to me.\nBig shout outs to thelightdesigner for making such amazing and beautiful walls. Thank you for taking the time to make this, it means the world to me.\nBig shout outs to Mawntee for giving me advice on how to make this map feel and shout outs to thelitlewiseowl for modding it, showing me what I can improve in this map. \nBiggest shout outs to everyone that play tested it multiple times. I am sorry for bugging them for multiple play test. \n\nAnd Biggest shoutout to my favorite chillstep/melodic dubstep artist, MitiS and Rory for making this beautiful song. \nYou have no idea how much this song means to me, I thank you so much. Keep up the good work MitiS.\n\n**NOODLES AND CHROMA REQUIRED**\n\nI hope this map can show you the feeling in this song, as well as what it portrays. I tried my best, I hope it turns out great and everyone enjoys it. \nThank you everyone for taking the time to download and play this map. I appreciate it everyone.\n\nFeedback is always welcome!",uploader:{id:4285346,name:"remie",hash:"5f6efd989824150006d740ac",avatar:"https://cdn.beatsaver.com/avatar/736cde47222d5d00f4affea115772681d0e070eb.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,playlistUrl:"https://api.beatsaver.com/users/id/4285346/playlist"},metadata:{bpm:132,duration:273,songName:"Try",songSubName:"",songAuthorName:"MitiS Feat. RORY",levelAuthorName:"Remie & Lone"},stats:{plays:0,downloads:0,upvotes:7683,downvotes:102,score:.9843,reviews:36,sentiment:"VERY_POSITIVE"},uploaded:"2021-03-01T13:29:26.471Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"6db3d9da217b41607d250aa7a28c5dc26a082188",key:"14d64",state:"Published",createdAt:"2021-03-01T13:29:26.471Z",sageScore:3,diffs:[{njs:17,offset:-.7,notes:1447,bombs:21,obstacles:77,nps:6.217,length:512.083,characteristic:"Standard",difficulty:"ExpertPlus",events:36825,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:232.765,paritySummary:{errors:0,warns:0,resets:2},maxScore:1323995,label:"EXPERT+",environment:"OriginsEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/6db3d9da217b41607d250aa7a28c5dc26a082188.zip",coverURL:"https://eu.cdn.beatsaver.com/6db3d9da217b41607d250aa7a28c5dc26a082188.jpg",previewURL:"https://eu.cdn.beatsaver.com/6db3d9da217b41607d250aa7a28c5dc26a082188.mp3"}],curator:{id:2381,name:"bearly",hash:"5ea9efbf16c968000636dba4",avatar:"https://cdn.beatsaver.com/avatar/2381.jpg",type:"SIMPLE",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/2381/playlist"},curatedAt:"2021-03-01T13:29:26.471Z",createdAt:"2021-03-01T13:29:26.471Z",updatedAt:"2021-03-01T13:29:26.471Z",lastPublishedAt:"2021-03-01T13:29:26.471Z",tags:["balanced"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"27a13",name:"Jimmy Eat World - The Middle [Arcs][V3 Lights]",description:" - everything'll be alright, alright? \n\nYes, @Bytrius already has a great map of this song in the 2000's Rock Pack (check it out here https://beatsaver.com/maps/157fa) but I thought I'd try it with my own arc map style and provide some lower difficulties as well. \n\nGameplay video by @onespookyboi: https://youtu.be/SjiqMsMkFuU\nLIghtshow: https://streamable.com/zhomzm\n\nThank you testers!\n@maybeemae\n@swukpuff\n@onespookyboi\n@namaki_mono\nFlaemmchenFlame - https://www.twitch.tv/flaemmchenflame\n",uploader:{id:4321171,name:"tetsubeats",avatar:"https://cdn.beatsaver.com/avatar/532b0f3d23e1e795c5e1404c4a807c0dfbe1adf2.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4321171/playlist"},metadata:{bpm:162.2,duration:169,songName:"The Middle",songSubName:"",songAuthorName:"Jimmy Eat World",levelAuthorName:"TetsuBeats"},stats:{plays:0,downloads:0,upvotes:3397,downvotes:39,score:.9842,reviews:1},uploaded:"2022-07-10T05:30:32.964512Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"4b980371b6005cc176aed1b402bd104af56c31a3",state:"Published",createdAt:"2022-07-10T04:29:32.041843Z",sageScore:5,diffs:[{njs:10,offset:-1.1,notes:320,bombs:0,obstacles:0,nps:1.951,length:443.5,characteristic:"Standard",difficulty:"Easy",events:460,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:164.057,paritySummary:{errors:0,warns:0,resets:0},maxScore:287155,environment:"PyroEnvironment"},{njs:12,offset:-1.5,notes:528,bombs:0,obstacles:0,nps:3.218,length:443.5,characteristic:"Standard",difficulty:"Normal",events:460,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:164.057,paritySummary:{errors:0,warns:0,resets:0},maxScore:478515,environment:"PyroEnvironment"},{njs:14,offset:.1,notes:629,bombs:0,obstacles:0,nps:3.834,length:443.5,characteristic:"Standard",difficulty:"Hard",events:460,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:164.057,paritySummary:{errors:0,warns:0,resets:0},maxScore:571435,environment:"PyroEnvironment"},{njs:16.5,offset:-.1,notes:758,bombs:0,obstacles:0,nps:4.62,length:443.5,characteristic:"Standard",difficulty:"Expert",events:460,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:164.057,paritySummary:{errors:0,warns:0,resets:0},maxScore:690115,environment:"PyroEnvironment"},{njs:17.5,offset:-.3,notes:826,bombs:0,obstacles:0,nps:5.035,length:443.5,characteristic:"Standard",difficulty:"ExpertPlus",events:460,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:164.057,paritySummary:{errors:0,warns:0,resets:0},maxScore:752675,environment:"PyroEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/4b980371b6005cc176aed1b402bd104af56c31a3.zip",coverURL:"https://eu.cdn.beatsaver.com/4b980371b6005cc176aed1b402bd104af56c31a3.jpg",previewURL:"https://eu.cdn.beatsaver.com/4b980371b6005cc176aed1b402bd104af56c31a3.mp3"}],curator:{id:32269,name:"maybeemae",hash:"5e1123516d774b0006a953ec",avatar:"https://cdn.beatsaver.com/avatar/d2119e1ff402b2cd380caf8b074d3f7c037f0ec2.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/32269/playlist"},curatedAt:"2022-07-10T05:52:53.577094Z",createdAt:"2022-07-10T04:29:32.041843Z",updatedAt:"2022-07-10T14:14:52.319313Z",lastPublishedAt:"2022-07-10T05:30:32.964512Z",tags:["dance-style","balanced","rock","pop"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"271dc",name:"[Electro Swing Pack Vol. 2] Swingrowers - Butterfly (Wolfgang Lohr Remix)",description:"Electro Swing Pack Volume 2: Electric Boogaloo!\n\nFor the anniversary of my first pack, I am making a sequel.\n10 Electro Swing songs, 3 difficulties each + custom vanilla lights!\n\nGet the pack here:\nhttps://bsaber.com/electro-swing-pack-2/\nhttps://beatsaver.com/playlists/6572\n\nPreview this map:\nhttps://youtu.be/91zWh1dLLV4\n\nPack Preview Playlist:\nhttps://youtube.com/playlist?list=PLrVm0whzsGKL5NYTUIEzDyITjl6WuLSJ4\n\n\nThank you to all the Playtesters!\nAlice, MaybeeMae, Pixelguy, Raaknys, Namaki Mono, DeeDee, and WolfieBeat ❤️\n\n\nMore Maps: https://beatsaver.com/profile/4286374\nDiscord: Nixie.Korten#6944\nJoin My Server: https://discord.gg/RjxPpZtH7w\nTwitter: https://twitter.com/Nixie_Korten\nInstagram: https://www.instagram.com/nixie.korten/",uploader:{id:4286374,name:"Nixie.Korten",hash:"6096752e12772e0006e2f7e6",avatar:"https://cdn.beatsaver.com/avatar/bb97db2b49d21f5cbc1a5ba50742fa0e5c86ed3c.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4286374/playlist"},metadata:{bpm:126,duration:189,songName:"Butterfly",songSubName:"(Wolfgang Lohr Remix)",songAuthorName:"Swingrowers",levelAuthorName:"Nixie.Korten"},stats:{plays:0,downloads:0,upvotes:1900,downvotes:18,score:.9842},uploaded:"2022-07-08T13:00:00.564Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"8a1f9c4ddd15a7c1ab69769542c9409ce630aaa7",state:"Published",createdAt:"2022-06-25T18:10:24.485756Z",sageScore:5,diffs:[{njs:14,offset:0,notes:522,bombs:0,obstacles:9,nps:2.818,length:389,characteristic:"Standard",difficulty:"Hard",events:2570,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:185.238,paritySummary:{errors:0,warns:0,resets:0},maxScore:472995,environment:"PanicEnvironment"},{njs:16,offset:-.5,notes:752,bombs:0,obstacles:9,nps:4.06,length:389,characteristic:"Standard",difficulty:"Expert",events:2570,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:185.238,paritySummary:{errors:0,warns:0,resets:0},maxScore:684595,environment:"PanicEnvironment"},{njs:19,offset:.25,notes:903,bombs:0,obstacles:9,nps:4.875,length:389,characteristic:"Standard",difficulty:"ExpertPlus",events:2570,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:185.238,paritySummary:{errors:0,warns:0,resets:0},maxScore:823515,environment:"PanicEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/8a1f9c4ddd15a7c1ab69769542c9409ce630aaa7.zip",coverURL:"https://eu.cdn.beatsaver.com/8a1f9c4ddd15a7c1ab69769542c9409ce630aaa7.jpg",previewURL:"https://eu.cdn.beatsaver.com/8a1f9c4ddd15a7c1ab69769542c9409ce630aaa7.mp3"}],curator:{id:4284746,name:"Dee-Dee",avatar:"https://cdn.beatsaver.com/avatar/3853d99b74fe4eb9a3954df5946123f67a95da3d.png",type:"DISCORD",admin:!1,curator:!0,seniorCurator:!0,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4284746/playlist"},curatedAt:"2022-07-09T12:03:07.374428Z",createdAt:"2022-06-25T18:10:24.485756Z",updatedAt:"2024-11-09T20:31:57.830788Z",lastPublishedAt:"2022-07-08T13:00:00.559037Z",tags:["balanced","electronic","swing","dance-style"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"39624",name:"[Chroma] DNCE - Cake By The Ocean",description:"[Explicit Lyrics]\n[Flashing Lights Warning]\n\nMy first full spread map!\n\nJan 28th 2024: Reupload with fixed lighting\n-----------------------------------------------------\nSong: Cake By The Ocean by DNCE\nhttps://www.youtube.com/watch?v=vWaRiD5ym74\n\nMap Preview (Expert+):\nhttps://www.youtube.com/watch?v=UZyrFB9vKDo\n-----------------------------------------------------\nThank you to @Noveliniel for playtesting this map.\n-----------------------------------------------------\nMessage wunkoo on Discord for any feedback (must be in the BeastSaber discord).\nOr just leave a BeatSaver review",uploader:{id:4302396,name:"Koreami",avatar:"https://cdn.beatsaver.com/avatar/f5542fc9f09f21504d7e82a61b06d494389ba3d3.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,playlistUrl:"https://api.beatsaver.com/users/id/4302396/playlist"},metadata:{bpm:119,duration:221,songName:"Cake By The Ocean",songSubName:"",songAuthorName:"DNCE",levelAuthorName:"Koreami"},stats:{plays:0,downloads:0,upvotes:2819,downvotes:31,score:.9841,reviews:3},uploaded:"2024-01-27T19:00:00.269841Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"2cb2f496ef6e33a09a56d301923ade73b9a53c3d",state:"Published",createdAt:"2024-01-28T18:55:36.350370Z",sageScore:5,diffs:[{njs:12,offset:-.1,notes:431,bombs:6,obstacles:37,nps:2.021,length:423,characteristic:"Standard",difficulty:"Easy",events:2073,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:213.277,paritySummary:{errors:0,warns:0,resets:0},maxScore:389275,label:"Puddle",environment:"DragonsEnvironment"},{njs:12,offset:-.2,notes:554,bombs:0,obstacles:21,nps:2.598,length:423,characteristic:"Standard",difficulty:"Normal",events:2073,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:213.277,paritySummary:{errors:0,warns:0,resets:0},maxScore:502515,label:"Pond",environment:"DragonsEnvironment"},{njs:13,offset:-.25,notes:677,bombs:0,obstacles:31,nps:3.174,length:423,characteristic:"Standard",difficulty:"Hard",events:2073,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:213.277,paritySummary:{errors:0,warns:0,resets:0},maxScore:615595,label:"Lake",environment:"DragonsEnvironment"},{njs:16,offset:-.7,notes:800,bombs:0,obstacles:33,nps:3.751,length:423,characteristic:"Standard",difficulty:"Expert",events:2073,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:213.277,paritySummary:{errors:0,warns:0,resets:0},maxScore:728755,label:"Sea",environment:"DragonsEnvironment"},{njs:16,offset:-.7,notes:971,bombs:4,obstacles:41,nps:4.553,length:423,characteristic:"Standard",difficulty:"ExpertPlus",events:2073,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:213.277,paritySummary:{errors:0,warns:0,resets:0},maxScore:886075,label:"Ocean",environment:"DragonsEnvironment"},{njs:16,offset:0,notes:0,bombs:0,obstacles:0,nps:0,length:0,characteristic:"Lightshow",difficulty:"Normal",events:2073,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:0,paritySummary:{errors:0,warns:0,resets:0},maxScore:0,label:"Fluorescent Coral",environment:"DragonsEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/2cb2f496ef6e33a09a56d301923ade73b9a53c3d.zip",coverURL:"https://eu.cdn.beatsaver.com/2cb2f496ef6e33a09a56d301923ade73b9a53c3d.jpg",previewURL:"https://eu.cdn.beatsaver.com/2cb2f496ef6e33a09a56d301923ade73b9a53c3d.mp3"}],curator:{id:169636,name:"Duffelsalat",avatar:"https://cdn.beatsaver.com/avatar/42f17c520f53b67cf400a66f65e49038263042de.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/169636/playlist"},curatedAt:"2024-01-28T15:09:46.809093Z",createdAt:"2024-01-27T18:49:42.362618Z",updatedAt:"2025-05-27T05:59:37.010902Z",lastPublishedAt:"2024-01-28T18:55:43.801969Z",tags:["accuracy","balanced","pop","dance"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"9a0c",name:"Thnks fr th Mmrs - Fall Out Boy",description:"Thnks fr th Mmrs (or Thanks for the Memories) from Fall Out Boy.\nSo far the map that I have put the most work into (and which probably made me age by 3 years). Hope you enjoy it!\n\nThe map has Chroma lighting but can also be played without the Chroma mod.\nExpert+ contains single saber sections and polyrhythm parts. Just so you are warned ;)\n\nBig thanks to Sorukun for playtesting this map and especially to Timeweaver for pointing out all issues it had during its creation!",uploader:{id:21367,name:"hamsta",hash:"5de27451fffaa600066f2842",avatar:"https://www.gravatar.com/avatar/36e8d99105e1e9c1d2173853194691e2b2d5c0552b6e96bfd7a2fd8108310685?d=retro",type:"SIMPLE",admin:!1,curator:!1,seniorCurator:!1,playlistUrl:"https://api.beatsaver.com/users/id/21367/playlist"},metadata:{bpm:154.791,duration:198,songName:"Thnks fr th Mmrs",songSubName:"",songAuthorName:"Fall Out Boy",levelAuthorName:"Hamsta"},stats:{plays:0,downloads:0,upvotes:10577,downvotes:148,score:.984,reviews:2},uploaded:"2020-04-12T09:50:46.516Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"0e8ef3006db854c67f04fe72322bccea410f69ee",key:"9a0c",state:"Published",createdAt:"2020-04-12T09:50:46.516Z",sageScore:5,diffs:[{njs:14,offset:0,notes:580,bombs:0,obstacles:51,nps:3.092,length:484,characteristic:"Standard",difficulty:"Hard",events:2597,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:187.355,paritySummary:{errors:0,warns:0,resets:0},maxScore:526355,environment:"PanicEnvironment"},{njs:14,offset:0,notes:637,bombs:0,obstacles:51,nps:3.395,length:484,characteristic:"Standard",difficulty:"Expert",events:2597,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:187.355,paritySummary:{errors:0,warns:0,resets:0},maxScore:578795,environment:"PanicEnvironment"},{njs:16,offset:0,notes:844,bombs:0,obstacles:39,nps:4.499,length:484,characteristic:"Standard",difficulty:"ExpertPlus",events:2597,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:187.355,paritySummary:{errors:1,warns:2,resets:0},maxScore:769235,environment:"PanicEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/0e8ef3006db854c67f04fe72322bccea410f69ee.zip",coverURL:"https://eu.cdn.beatsaver.com/0e8ef3006db854c67f04fe72322bccea410f69ee.jpg",previewURL:"https://eu.cdn.beatsaver.com/0e8ef3006db854c67f04fe72322bccea410f69ee.mp3"}],curator:{id:4299228,name:"tan",avatar:"https://cdn.beatsaver.com/avatar/19d0c285757c0eea70e922961581953cfd96769b.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/4299228/playlist"},curatedAt:"2020-04-12T09:50:46.516Z",createdAt:"2020-04-12T09:50:46.516Z",updatedAt:"2020-04-12T09:50:46.516Z",lastPublishedAt:"2020-04-12T09:50:46.516Z",tags:["pop","dance-style"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"11b7a",name:"Still Alive - Portal",description:"I've wanted to map this song for a while now. And since this one's probably the last Portal song I'll map, I gave it my best. \r\n\r\nP.S. - I'm so glad to be back mapping this month. I had to take a break due to overwhelming stress, but now I'm feeling ready again.\r\nI hope you enjoy.\r\n\r\nPortal on Steam:\r\nhttps://store.steampowered.com/app/400/Portal/",uploader:{id:4284694,name:"Jokidum",hash:"5e15518d47f1600006e912cc",avatar:"https://cdn.beatsaver.com/avatar/da6133c71c7c84b75622f59dd2fce215f8c444f3.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,playlistUrl:"https://api.beatsaver.com/users/id/4284694/playlist"},metadata:{bpm:120,duration:176,songName:"Still Alive",songSubName:"- Portal",songAuthorName:"Jonathan Coulton",levelAuthorName:"Jokidum"},stats:{plays:0,downloads:0,upvotes:6908,downvotes:92,score:.984,reviews:2},uploaded:"2020-12-04T20:30:44.132Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"8c03b43484b0dd1fc7d8a3104a82f0992a001c6c",key:"11b7a",state:"Published",createdAt:"2020-12-04T20:30:44.132Z",sageScore:4,diffs:[{njs:12,offset:0,notes:490,bombs:0,obstacles:13,nps:2.853,length:343.5,characteristic:"Standard",difficulty:"Expert",events:1060,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:171.75,paritySummary:{errors:0,warns:0,resets:0},maxScore:443555,environment:"TriangleEnvironment"},{njs:16,offset:0,notes:0,bombs:0,obstacles:0,nps:0,length:0,characteristic:"Lightshow",difficulty:"Easy",events:1060,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:0,paritySummary:{errors:0,warns:0,resets:0},maxScore:0,label:"Lightshow",environment:"TriangleEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/8c03b43484b0dd1fc7d8a3104a82f0992a001c6c.zip",coverURL:"https://eu.cdn.beatsaver.com/8c03b43484b0dd1fc7d8a3104a82f0992a001c6c.jpg",previewURL:"https://eu.cdn.beatsaver.com/8c03b43484b0dd1fc7d8a3104a82f0992a001c6c.mp3"}],createdAt:"2020-12-04T20:30:44.132Z",updatedAt:"2020-12-04T20:30:44.132Z",lastPublishedAt:"2020-12-04T20:30:44.132Z",bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"24227",name:"DADDY! DADDY! DO! (TV Size) (2022 Remaster) [Kaguya-sama: Love Is War Season 2 Opening] - Masayuki Suzuki ft. Airi Suzuki ",description:"Just a small remaster of my old daddy daddy do map from 2020, fixed a few parity errors and updated the NJS. There's also 2 additional down maps now. \n\nThanks to https://twitter.com/WicKedBassline for the special request!\n\nDADDY! DADDY! DO! is opening theme for the second season of the Kaguya-sama: Love Is War anime adaptation.\n\nKeep up to date on my maps: https://twitter.com/Joetastic_\nMy mapper's profile: https://bsaber.com/members/joetastic/\nContact me on discord: @Joetastic#2501",uploader:{id:58338,name:"Joetastic",hash:"5cff0b7498cc5a672c85050e",avatar:"https://cdn.beatsaver.com/avatar/91bb7b0510cea647179bc95e032f8a25608b09f1.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/58338/playlist"},metadata:{bpm:138,duration:91,songName:"DADDY! DADDY! DO! (TV Size) (2022 Remaster)",songSubName:"ft. Airi Suzuki",songAuthorName:"Masayuki Suzuki",levelAuthorName:"Joetastic"},stats:{plays:0,downloads:0,upvotes:3282,downvotes:38,score:.984,reviews:1},uploaded:"2022-04-09T06:56:40.572610Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"9eb5c6cc6e55bc17ee7833a5e8b67f8793a3ed17",state:"Published",createdAt:"2022-04-09T06:56:26.910837Z",sageScore:4,diffs:[{njs:12,offset:0,notes:205,bombs:4,obstacles:23,nps:2.352,length:200.5,characteristic:"Standard",difficulty:"Hard",events:1053,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:87.174,paritySummary:{errors:0,warns:0,resets:0},maxScore:181355,environment:"PanicEnvironment"},{njs:15,offset:-.3,notes:306,bombs:4,obstacles:23,nps:3.51,length:200.5,characteristic:"Standard",difficulty:"Expert",events:1053,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:87.174,paritySummary:{errors:0,warns:0,resets:0},maxScore:274275,environment:"PanicEnvironment"},{njs:18,offset:-.6,notes:381,bombs:0,obstacles:23,nps:4.371,length:200.5,characteristic:"Standard",difficulty:"ExpertPlus",events:1053,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:87.174,paritySummary:{errors:0,warns:0,resets:0},maxScore:343275,environment:"PanicEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/9eb5c6cc6e55bc17ee7833a5e8b67f8793a3ed17.zip",coverURL:"https://eu.cdn.beatsaver.com/9eb5c6cc6e55bc17ee7833a5e8b67f8793a3ed17.jpg",previewURL:"https://eu.cdn.beatsaver.com/9eb5c6cc6e55bc17ee7833a5e8b67f8793a3ed17.mp3"}],curator:{id:4285122,name:"Lasso-Catsidy",avatar:"https://cdn.beatsaver.com/avatar/1daf0e4ecc153a86d14ec7913800a38fd0f0187d.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/4285122/playlist"},curatedAt:"2022-04-11T06:44:59.068414Z",createdAt:"2022-04-09T06:56:26.910837Z",updatedAt:"2022-04-11T06:44:59.068414Z",lastPublishedAt:"2022-04-09T06:56:40.572610Z",tags:["dance-style","anime","j-pop"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"291b9",name:"BLOODY STREAM (TV Size) (2022 Remaster) [JoJo's Bizarre Adventure 2nd Opening] - Coda",description:'---------Map uses the new 1.20 Note mechanics (eg: arc and chains) and won\'t work on any versions of Beat Saber below 1.20---------\n\nThanks to https://twitter.com/EuclaseW for the special request!\n\nThis map is a remap of my old Bloody Stream map. Changes include:\n- Parity fixes\n- Additional difficulties\n- Custom colors!\n- Addition of Arcs and Chains!\n\n"BLOODY STREAM" is the second opening of the JoJo\'s Bizarre Adventure by Japanese musician Kazuso Oda under the stage name "Coda".\n\nKeep up to date on my maps: https://twitter.com/Joetastic_\nMy mapper\'s profile: https://bsaber.com/members/joetastic/\nContact me on discord: @Joetastic#2501',uploader:{id:58338,name:"Joetastic",hash:"5cff0b7498cc5a672c85050e",avatar:"https://cdn.beatsaver.com/avatar/91bb7b0510cea647179bc95e032f8a25608b09f1.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/58338/playlist"},metadata:{bpm:132,duration:93,songName:"BLOODY STREAM (TV Size) (2022 Remaster)",songSubName:"",songAuthorName:"Coda",levelAuthorName:"Joetastic"},stats:{plays:0,downloads:0,upvotes:4309,downvotes:54,score:.9838},uploaded:"2022-08-21T14:25:59.776857Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"2c6a5186b7e3f4a3b453065ee8ad042d72947102",state:"Published",createdAt:"2022-08-21T14:25:52.329353Z",sageScore:2,diffs:[{njs:12,offset:0,notes:326,bombs:29,obstacles:16,nps:3.659,length:196,characteristic:"Standard",difficulty:"Hard",events:1780,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:89.091,paritySummary:{errors:0,warns:0,resets:0},maxScore:292915,environment:"BigMirrorEnvironment"},{njs:15,offset:-.3,notes:446,bombs:18,obstacles:13,nps:5.006,length:196,characteristic:"Standard",difficulty:"Expert",events:1780,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:89.091,paritySummary:{errors:0,warns:0,resets:0},maxScore:403315,environment:"BigMirrorEnvironment"},{njs:18,offset:-.6,notes:561,bombs:22,obstacles:15,nps:6.297,length:196,characteristic:"Standard",difficulty:"ExpertPlus",events:1780,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:89.091,paritySummary:{errors:0,warns:0,resets:0},maxScore:510715,environment:"BigMirrorEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/2c6a5186b7e3f4a3b453065ee8ad042d72947102.zip",coverURL:"https://eu.cdn.beatsaver.com/2c6a5186b7e3f4a3b453065ee8ad042d72947102.jpg",previewURL:"https://eu.cdn.beatsaver.com/2c6a5186b7e3f4a3b453065ee8ad042d72947102.mp3"}],curator:{id:4285122,name:"Lasso-Catsidy",avatar:"https://cdn.beatsaver.com/avatar/1daf0e4ecc153a86d14ec7913800a38fd0f0187d.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/4285122/playlist"},curatedAt:"2022-09-09T02:00:15.130726Z",createdAt:"2022-08-21T14:25:52.329353Z",updatedAt:"2022-09-09T02:00:15.130726Z",lastPublishedAt:"2022-08-21T14:25:59.776857Z",tags:["dance-style","anime","j-pop","balanced"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"2ab5b",name:"Handclap - fitz and the tantrums",description:"twitch : https://www.twitch.tv/emiru_milk\ntwitter : https://twitter.com/EmirTart\ndiscord : https://discord.gg/DHwuND8K7K\nEmiru#9999",uploader:{id:4284894,name:"emiru",hash:"5d3dac6586729100069260cc",avatar:"https://cdn.beatsaver.com/avatar/59d2538aa7b938cbd28629073dc6d9be2357bee9.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4284894/playlist"},metadata:{bpm:139.867,duration:196,songName:"Handclap",songSubName:"",songAuthorName:"Fitz and the Tantrums",levelAuthorName:"Emir"},stats:{plays:0,downloads:0,upvotes:5631,downvotes:75,score:.9836,reviews:3},uploaded:"2022-10-08T08:58:23.778044Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"3da135c11207f5f4f2dfe7b18a6416931f66936e",state:"Published",createdAt:"2022-10-08T09:11:55.226599Z",sageScore:3,diffs:[{njs:16,offset:0,notes:196,bombs:0,obstacles:58,nps:1.078,length:423.891,characteristic:"Standard",difficulty:"Easy",events:5218,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:181.841,paritySummary:{errors:0,warns:0,resets:0},maxScore:173075,environment:"FitBeatEnvironment"},{njs:13,offset:.152,notes:302,bombs:0,obstacles:66,nps:1.655,length:425.39,characteristic:"Standard",difficulty:"Normal",events:5218,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:182.483,paritySummary:{errors:0,warns:0,resets:0},maxScore:270595,environment:"FitBeatEnvironment"},{njs:14,offset:-.168,notes:546,bombs:0,obstacles:184,nps:2.992,length:425.39,characteristic:"Standard",difficulty:"Hard",events:5221,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:182.483,paritySummary:{errors:0,warns:0,resets:0},maxScore:495075,environment:"FitBeatEnvironment"},{njs:15,offset:-.368,notes:739,bombs:0,obstacles:130,nps:3.894,length:442.374,characteristic:"Standard",difficulty:"Expert",events:5218,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:189.769,paritySummary:{errors:0,warns:0,resets:0},maxScore:672635,environment:"FitBeatEnvironment"},{njs:16,offset:-.543,notes:925,bombs:8,obstacles:315,nps:5.057,length:426.389,characteristic:"Standard",difficulty:"ExpertPlus",events:4390,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:182.912,paritySummary:{errors:0,warns:0,resets:8},maxScore:843755,environment:"FitBeatEnvironment"},{njs:12,offset:.526,notes:350,bombs:0,obstacles:34,nps:1.844,length:442.374,characteristic:"Lawless",difficulty:"Easy",events:5219,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:189.769,paritySummary:{errors:43,warns:22,resets:0},maxScore:314755,label:"Lawless Tutorial",environment:"FitBeatEnvironment"},{njs:13,offset:.152,notes:657,bombs:0,obstacles:2,nps:3.462,length:442.374,characteristic:"Lawless",difficulty:"Normal",events:5219,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:189.769,paritySummary:{errors:623,warns:0,resets:0},maxScore:597195,label:"Down Notes",environment:"FitBeatEnvironment"},{njs:14,offset:-.002,notes:670,bombs:0,obstacles:2,nps:3.531,length:442.374,characteristic:"Lawless",difficulty:"Hard",events:5219,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:189.769,paritySummary:{errors:635,warns:16,resets:0},maxScore:609155,label:"Up Notes",environment:"FitBeatEnvironment"},{njs:15,offset:-.29,notes:1050,bombs:0,obstacles:2,nps:5.533,length:442.374,characteristic:"Lawless",difficulty:"Expert",events:5218,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:189.769,paritySummary:{errors:0,warns:78,resets:0},maxScore:958755,label:"90°Directions",environment:"FitBeatEnvironment"},{njs:16,offset:-.543,notes:1260,bombs:0,obstacles:246,nps:6.625,length:443.373,characteristic:"Lawless",difficulty:"ExpertPlus",events:5218,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:190.198,paritySummary:{errors:0,warns:6,resets:0},maxScore:1151955,label:"Dodge Walls",environment:"FitBeatEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/3da135c11207f5f4f2dfe7b18a6416931f66936e.zip",coverURL:"https://eu.cdn.beatsaver.com/3da135c11207f5f4f2dfe7b18a6416931f66936e.jpg",previewURL:"https://eu.cdn.beatsaver.com/3da135c11207f5f4f2dfe7b18a6416931f66936e.mp3"}],curator:{id:58338,name:"Joetastic",hash:"5cff0b7498cc5a672c85050e",avatar:"https://cdn.beatsaver.com/avatar/91bb7b0510cea647179bc95e032f8a25608b09f1.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/58338/playlist"},curatedAt:"2022-10-08T09:19:15.538197Z",createdAt:"2022-10-08T08:57:08.316867Z",updatedAt:"2022-10-08T09:19:15.538197Z",lastPublishedAt:"2022-10-08T09:12:01.774147Z",tags:["dance-style","balanced","rock","pop"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"212cf",name:"Someone Else's Hat - David Maxim Micic (modchart)",description:"David Maxim Micic is a prog rock genius. I wish I had the courage to map the 8 minutes of Mbinguni Amina but a few minutes of Someone Else's Hat will have to do. I really encourage you to check his stuff, because it's so good: https://open.spotify.com/artist/0wQa1N4q3HmLwxqkpVcYhs?si=aB4m1yonTg2qk5ounpOEUw\n\nThis modchart was an opportunity for me to have fun with environment animations, and push animations to a new level. The first scene is based on the album cover that Yelka made for Who Bit the Moon, and the rest is random ideas that I thought would be cool with this music.\n\nHuge thanks to the playtesters and in particular Mawntee and Aggrogahu, who took time to give detailed feedback. I appreciate.\n\nPreview: https://youtu.be/RX-payaVsKU\n\nThe map should work on Quest too, though it won't look as good due to the difference in how walls look.\n\nIf you like what I create, tell me, I love to hear from you:\n- YouTube: https://youtube.com/c/nyri0\n- Twitter: https://twitter.com/nyri0z\n- Ko-Fi: https://ko-fi.com/nyri0",uploader:{id:4288814,name:"nyri0",hash:"5e792df416c9680006086a78",avatar:"https://cdn.beatsaver.com/avatar/233323d456510756fbbc0140c1a0698caf8b096c.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,playlistUrl:"https://api.beatsaver.com/users/id/4288814/playlist"},metadata:{bpm:130,duration:207,songName:"Someone Else's Hat",songSubName:"",songAuthorName:"David Maxim Micic",levelAuthorName:"nyri0"},stats:{plays:0,downloads:0,upvotes:3304,downvotes:40,score:.9835,reviews:3},uploaded:"2022-02-04T23:50:20.027446Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"3662e733501d7a77850c20f0fcea792ed2187943",state:"Published",createdAt:"2022-02-04T23:05:01.786046Z",sageScore:1,diffs:[{njs:16,offset:0,notes:465,bombs:12,obstacles:1460,nps:2.38,length:423.333,characteristic:"Standard",difficulty:"Expert",events:875,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:195.385,paritySummary:{errors:83,warns:0,resets:0},maxScore:420555,label:"haut-de-forme",environment:"BTSEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/3662e733501d7a77850c20f0fcea792ed2187943.zip",coverURL:"https://eu.cdn.beatsaver.com/3662e733501d7a77850c20f0fcea792ed2187943.jpg",previewURL:"https://eu.cdn.beatsaver.com/3662e733501d7a77850c20f0fcea792ed2187943.mp3"}],curator:{id:4284947,name:"Phoenix",hash:"5fa08b5281e1d70006f1b322",avatar:"https://cdn.beatsaver.com/avatar/4284947.jpg",type:"SIMPLE",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4284947/playlist"},curatedAt:"2022-02-04T23:50:20.027446Z",createdAt:"2022-02-04T23:05:01.786046Z",updatedAt:"2022-02-04T23:52:36.995020Z",lastPublishedAt:"2022-02-04T23:50:20.027446Z",tags:["balanced","rock"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"2c785",name:"[Arc/Chain] Let's Groove - Earth, Wind & Fire",description:"I've been wanting to do a lower tempo dance map for a while and I knew this would be the perfect song. \n\nThanks to @dolledupchaos for playtesting!",uploader:{id:4232648,name:"ramenator05",hash:"60ecf439686b9f0006a67a41",avatar:"https://cdn.beatsaver.com/avatar/4232648.jpg",type:"SIMPLE",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4232648/playlist"},metadata:{bpm:124,duration:236,songName:"[Arc/Chain] Let's Groove - Earth Wind & Fire",songSubName:"",songAuthorName:"Earth Wind & Fire",levelAuthorName:"ramenator05"},stats:{plays:0,downloads:0,upvotes:3479,downvotes:43,score:.9834,reviews:3},uploaded:"2022-11-28T23:00:29.688269Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"bf86263deda5f2e09867f3ddad625dfc269709be",state:"Published",createdAt:"2022-11-28T22:59:23.889170Z",sageScore:2,diffs:[{njs:15,offset:.2,notes:550,bombs:0,obstacles:0,nps:2.39,length:480,characteristic:"Standard",difficulty:"Hard",events:115,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:232.258,paritySummary:{errors:0,warns:0,resets:0},maxScore:500755,environment:"LizzoEnvironment"},{njs:17,offset:-.2,notes:708,bombs:0,obstacles:0,nps:3.076,length:480,characteristic:"Standard",difficulty:"Expert",events:115,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:232.258,paritySummary:{errors:0,warns:0,resets:0},maxScore:646195,environment:"LizzoEnvironment"},{njs:19,offset:.5,notes:715,bombs:0,obstacles:0,nps:3.107,length:480,characteristic:"Standard",difficulty:"ExpertPlus",events:115,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:232.258,paritySummary:{errors:0,warns:0,resets:0},maxScore:652635,environment:"LizzoEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/bf86263deda5f2e09867f3ddad625dfc269709be.zip",coverURL:"https://eu.cdn.beatsaver.com/bf86263deda5f2e09867f3ddad625dfc269709be.jpg",previewURL:"https://eu.cdn.beatsaver.com/bf86263deda5f2e09867f3ddad625dfc269709be.mp3"}],curator:{id:4292041,name:"symphonic",avatar:"https://cdn.beatsaver.com/avatar/2dc906ee5b78c2cb723f0eae964c2c203babf3f4.png",type:"DISCORD",admin:!0,curator:!0,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4292041/playlist"},curatedAt:"2022-11-29T21:39:24.794532Z",createdAt:"2022-11-28T22:59:23.889170Z",updatedAt:"2022-11-29T21:39:24.794532Z",lastPublishedAt:"2022-11-28T23:00:29.688269Z",tags:["dance-style","soul","dance"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"21bf8",name:"Marina and the Diamonds - Are You Satisfied?",description:"Thanks, Cryston!\n\nSocials: \nhttps://twitter.com/bytrius\nhttps://www.youtube.com/c/bytrius\nhttps://bsaber.com/members/bytrius/\nhttps://www.twitch.tv/bytrius",uploader:{id:73032,name:"Bytrius",hash:"5de442271dc9e8000696cd15",avatar:"https://cdn.beatsaver.com/avatar/62ed9906317427e9b14435ca144c7189b83a711a.png",type:"DISCORD",admin:!0,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/73032/playlist"},metadata:{bpm:124,duration:200,songName:"Are You Satisfied?",songSubName:"",songAuthorName:"Marina and the Diamonds",levelAuthorName:"Bytrius"},stats:{plays:0,downloads:0,upvotes:604,downvotes:2,score:.9832,reviews:1},uploaded:"2022-02-15T21:07:43.593089Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"7fe7f6e0f0f1687b6821891b42f3ae080d6e1270",state:"Published",createdAt:"2022-02-15T20:59:06.806428Z",sageScore:4,diffs:[{njs:15,offset:-.55,notes:459,bombs:4,obstacles:124,nps:2.585,length:367,characteristic:"Standard",difficulty:"Hard",events:4532,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:177.581,paritySummary:{errors:0,warns:0,resets:2},maxScore:415035,environment:"DefaultEnvironment"},{njs:17,offset:-.725,notes:679,bombs:16,obstacles:122,nps:3.508,length:400,characteristic:"Standard",difficulty:"Expert",events:4532,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:193.548,paritySummary:{errors:0,warns:0,resets:4},maxScore:617435,environment:"DefaultEnvironment"},{njs:19,offset:.125,notes:944,bombs:24,obstacles:122,nps:4.877,length:400,characteristic:"Standard",difficulty:"ExpertPlus",events:4532,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:193.548,paritySummary:{errors:0,warns:0,resets:4},maxScore:861235,environment:"DefaultEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/7fe7f6e0f0f1687b6821891b42f3ae080d6e1270.zip",coverURL:"https://eu.cdn.beatsaver.com/7fe7f6e0f0f1687b6821891b42f3ae080d6e1270.jpg",previewURL:"https://eu.cdn.beatsaver.com/7fe7f6e0f0f1687b6821891b42f3ae080d6e1270.mp3"}],curator:{id:32269,name:"maybeemae",hash:"5e1123516d774b0006a953ec",avatar:"https://cdn.beatsaver.com/avatar/d2119e1ff402b2cd380caf8b074d3f7c037f0ec2.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/32269/playlist"},curatedAt:"2022-02-15T21:07:43.593089Z",createdAt:"2022-02-15T20:59:06.806428Z",updatedAt:"2024-08-27T09:23:17.201003Z",lastPublishedAt:"2022-02-15T21:07:43.593089Z",tags:["dance-style","pop","electronic"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"b514",name:"[[Wall Show + Chroma]] GAS GAS GAS | Manuel",description:"This wall map is a bit more intense than my others, you will need a very hefty pc to run and record this. Have Fun!\n\nHere's a playthrough: https://www.youtube.com/watch?v=hlS6r-Usnro\nHere's a playthrough by Nico (HQ Version): https://youtu.be/F_3qRxDdQc0\n\nREQUIREMENTS: \n -Noodle Extensions\n -Chroma/ChromaLite\n(fixed formatting + removed stupid metadata ;)",uploader:{id:73008,name:"thelightdesigner",hash:"5cff0b7798cc5a672c85627a",avatar:"https://cdn.beatsaver.com/avatar/fa1a30d2b4146dd93cb42537759669dcf961cf29.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,playlistUrl:"https://api.beatsaver.com/users/id/73008/playlist"},metadata:{bpm:154,duration:108,songName:"GAS GAS GAS",songSubName:"(Short Ver.)",songAuthorName:"Manuel",levelAuthorName:"KyleT"},stats:{plays:0,downloads:0,upvotes:9158,downvotes:134,score:.9832,reviews:4},uploaded:"2020-06-22T20:02:06.271Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"95e11f39b2898a38e3b5e61d2156ef5f5835f40f",key:"b514",state:"Published",createdAt:"2020-06-22T20:02:06.271Z",sageScore:3,diffs:[{njs:16.5,offset:0,notes:390,bombs:13,obstacles:13898,nps:3.832,length:261.25,characteristic:"Standard",difficulty:"Expert",events:1462,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:101.786,paritySummary:{errors:0,warns:0,resets:2},maxScore:351555,label:"GAS GAS GAS!!!!!",environment:"NiceEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/95e11f39b2898a38e3b5e61d2156ef5f5835f40f.zip",coverURL:"https://eu.cdn.beatsaver.com/95e11f39b2898a38e3b5e61d2156ef5f5835f40f.jpg",previewURL:"https://eu.cdn.beatsaver.com/95e11f39b2898a38e3b5e61d2156ef5f5835f40f.mp3"}],curator:{id:1096,name:"pyrowarfare",hash:"5e99c7df3f476a0006596cdf",avatar:"https://www.gravatar.com/avatar/28fcd25e8adfa72a17daa766767daf781bee89776333a3ed7a4cc84146e6a3e8?d=retro",type:"SIMPLE",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/1096/playlist"},curatedAt:"2020-06-22T20:02:06.271Z",createdAt:"2020-06-22T20:02:06.271Z",updatedAt:"2020-06-22T20:02:06.271Z",lastPublishedAt:"2020-06-22T20:02:06.271Z",tags:["anime","electronic","house"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1}]},function(e,t,n){if(AFRAME.registerComponent("song-info-positioner",{schema:{victory:{default:!1}},update:function(){this.data.victory?this.el.object3D.position.y=-1.2:this.el.object3D.position.y=-1}}),window.AFRAME){const t=["song-info-positioner"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){n(6);if(AFRAME.registerComponent("song-preview-system",{schema:{selectedChallengeId:{type:"string"},selectedChallengeVersion:{type:"string"}},init:function(){this.audio=document.createElement("audio"),this.audio.volume=.5},update:function(e){const t=this.data;console.log("update-song",e,t),t.selectedChallengeId&&e.selectedChallengeId!==t.selectedChallengeId?(this.audio.pause(),this.audio.setAttribute("src","https://cdn.beatsaver.com/"+t.selectedChallengeVersion+".mp3"),this.audio.currentTime=0,this.audio.play()):t.selectedChallengeId||this.audio.pause()}}),window.AFRAME){const t=["song-preview-system"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("song-progress-info",{dependencies:["geometry","material"],schema:{enabled:{default:!1}},init:function(){this.tick=AFRAME.utils.throttleTick(this.tick.bind(this),1e3),this.progress=this.el.getObject3D("mesh"),this.progress.geometry.translate(.285,0,0),this.el.sceneEl.addEventListener("cleargame",()=>{this.progress.scale.x=1e-4})},update:function(e){this.progress.scale.x=1e-4},updateInfo:function(){const e=this.el.sceneEl.components.song.source;if(!e||!e.buffer)return;const t=this.el.sceneEl.components.song.getCurrentTime()/e.buffer.duration;t&&(this.progress.scale.x=t)},tick:function(){this.data.enabled&&this.updateInfo()}}),window.AFRAME){const t=["song-progress-info"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){n(6);const r={once:!0};let i=AFRAME.utils.getUrlParameter("skip");if(i=i?parseInt(i)/1e3:0,AFRAME.registerComponent("song",{schema:{audio:{type:"string"},analyserEl:{type:"selector",default:"#audioAnalyser"},challengeId:{default:""},isBeatsPreloaded:{default:!1},isGameOver:{default:!1},isLoading:{default:!1},isPlaying:{default:!1},isVictory:{default:!1}},init:function(){this.analyserSetter={buffer:!0},this.audioAnalyser=this.data.analyserEl.components.audioanalyser,this.context=this.audioAnalyser.context,this.isAudioPlaying=!1,this.songStartTime=0,this.onSongComplete=this.onSongComplete.bind(this),this.audioAnalyser.gainNode.gain.value=.5,this.el.addEventListener("gamemenurestart",this.onRestart.bind(this)),this.el.addEventListener("wallhitstart",this.onWallHitStart.bind(this)),this.el.addEventListener("wallhitend",this.onWallHitEnd.bind(this))},update:function(e){const t=this.data;if(!e.isLoading&&t.isLoading&&t.audio)this.processAudio();else if(!e.audio&&t.audio&&t.isLoading)this.processAudio();else if(e.isGameOver||!t.isGameOver){if(e.isGameOver&&!t.isGameOver&&(this.audioAnalyser.gainNode.value=.5),!e.isVictory&&t.isVictory)return this.data.analyserEl.addEventListener("audioanalyserbuffersource",e=>{this.audioAnalyser.resumeContext();const t=this.audioAnalyser.gainNode.gain;t.cancelScheduledValues(0),t.setValueAtTime(.05,0),this.source=e.detail,this.source.start(),this.el.emit("victory")},r),void this.audioAnalyser.refreshSource();!e.isBeatsPreloaded&&this.data.isBeatsPreloaded&&this.source&&this.startAudio(),!e.challengeId||t.challengeId?(e.isPlaying&&!t.isPlaying&&(this.audioAnalyser.suspendContext(),this.isAudioPlaying=!1),!e.isPlaying&&t.isPlaying&&this.source&&(this.audioAnalyser.resumeContext(),this.isAudioPlaying=!0)):this.stopAudio()}else this.onGameOver()},processAudio:function(){this.el.sceneEl.emit("songprocessstart",null,!1),this.getAudio().then(e=>{this.el.sceneEl.emit("songprocessfinish",null,!1)}).catch(console.error)},getAudio:function(){const e=this.data;return this.source&&this.stopAudio(),this.isAudioPlaying=!1,new Promise(t=>{e.analyserEl.addEventListener("audioanalyserbuffersource",e=>{this.source=e.detail,t(this.source)},r),this.analyserSetter.src=this.data.audio,e.analyserEl.setAttribute("audioanalyser",this.analyserSetter)})},stopAudio:function(){this.source?(this.source.onended=null,this.isAudioPlaying&&this.source.stop(),this.source.disconnect(),this.source=null,this.isAudioPlaying=!1):console.warn("[song] Tried to stopAudio, but not playing.")},onSongComplete:function(){this.data.isPlaying&&this.el.emit("songcomplete")},onGameOver:function(){this.isAudioPlaying=!1;const e=this.source.playbackRate;e.setValueAtTime(e.value,this.context.currentTime),e.linearRampToValueAtTime(0,this.context.currentTime+3.5);const t=this.audioAnalyser.gainNode.gain;t.setValueAtTime(t.value,this.context.currentTime),t.linearRampToValueAtTime(0,this.context.currentTime+3.5),setTimeout(()=>{this.data.isGameOver&&this.stopAudio()},3500)},onRestart:function(){this.isAudioPlaying=!1,this.source&&this.source.disconnect();this.audioAnalyser.gainNode.gain.cancelScheduledValues(0),this.data.analyserEl.addEventListener("audioanalyserbuffersource",e=>{this.source=e.detail,this.el.sceneEl.emit("songloadfinish",null,!1)},r),this.audioAnalyser.refreshSource()},onWallHitStart:function(){this.audioAnalyser.gainNode.gain.linearRampToValueAtTime(.1,this.context.currentTime+.1)},onWallHitEnd:function(){this.audioAnalyser.gainNode.gain.linearRampToValueAtTime(.5,this.context.currentTime+.1)},startAudio:function(){this.audioAnalyser.gainNode.gain.setValueAtTime(.5,this.context.currentTime),this.songStartTime=this.context.currentTime,this.source.onended=this.onSongComplete,this.source.start(0,i||0),this.isAudioPlaying=!0},getCurrentTime:function(){return this.context.currentTime-this.songStartTime}}),window.AFRAME){const t=["song"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){"use strict";n.r(t);var r=n(0),i=n.n(r);const o=[{name:"bgcolor",property:"backglow.color"},{name:"leftglow",property:"leftsideglow.color"},{name:"rightglow",property:"rightsideglow.color"}],a=[{id:"off",dur:500,to:"off"},{id:"primary",dur:5,to:"primary"},{id:"primarybright",dur:500,from:"tertiary",to:"primarybright"},{id:"secondary",dur:5,to:"secondary"},{id:"secondarybright",dur:500,from:"tertiary",to:"secondarybright"}],s=["off","secondary","secondary","secondarybright","","primary","primary","primarybright","primarybright"];AFRAME.registerComponent("stage-colors",{schema:{colorScheme:{default:"default"}},init:function(){this.el.addEventListener("cleargame",this.resetColors.bind(this)),this.el.sceneEl.addEventListener("playbuttonclick",this.resetColors.bind(this)),function(e,t){for(let n=0;n<o.length;n++){const r=o[n];for(let n=0;n<a.length;n++){const o=a[n];e.setAttribute(`animation__${r.name}${o.id}`,{property:"systems.materials."+r.property,type:"color",isRawProperty:!0,easing:"linear",dur:o.dur,from:o.from?i.a.schemes[t][o.from]:"",startEvents:`${r.name}${o.id}`,to:i.a.schemes[t][o.to]})}}}(this.el.sceneEl,this.data.colorScheme)},update:function(e){e.colorScheme&&this.data.colorScheme!==e.colorScheme&&function(e,t){for(let n=0;n<o.length;n++){const r=o[n];for(let n=0;n<a.length;n++){const o=a[n],s=`animation__${r.name}${o.id}`;o.from&&e.setAttribute(s,"from",i.a.schemes[t][o.from]),e.setAttribute(s,"to",i.a.schemes[t][o.to])}}}(this.el.sceneEl,this.data.colorScheme)},play:function(){this.el.emit("bgcolorsecondary",null,!1)},setColor:function(e,t){s[t]||(t=5),e.startsWith("curve")?this.el.emit(e+"stageeventcolor",s[t].replace("bright",""),!1):this.el.emit(`${e}color${s[t]}`,null,!1)},setColorInstant:function(e,t){const n=this.el.sceneEl.systems.materials;if("stars"===e){let e;return e=0===t?i.a.schemes[this.data.colorScheme].secondarybright:i.a.schemes[this.data.colorScheme].secondary,void l(n.stars,"color",e)}const r=i.a.schemes[this.data.colorScheme][s[t]];"moon"===e&&l(n.moon,"tint",r)},resetColors:function(){this.el.emit("bgcolorsecondary",null,!1),this.el.emit("curveevenstageeventcolor","off",!1),this.el.emit("curveoddstageeventcolor","off",!1)}});const c=new THREE.Color;function l(e,t,n){c.set(n),e.uniforms?(e.uniforms[t].value.x=c.r,e.uniforms[t].value.y=c.g,e.uniforms[t].value.z=c.b):e[t].set(n)}if(window.AFRAME){const t=["stage-colors"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("stage-lasers",{schema:{enabled:{default:!0}},init:function(){this.speed=0,this.lasers=[this.el.children[0].object3D,this.el.children[1].object3D,this.el.children[2].object3D]},pulse:function(e){this.speed=e/8},tick:function(e,t){0!==this.speed&&(t/=1e3,!this.data.enabled&&(this.speed*=.97,Math.abs(this.speed)<.01)?this.speed=0:(this.lasers[0].rotation.z+=this.speed*t,this.lasers[1].rotation.z-=this.speed*t*1.01,this.lasers[2].rotation.z+=this.speed*t*1.02))}}),window.AFRAME){const t=["stage-lasers"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r=n(0);if(AFRAME.registerComponent("stars",{schema:{color:{type:"color",default:r.initial.secondary},count:{default:500},radius:{default:300}},init:function(){const e=()=>(Math.random()-.5)*this.data.radius*2,t=new THREE.BufferGeometry;this.material=this.el.sceneEl.systems.materials.stars;const n=[];for(let t=0;t<this.data.count;t++)n.push(e(),e(),4*e());t.setAttribute("position",new THREE.Float32BufferAttribute(n,3)),t.computeBoundingSphere();const r=new THREE.Points(t,this.material);this.el.setObject3D("stars",r)},update:function(){this.material.color.setStyle(this.data.color)}}),window.AFRAME){const t=["stars"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("stats-param",{init:function(){"true"===AFRAME.utils.getUrlParameter("stats")&&this.el.setAttribute("stats","")}}),window.AFRAME){const t=["stats-param"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("stepback",{init:function(){this.message=document.getElementById("stepback"),this.camera=document.getElementById("camera"),this.lastTime=0,this.limit=-.9,this.throttling=300},tick:function(e,t){if(!(e-this.lastTime<this.throttling)){var n=this.camera.object3D.position,r=this.message.object3D.position;n.z<this.limit?(this.throttling=10,this.message.object3D.visible=!0,this.message.getObject3D("mesh").material.opacity=1-Math.abs(n.z-r.z),r.x=n.x,r.y=n.y):(this.message.object3D.visible=!1,this.throttling=500),this.lastTime=e}}}),window.AFRAME){const t=["stepback"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("sub-object",{schema:{from:{type:"selector"},name:{type:"string"}},init:function(){var e=this.el,t=this.data;t.from.addEventListener("model-loaded",n=>{const r=n.detail.model.getObjectByName(t.name);e.setObject3D("mesh",r.clone()),e.setAttribute("material","shader","flat"),e.emit("subobjectloaded",null,!1)})}}),window.AFRAME){const t=["sub-object"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){var r={superkeyboard:{wrapCount:30,inputOffsetY:.008,inputOffsetX:.08,img:"keyboard.png",hoverImg:"keyboard-hover.png",layout:[{key:"1",x:.013,y:.03,w:.093,h:.176},{key:"2",x:.106,y:.03,w:.088,h:.176},{key:"3",x:.194,y:.03,w:.077,h:.176},{key:"4",x:.271,y:.03,w:.085,h:.176},{key:"5",x:.356,y:.03,w:.081,h:.176},{key:"6",x:.437,y:.03,w:.081,h:.176},{key:"8",x:.603,y:.03,w:.082,h:.176},{key:"7",x:.519,y:.03,w:.084,h:.176},{key:"9",x:.685,y:.03,w:.076,h:.176},{key:"0",x:.76,y:.03,w:.088,h:.176},{key:"Delete",x:.867,y:.03,w:.124,h:.176},{key:"q",x:.013,y:.213,w:.098,h:.186},{key:"w",x:.111,y:.213,w:.107,h:.186},{key:"e",x:.218,y:.213,w:.096,h:.186},{key:"r",x:.313,y:.213,w:.095,h:.186},{key:"t",x:.408,y:.213,w:.094,h:.186},{key:"y",x:.503,y:.213,w:.099,h:.186},{key:"u",x:.602,y:.213,w:.097,h:.186},{key:"i",x:.701,y:.213,w:.085,h:.186},{key:"o",x:.786,y:.213,w:.099,h:.186},{key:"p",x:.885,y:.213,w:.097,h:.186},{key:"a",x:.063,y:.408,w:.1,h:.182},{key:"s",x:.163,y:.408,w:.097,h:.182},{key:"d",x:.26,y:.408,w:.098,h:.182},{key:"f",x:.358,y:.408,w:.094,h:.182},{key:"g",x:.452,y:.408,w:.1,h:.182},{key:"h",x:.552,y:.408,w:.105,h:.182},{key:"j",x:.657,y:.408,w:.085,h:.182},{key:"k",x:.743,y:.408,w:.105,h:.182},{key:"l",x:.848,y:.408,w:.1,h:.182},{key:"z",x:.107,y:.596,w:.106,h:.197},{key:"x",x:.213,y:.596,w:.1,h:.197},{key:"c",x:.313,y:.596,w:.093,h:.197},{key:"v",x:.406,y:.596,w:.096,h:.197},{key:"b",x:.502,y:.596,w:.093,h:.197},{key:"n",x:.595,y:.596,w:.099,h:.197},{key:"m",x:.694,y:.596,w:.106,h:.197},{key:" ",x:.372,y:.798,w:.249,h:.169},{key:"Insert",x:.017,y:-.001,w:.038,h:.018}]}};if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");var i={roboto:17,aileronsemibold:20,dejavu:20.5,exo2bold:20,exo2semibold:20.3,kelsonsans:22.8,monoid:19.5,mozillavr:9.5,sourcecodepro:20.3};function o(e,t){for(var n=0;n<e.length;n++)if(e[n].id===t)return e[n];return null}if(AFRAME.registerComponent("super-keyboard",{schema:{align:{default:"left",oneOf:["left","center","right"]},blinkingSpeed:{type:"int",default:400},filters:{type:"array"},font:{default:"aileronsemibold"},hand:{type:"selector"},imagePath:{default:"."},injectToRaycasterObjects:{default:!0},inputColor:{type:"color",default:"#6699ff"},interval:{type:"int",default:50},keyBgColor:{type:"color",default:"#000"},keyColor:{type:"color",default:"#6699ff"},keyHoverColor:{type:"color",default:"#1A407F"},keyPressColor:{type:"color",default:"#5290F6"},label:{type:"string",default:""},labelColor:{type:"color",default:"#aaa"},maxLength:{type:"int",default:0},model:{default:"basic"},show:{default:!0},multipleInputs:{default:!1},value:{type:"string",default:""},width:{default:.8}},init:function(){this.el.addEventListener("click",this.click.bind(this)),this.changeEventDetail={},this.textInputObject={},this.keys=null,this.focused=!1,this.keyHover=null,this.prevCheckTime=null,this.shift=!1,this.rawValue=this.data.value,this.defaultValue=this.data.value,this.userFilterFunc=null,this.intervalId=0,this.kbImg=document.createElement("a-entity"),this.kbImg.classList.add("keyboardRaycastable"),this.kbImg.classList.add("superKeyboardImage"),this.kbImg.addEventListener("raycaster-intersected",this.hover.bind(this)),this.kbImg.addEventListener("raycaster-intersected-cleared",this.blur.bind(this)),this.el.appendChild(this.kbImg),this.label=document.createElement("a-entity"),this.label.setAttribute("text",{align:"center",font:this.data.font,baseline:"bottom",lineHeight:40,shader:"msdf",negate:!0,value:this.data.label,color:this.data.labelColor,width:this.data.width,wrapCount:30}),this.el.appendChild(this.label),this.textInput=document.createElement("a-entity"),this.textInput.setAttribute("mixin","superKeyboardTextInput"),this.textInput.setAttribute("text",{align:this.data.align,font:this.data.font,lineHeight:35,shader:"msdf",value:this.data.value,color:this.data.inputColor,width:this.data.width}),this.el.appendChild(this.textInput),this.cursor=document.createElement("a-entity"),this.cursor.object3D.position.set(0,0,.001),this.cursor.setAttribute("material",{shader:"flat",color:this.data.inputColor}),this.textInput.appendChild(this.cursor),this.cursorUpdated=!1,this.keyBgColor=new THREE.Color,this.keyHoverColor=new THREE.Color,this.keyPressColor=new THREE.Color;var e=this;document.addEventListener("keydown",(function(t){if("t"===t.key){for(var n="",r="abcdefghijklmopqrstuvQWIEUTGASDLIGKBXACQWETL102394676457",i=Math.floor(20*Math.random()),o=0;o<i;o++)n+=r[Math.floor(Math.random()*r.length)];e.el.setAttribute("super-keyboard",{value:n})}})),document.addEventListener("show",this.open.bind(this)),this.hand=null,this.handListenersSet=!1,this.raycaster=null},update:function(e){var t=r[this.data.model],n=this.data.width,i=this.data.width/2;if(void 0!==t){e&&this.defaultValue===e.defaultValue?this.updateTextInput(this.filter(this.rawValue)):(this.rawValue=this.data.value,this.defaultValue=this.data.value,this.updateTextInput(this.filter(this.data.value))),this.data.width===e.width&&this.data.height===e.height&&this.data.keyColor===e.keyColor||(this.kbImg.setAttribute("geometry",{primitive:"plane",width:n,height:i}),this.kbImg.setAttribute("material",{shader:"flat",src:this.data.imagePath+"/"+t.img,color:this.data.keyColor,transparent:!0})),this.data.label===e.label&&this.data.labelColor===e.labelColor&&this.data.width===e.width||(this.label.setAttribute("text",{value:this.data.label,color:this.data.labelColor,width:this.data.width}),this.label.object3D.position.set(0,.3*n,-.02)),this.data.width===e.width&&this.data.keyBgColor===e.keyBgColor||this.initKeyColorPlane();var o="center"!==this.data.align?t.inputOffsetX*n:0;"right"===this.data.align&&(o*=-1),this.data.font===e.font&&this.data.inputColor===e.inputColor&&this.data.width===e.width&&this.data.align===e.align||this.textInput.setAttribute("text",{font:this.data.font,color:this.data.inputColor,width:n,wrapCount:t.wrapCount,align:this.data.align});for(var a=0;a<t.layout.length;a++){var s=t.layout[a];"Insert"===s.key&&(this.inputRect=s)}this.textInput.object3D.position.set(o,n/4-(this.inputRect.y+this.inputRect.h/2)*n/2+t.inputOffsetY*n,.002),this.data.width!==e.width&&this.cursor.setAttribute("geometry",{primitive:"plane",width:.03*n,height:.01*n}),this.updateCursorPosition(),this.setupHand(),this.keyBgColor.set(this.data.keyBgColor),this.keyHoverColor.set(this.data.keyHoverColor),this.keyPressColor.set(this.data.keyPressColor),this.data.show?this.open():this.close()}else console.error('super-keyboard ERROR: model "'+this.data.model+'" undefined.')},tick:function(e){var t;if(!(this.prevCheckTime&&e-this.prevCheckTime<this.data.interval))if(this.prevCheckTime){if(this.raycaster&&this.focused&&(t=this.raycaster.getIntersection(this.kbImg)))for(var n=t.uv,i=r[this.data.model].layout,o=0;o<i.length;o++){var a=i[o];if(n.x>a.x&&n.x<a.x+a.w&&1-n.y>a.y&&1-n.y<a.y+a.h){this.keyHover!==a&&(this.keyHover=a,this.updateKeyColorPlane(this.keyHover.key,this.keyHoverColor));break}}}else this.prevCheckTime=e},play:function(){this.cursorUpdated&&this.startBlinking()},pause:function(){this.stopBlinking()},initKeyColorPlane:function(){var e=this.keyColorPlane=document.createElement("a-entity");e.classList.add("superKeyboardKeyColorPlane"),e.object3D.position.z=.001,e.object3D.visible=!1,e.setAttribute("geometry",{primitive:"plane"}),e.setAttribute("material",{shader:"flat",color:this.data.keyBgColor,transparent:!0}),e.addEventListener("componentinitialized",(function(e){"material"===e.detail.name&&(this.getObject3D("mesh").material.blending=THREE.AdditiveBlending)})),this.el.appendChild(e)},updateKeyColorPlane:function(e,t){var n=r[this.data.model],i=this.keyColorPlane;if(e){for(var o=0;o<n.layout.length;o++){var a=n.layout[o];if(a.key===e){var s=this.data.width,c=this.data.width/2,l=s/2,u=c/2,h=a.w*s,d=a.h*c;i.object3D.scale.x=h,i.object3D.scale.y=d,i.object3D.position.x=a.x*s-l+h/2,i.object3D.position.y=(1-a.y)*c-u-d/2,i.getObject3D("mesh").material.color.copy(t);break}}i.object3D.visible=!0}else i.object3D.visible=!1},setupHand:function(){if(this.hand&&this.hand.ownRaycaster&&this.hand.removeAttribute("raycaster"),this.data.hand?this.hand=this.data.hand:this.hand=document.querySelector(["[cursor]","[vive-controls]","[tracked-controls]","[gearvr-controls]","[oculus-go-controls]","[oculus-touch-controls]","[windows-motion-controls]","[hand-controls]","[daydream-controls] [cursor] > [raycaster]"].join(",")),this.hand){if(!this.hand.hasLoaded)return void this.hand.addEventListener("loaded",this.setupHand.bind(this));var e=this.hand.components.raycaster,t={};if(e){if(this.hand.ownRaycaster=!1,this.data.injectToRaycasterObjects){var n=e.data.objects.split(",");-1===n.indexOf(".keyboardRaycastable")&&n.push(".keyboardRaycastable"),t.objects=n.join(",").replace(/^,/,""),this.hand.setAttribute("raycaster",t)}}else this.hand.ownRaycaster=!0,t.showLine=this.data.show,t.enabled=this.data.show,this.data.injectToRaycasterObjects&&(t.objects=".keyboardRaycastable"),this.hand.setAttribute("raycaster",t);this.raycaster=this.hand.components.raycaster}else console.error('super-keyboard: no controller found. Add <a-entity> with controller or specify with super-keyboard="hand: #selectorToController".')},filter:function(e){if(""===e)return"";for(var t=0;t<this.data.filters.length;t++)switch(this.data.filters[t]){case"custom":this.userFilterFunc&&(e=this.userFilterFunc(e));break;case"allupper":e=e.toUpperCase();break;case"alllower":e=e.toLowerCase();break;case"title":e=e.split(" ").map((function(e){return e[0].toUpperCase()+e.substr(1)})).join(" ");break;case"numbers":e=e.split("").filter((function(e){return!isNaN(parseInt(e))||"."===e})).join("");break;case"first":e=e[0].toUpperCase()+e.substr(1);break;case"trim":e=e.trim()}return this.data.maxLength>0?e.substr(0,this.data.maxLength):e},click:function(e){if(this.keyHover){switch(this.keyHover.key){case"Enter":this.accept();break;case"Insert":return;case"Delete":this.rawValue=this.rawValue.substr(0,this.rawValue.length-1);var t=this.filter(this.rawValue);this.el.setAttribute("super-keyboard","value",t),this.updateTextInput(t),this.changeEventDetail.value=t,this.el.emit("superkeyboardchange",this.changeEventDetail);break;case"Shift":this.shift=!this.shift,this.keyHover.el.setAttribute("material","color",this.shift?this.data.keyHoverColor:this.data.keyBgColor);break;case"Escape":this.dismiss();break;default:if(this.data.maxLength>0&&this.rawValue.length>this.data.maxLength)break;this.rawValue+=this.shift?this.keyHover.key.toUpperCase():this.keyHover.key;t=this.filter(this.rawValue);this.el.setAttribute("super-keyboard","value",t),this.updateTextInput(t),this.changeEventDetail.value=t,this.el.emit("superkeyboardchange",this.changeEventDetail)}this.updateKeyColorPlane(this.keyHover.key,this.keyPressColor);var n=this;setTimeout((function(){n.updateKeyColorPlane(n.keyHover.key,n.keyHoverColor)}),100),this.updateCursorPosition()}},open:function(){this.el.object3D.visible=!0,this.hand&&this.hand.ownRaycaster&&this.hand.setAttribute("raycaster",{showLine:!0,enabled:!0})},close:function(){this.el.object3D.visible=!1,this.hand&&this.hand.ownRaycaster&&this.hand.setAttribute("raycaster",{showLine:!1,enabled:!1})},accept:function(){this.el.emit("superkeyboardinput",{value:this.data.value}),this.data.multipleInputs?(this.rawValue="",this.data.value="",this.updateTextInput("")):(this.el.object3D.visible=!1,this.hand&&this.hand.ownRaycaster&&this.hand.setAttribute("raycaster",{showLine:!1,enabled:!1}),this.data.show=!1)},dismiss:function(){this.data.value=this.defaultValue,this.updateTextInput(),this.el.object3D.visible=!1,this.hand&&this.hand.ownRaycaster&&this.hand.setAttribute("raycaster",{showLine:!1,enabled:!1}),this.el.emit("superkeyboarddismiss"),this.data.show=!1},blur:function(e){this.focused=!1,this.keyHover&&"Shift"!==this.keyHover.key&&this.updateKeyColorPlane(this.keyHover.key,this.keyBgColor),this.keyHover=null},hover:function(e){this.focused=!0},startBlinking:function(){this.stopBlinking(),this.intervalId=window.setInterval(this.blink.bind(this),this.data.blinkingSpeed)},stopBlinking:function(){window.clearInterval(this.intervalId),this.intervalId=0},blink:function(){this.cursor.object3D.visible=!this.cursor.object3D.visible},setCustomFilter:function(e){this.userFilterFunc=e},addCustomModel:function(e,t){e&&(r[e]=t)},updateCursorPosition:function(){var e=this.textInput.components.text.currentFont;if(!e){var t=this;return this.cursor.object3D.visible=!1,void window.setTimeout((function(){t.updateCursorPosition(),t.startBlinking()}),700)}var n=this.data.width,a=r[this.data.model],s=-this.inputRect.h/2*n/2.4+a.inputOffsetY*n,c=this.data.width/this.textInput.components.text.data.wrapCount,l=0,u=i[this.textInput.components.text.data.font];void 0===u&&(u=20);for(var h=0;h<this.data.value.length;h++){var d=o(e.chars,this.data.value.charCodeAt(h));l+=d.width+d.xadvance*(32===d.id?2:1)}"center"===this.data.align?l=l*c*u*.0011/2+.02*n:"left"===this.data.align?(l=l*c*u*.0011+.02*n,l-=n/2):"right"===this.data.align&&(l=-l*c*u*.0011-.02*n,l+=n/2),this.cursor.object3D.position.set(l,s,.001),this.cursorUpdated=!0},updateTextInput:function(e){this.textInputObject.value=e||this.data.value,this.textInput.setAttribute("text",this.textInputObject)}}),window.AFRAME){const t=["super-keyboard"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r=new THREE.Color;if(AFRAME.registerComponent("supercurve-color",{init:function(){const e=this.el;e.sceneEl.addEventListener("curveevenstageeventcolor",e=>{e.detail&&"off"!==e.detail?this.setColor("color1",e.detail):this.setColor("color1","primary")}),e.sceneEl.addEventListener("curveoddstageeventcolor",e=>{e.detail&&"off"!==e.detail?this.setColor("color2",e.detail):this.setColor("color2","secondary")})},setColor:function(e,t){const n=this.el.components.material.material.uniforms[e].value,i=this.el.sceneEl.systems.materials.scheme[t];r.set(i),n.x=r.r,n.y=r.g,n.z=r.b}}),window.AFRAME){const t=["supercurve-color"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){"use strict";n.r(t);var r=n(0),i=n.n(r);if(AFRAME.registerShader("supercurve",{schema:{cameraPercent:{type:"number",is:"uniform"},color1:{type:"color",is:"uniform",default:i.a.initial.primary},color2:{type:"color",is:"uniform",default:i.a.initial.secondary},fogColor:{type:"color",is:"uniform",default:i.a.initial.primary},side:{default:"double"},transparent:{default:!0}},fragmentShader:n(173),vertexShader:n(174),update:function(e){this.updateVariables(e,"attribute"),this.updateVariables(e,"uniform"),this.el.sceneEl.systems.materials.registerCurve(this.material)}}),window.AFRAME){const t=[],n=["supercurve"],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t){e.exports="varying vec2 vUvs;\nvarying vec3 vWorldPos;\nuniform vec3 color1;\nuniform vec3 color2;\nuniform vec3 fogColor;\nuniform float opacity;\n\n#define BLACK vec3(0.0)\n#define YELLOW vec3(250.0 / 255.0, 244.0 / 255.0, 180.0 / 255.0)\n\nvoid main() {\n vec3 col;\n\n // Lines.\n float f1 = clamp(sin(vUvs.x * 12.9 + 1.4) - 0.99, 0.0, 1.0) * 80.0;\n float f2 = clamp(sin(3.1416 + vUvs.x * 12.9 + 1.45) - 0.99, 0.0, 1.0) * 80.0;\n\n // Gradients.\n f1 += sin(vWorldPos.y - vWorldPos.x - vWorldPos.z * 0.4 + 1.4) * 0.1 + 0.1;\n f2 += sin(vWorldPos.y - vWorldPos.x - vWorldPos.z * 0.3 + 5.5) * 0.1 + 0.1;\n float f3 = sin(vWorldPos.y - vWorldPos.x - vWorldPos.z * 0.1 + 10.3) * 0.1 + 0.1;\n\n // Build color.\n col = mix(BLACK, color1, f1);\n col = mix(col, color2, f2);\n col = mix(col, YELLOW, f3);\n\n // Fog.\n float far = 100.0;\n float fog = 1.0 - clamp(length(vWorldPos - cameraPosition) / 400.0, 0.0, 1.0);\n\n col = mix(fogColor, col, fog);\n\n // fade beginning and end\n float alpha = 0.0;\n alpha += smoothstep(0.0, 0.003, vUvs.y);\n alpha -= smoothstep(0.997, 1.0, vUvs.y);\n\n gl_FragColor = vec4(col, alpha * (fog * fog));\n}\n"},function(e,t){e.exports="varying vec2 vUvs;\nvarying vec3 vWorldPos;\n\nvoid main() {\n vWorldPos = (modelMatrix * vec4(position, 1.0)).xyz;\n vUvs = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n"},function(e,t,n){n(176),n(177);const r=new THREE.Vector3,i=new THREE.Vector3;if(AFRAME.registerComponent("supercurve",{schema:{debug:{default:!1}},init:function(){this.buffers={},this.curve=null,this.fullLength=null,this.indexes={},this.length=null,this.points=[]},play:function(){this.generateCurve(1500)},generateCurve:function(e){this.length=e,e+=200,this.fullLength=e,this.points.length=0,this.points.push(new THREE.Vector3(0,0,0)),this.points.push(new THREE.Vector3(0,0,-100));let t,n=100;for(let r=2;r<=Math.ceil(e/100)-1;r++)t=this.points[r-1],n+=100,this.points.push(new THREE.Vector3(t.x+(10*Math.random()*2-10),t.y+(10*Math.random()*2-10),-1*n));const r=new THREE.CatmullRomCurve3(this.points),i=e-r.getLength(),o=r.getTangent(1,new THREE.Vector3),a=this.points[this.points.length-1].clone().add(o.multiplyScalar(i));this.points.push(a),this.setCurve(this.points),this.el.emit("supercurvegenerate")},setCurve:function(e){const t=this.buffers,n=(this.data,this.el),o=this.indexes;this.points=e;const a=this.curve=new THREE.CatmullRomCurve3(e),s=a.getLength(),c=a.getSpacedPoints(350),l=s/350,u=new THREE.BufferGeometry;t.position=new Float32Array(2106),t.normal=new Float32Array(2106),t.uvs=new Float32Array(1404),o.position=0,o.normal=0,o.uvs=0;const h=new THREE.Vector3(-1.5,0,-1*l/2),d=new THREE.Vector3(1.5,0,-1*l/2);for(let e=0;e<c.length;e++){const a=e/(c.length-1),s=c[e];if(0===c[e].x&&0===c[e].y&&0===c[e].z?(c[e].set(.001,0,.001),i.y=-1*Math.abs(i.y)):(i.copy(r).cross(c[e]).normalize(),i.y=-1*i.y),this.getPositionRelativeToTangent(a,h,r),t.position[o.position++]=r.x,t.position[o.position++]=r.y,t.position[o.position++]=r.z,t.normal[o.normal++]=i.x,t.normal[o.normal++]=i.y,t.normal[o.normal++]=i.z,t.uvs[o.uvs++]=0,t.uvs[o.uvs++]=a,this.getPositionRelativeToTangent(a,d,r),t.position[o.position++]=r.x,t.position[o.position++]=r.y,t.position[o.position++]=r.z,t.normal[o.normal++]=i.x,t.normal[o.normal++]=i.y,t.normal[o.normal++]=i.z,t.uvs[o.uvs++]=1,t.uvs[o.uvs++]=a,this.data.debug){const e=document.createElement("a-box");e.setAttribute("geometry",{width:.1,height:.1,depth:.1}),e.setAttribute("material",{shader:"flat",color:"#333"}),e.object3D.position.copy(s),e.object3D.position.y+=.1,n.appendChild(e)}}if(u.setAttribute("normal",new THREE.BufferAttribute(t.normal,3)),u.setAttribute("position",new THREE.BufferAttribute(t.position,3)),u.setAttribute("uv",new THREE.BufferAttribute(t.uvs,2)),n.getObject3D("mesh"))n.getObject3D("mesh").geometry=THREE.BufferGeometryUtils.toTrianglesDrawMode(u,THREE.TriangleStripDrawMode);else{const e=new THREE.Mesh(THREE.BufferGeometryUtils.toTrianglesDrawMode(u,THREE.TriangleStripDrawMode));n.setObject3D("mesh",e)}},getPointAt:function(e,t){e=this.songProgressToCurveProgress(e),this.curve.getPointAt(e,t)},getTangentAt:function(e,t){e=this.songProgressToCurveProgress(e),this.curve.getTangentAt(e,t)},getPositionRelativeToTangent:function(){const e=new THREE.Object3D,t=new THREE.Vector3,n=new THREE.Vector3;return function(r,i,o,a){this.curve;return e.parent||this.el.sceneEl.object3D.add(e),r<0?(this.getPointAt(0,e.position),this.getTangentAt(0,n),e.position.addScaledVector(n,r)):r>1?(this.getPointAt(1,e.position),this.getTangentAt(1,n),e.position.addScaledVector(n,r)):(this.getPointAt(r,e.position),this.getTangentAt(r,n)),a?e.lookAt(t.copy(e.position).sub(n)):e.lookAt(t.copy(e.position).add(n)),e.updateMatrixWorld(),o.copy(i),e.localToWorld(o),o}}(),alignToCurve:function(){new THREE.Vector3,new THREE.Vector3;const e=new THREE.Vector3(0,0,-.01),t=new THREE.Vector3;return function(n,r){this.getPositionRelativeToTangent(n,e,t),r.lookAt(t),r.position.y+=.01}}(),songProgressToCurveProgress:function(e){return e*this.length/this.fullLength},curveProgressToSongProgress:function(e){return e*this.fullLength/this.length}}),AFRAME.registerComponent("supercurve-follow",{schema:{enabled:{default:!1},speed:{type:"number"},target:{type:"selector"}},init:function(){this.curveProgress=0,this.songProgress=0},update:function(){this.supercurve=this.data.target.components.supercurve},tick:function(){new THREE.Vector3(0,0,1),new THREE.Vector3;return function(e,t){const n=this.data;this.el;if(!n.enabled||!t)return;if(this.curveProgress>=1)return;const r=this.supercurve,i=r.curve;if(!i)return;this.curveProgress=this.curveProgress||0;const o=n.speed*(t/1e3);if(this.curveProgress+=o/this.supercurve.fullLength,this.data.target.components.material.material.uniforms.cameraPercent.value=this.curveProgress,this.curveProgress>=1)return this.curveProgress=1,void(this.data.target.components.material.material.uniforms.cameraPercent.value=this.curveProgress);i.getPointAt(this.curveProgress,this.el.object3D.position),this.songProgress=r.curveProgressToSongProgress(this.curveProgress),r.alignToCurve(this.songProgress,this.el.object3D)}}()}),window.AFRAME){const t=["supercurve","supercurve-follow"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t){const n=THREE.Math,r=THREE.Vector3,i=THREE.Matrix4;function o(){this.type="Curve",this.arcLengthDivisions=200}var a,s,c;Object.assign(o.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(e,t){var n=this.getUtoTmapping(e);return this.getPoint(n,t)},getPoints:function(e,t){var n;void 0===e&&(e=5),t?(n=t).length=0:n=[];for(var r=0;r<=e;r++)n.push(this.getPoint(r/e));return n},getSpacedPoints:function(e,t){var n;void 0===e&&(e=5),t?(n=t).length=0:n=[];for(var r=0;r<=e;r++)n.push(this.getPointAt(r/e));return n},getLength:(c=[],function(){var e=this.getLengths(void 0,c);return e[e.length-1]}),getLengths:function(e,t){if(void 0===e&&(e=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1,t&&(t.length=0);var n,r,i=t||[],o=this.getPoint(0),a=0;for(i.push(0),r=1;r<=e;r++)a+=(n=this.getPoint(r/e)).distanceTo(o),i.push(a),o=n;return this.cacheArcLengths=i,i},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(e,t){var n,r=this.getLengths(),i=0,o=r.length;n=t||e*r[o-1];for(var a,s=0,c=o-1;s<=c;)if((a=r[i=Math.floor(s+(c-s)/2)]-n)<0)s=i+1;else{if(!(a>0)){c=i;break}c=i-1}if(r[i=c]===n)return i/(o-1);var l=r[i];return(i+(n-l)/(r[i+1]-l))/(o-1)},getTangent:(a=new THREE.Vector3,s=new THREE.Vector3,function(e,t){var n,r=e-1e-4,i=e+1e-4;return r<0&&(r=0),i>1&&(i=1),this.getPoint(r,a),this.getPoint(i,s),t?(n=t).copy(s).sub(a):n=s.clone().sub(a),n.normalize()}),getTangentAt:function(e,t){var n=this.getUtoTmapping(e);return this.getTangent(n,t)},computeFrenetFrames:function(e,t){var o,a,s,c=new r,l=[],u=[],h=[],d=new r,p=new i;for(o=0;o<=e;o++)a=o/e,l[o]=this.getTangentAt(a),l[o].normalize();u[0]=new r,h[0]=new r;var f=Number.MAX_VALUE,m=Math.abs(l[0].x),g=Math.abs(l[0].y),y=Math.abs(l[0].z);for(m<=f&&(f=m,c.set(1,0,0)),g<=f&&(f=g,c.set(0,1,0)),y<=f&&c.set(0,0,1),d.crossVectors(l[0],c).normalize(),u[0].crossVectors(l[0],d),h[0].crossVectors(l[0],u[0]),o=1;o<=e;o++)u[o]=u[o-1].clone(),h[o]=h[o-1].clone(),d.crossVectors(l[o-1],l[o]),d.length()>Number.EPSILON&&(d.normalize(),s=Math.acos(n.clamp(l[o-1].dot(l[o]),-1,1)),u[o].applyMatrix4(p.makeRotationAxis(d,s))),h[o].crossVectors(l[o],u[o]);if(!0===t)for(s=Math.acos(n.clamp(u[0].dot(u[e]),-1,1)),s/=e,l[0].dot(d.crossVectors(u[0],u[e]))>0&&(s=-s),o=1;o<=e;o++)u[o].applyMatrix4(p.makeRotationAxis(l[o],s*o)),h[o].crossVectors(l[o],u[o]);return{tangents:l,normals:u,binormals:h}},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this},toJSON:function(){var e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e},fromJSON:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}),THREE.Curve=o},function(e,t){const n=THREE.Vector3,r=THREE.Curve;function i(){var e=0,t=0,n=0,r=0;function i(i,o,a,s){e=i,t=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(e,t,n,r,o){i(t,n,o*(n-e),o*(r-t))},initNonuniformCatmullRom:function(e,t,n,r,o,a,s){var c=(t-e)/o-(n-e)/(o+a)+(n-t)/a,l=(n-t)/a-(r-t)/(a+s)+(r-n)/s;i(t,n,c*=a,l*=a)},calc:function(i){var o=i*i;return e+t*i+n*o+r*(o*i)}}}var o=new n,a=new i,s=new i,c=new i;function l(e,t,n,i){r.call(this),this.type="CatmullRomCurve3",this.points=e||[],this.closed=t||!1,this.curveType=n||"centripetal",this.tension=i||.5}l.prototype=Object.create(r.prototype),l.prototype.constructor=l,l.prototype.isCatmullRomCurve3=!0,l.prototype.getPoint=function(e,t){var r,i,l,u,h=t||new n,d=this.points,p=d.length,f=(p-(this.closed?0:1))*e,m=Math.floor(f),g=f-m;if(this.closed?m+=m>0?0:(Math.floor(Math.abs(m)/p)+1)*p:0===g&&m===p-1&&(m=p-2,g=1),this.closed||m>0?r=d[(m-1)%p]:(o.subVectors(d[0],d[1]).add(d[0]),r=o),i=d[m%p],l=d[(m+1)%p],this.closed||m+2<p?u=d[(m+2)%p]:(o.subVectors(d[p-1],d[p-2]).add(d[p-1]),u=o),"centripetal"===this.curveType||"chordal"===this.curveType){var y="chordal"===this.curveType?.5:.25,v=Math.pow(r.distanceToSquared(i),y),b=Math.pow(i.distanceToSquared(l),y),_=Math.pow(l.distanceToSquared(u),y);b<1e-4&&(b=1),v<1e-4&&(v=b),_<1e-4&&(_=b),a.initNonuniformCatmullRom(r.x,i.x,l.x,u.x,v,b,_),s.initNonuniformCatmullRom(r.y,i.y,l.y,u.y,v,b,_),c.initNonuniformCatmullRom(r.z,i.z,l.z,u.z,v,b,_)}else"catmullrom"===this.curveType&&(a.initCatmullRom(r.x,i.x,l.x,u.x,this.tension),s.initCatmullRom(r.y,i.y,l.y,u.y,this.tension),c.initCatmullRom(r.z,i.z,l.z,u.z,this.tension));return h.set(a.calc(g),s.calc(g),c.calc(g)),h},l.prototype.copy=function(e){r.prototype.copy.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var i=e.points[t];this.points.push(i.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},l.prototype.toJSON=function(){var e=r.prototype.toJSON.call(this);e.points=[];for(var t=0,n=this.points.length;t<n;t++){var i=this.points[t];e.points.push(i.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e},l.prototype.fromJSON=function(e){r.prototype.fromJSON.call(this,e),this.points=[];for(var t=0,i=e.points.length;t<i;t++){var o=e.points[t];this.points.push((new n).fromArray(o))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},THREE.CatmullRomCurve3=l},function(e,t,n){if(AFRAME.registerShader("superCutFxShader",{schema:{startTime:{type:"float",is:"uniform"},timeMs:{type:"time",is:"uniform"},color:{type:"color",is:"uniform"}},vertexShader:"\n varying vec2 uvs;\n varying vec3 worldPos;\n void main() {\n uvs.xy = uv.xy;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }\n ",fragmentShader:"\n uniform float startTime;\n uniform float timeMs;\n uniform vec3 color;\n varying vec2 uvs;\n varying vec3 worldPos;\n\n void main() {\n float time = (timeMs - startTime) / 2000.0;\n vec2 p = uvs.xy - 0.5;\n float r = p.x * p.x + p.y * p.y;\n float alpha = 1.0 - smoothstep(time - 0.01, time, r);\n alpha *= smoothstep(time - 0.1, time, r);\n alpha *= 1.0 - time * 5.5;\n gl_FragColor = vec4(color, alpha);\n }\n "}),window.AFRAME){const t=[],n=["superCutFxShader"],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r=new THREE.Color;if(AFRAME.registerComponent("supercutfx",{schema:{colorPrimary:{type:"string"},colorSecondary:{type:"string"}},init:function(){this.rigEl=document.getElementById("curveFollowRig"),this.startTime=-1100},createSuperCut:function(e,t){const n=this.el,i=this.el.getObject3D("mesh");i.material.transparent=!0,this.rigEl.object3D.worldToLocal(n.object3D.position.copy(e.position)),n.object3D.position.z-=.25,n.object3D.visible=!0,this.startTime=n.sceneEl.time,r.set("red"===t?this.data.colorPrimary:this.data.colorSecondary);const o=i.material.uniforms.color.value;o.x=r.r,o.y=r.g,o.z=r.b,i.material.uniforms.startTime.value=this.startTime-50,n.play()},tick:function(e){e>this.startTime+1e3&&(this.el.object3D.visible=!1,this.el.pause())}}),window.AFRAME){const t=["supercutfx"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("tail",{schema:{height:{default:.1},segments:{default:10,type:"int"},target:{type:"selector"},width:{default:1}},init:function(){const e=this.data,t=this.geometry=new THREE.PlaneBufferGeometry(e.width,e.height,e.segments,1);t.deleteAttribute("normal"),t.translate(e.width/2,0,0);const n=this.el.sceneEl.systems.materials.handStarTrail,r=new THREE.Mesh(t,n);r.frustumCulled=!1,this.el.setObject3D("mesh",r),this.positions=t.attributes.position.array,this.numVerts=2*e.segments+2,this.geometry=t,this.target=e.target.object3D,this.targetPos=new THREE.Vector3},tick:function(e,t){const n=this.positions,r=this.targetPos;let i,o=this.numVerts/2*3,a=this.data.height/2;for(let e=this.numVerts/2-1;e>0;e--)i=3*e,n[i]=n[i-3],n[i+1]=n[i-2],n[i+2]=n[i-1],i+=o,n[i]=n[i-3],n[i+1]=n[i-2],n[i+2]=n[i-1];this.target.getWorldPosition(r),n[0]=r.x,n[1]=r.y+a,n[2]=r.z-.1,n[o+0]=r.x,n[o+1]=r.y-a,n[o+2]=r.z-.1,this.geometry.attributes.position.needsUpdate=!0}}),window.AFRAME){const t=["tail"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("text-counter",{dependencies:["text"],schema:{decimals:{default:0},dur:{default:2e3,type:"int"},enabled:{default:!1},emit:{default:!1},prefix:{default:""},suffix:{default:""},value:{default:0,type:"float"}},init:function(){this.currentValue=0,this.hasCompleted=!1,this.textValue={value:""}},update:function(e){this.currentValue=0,this.textValue.value=`${this.data.prefix}${this.decimals(0)}${this.data.suffix}`,this.el.setAttribute("text",this.textValue),this.hasCompleted=!1},tick:function(e,t){this.data.enabled&&!this.hasCompleted&&(this.currentValue+=this.data.value*(t/this.data.dur),this.currentValue>=this.data.value&&(this.currentValue=this.data.value,this.data.emit&&this.el.emit("textcounterdone",null,!1),this.hasCompleted=!0),this.textValue.value=`${this.data.prefix}${this.decimals(this.currentValue)}${this.data.suffix}`,this.el.setAttribute("text",this.textValue))},decimals:function(e){var t=Math.pow(10,this.data.decimals);return(parseInt(e*t)/t).toFixed(this.data.decimals)}}),window.AFRAME){const t=["text-counter"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("text-truncate",{schema:{value:{type:"string"},length:{type:"int",default:10}},update:function(){this.el.setAttribute("text","value",function(e,t){if(!e)return"";if(e.length>=t)return e.substring(0,t-3)+"...";return e}(this.data.value,this.data.length))}}),window.AFRAME){const t=["text-truncate"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("text-uppercase",{schema:{value:{type:"string"}},update:function(){this.el.setAttribute("text","value",this.data.value.toUpperCase())}}),window.AFRAME){const t=["text-uppercase"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("toggle-pause-play",{schema:{isPlaying:{default:!1}},update:function(){const e=this.data.isPlaying?"pause":"play";parent.postMessage(JSON.stringify({verify:"game-action",action:e}),"*")}}),window.AFRAME){const t=["toggle-pause-play"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){"use strict";n.r(t);var r=n(0),i=n.n(r);if(AFRAME.registerComponent("trail",{schema:{color:{default:"primary"},colorScheme:{default:"default"},enabled:{default:!1},hand:{type:"string"}},init:function(){const e=this.geometry=new THREE.BufferGeometry,t=this.maxPoints=12,n=this.vertices=new Float32Array(36*t),r=this.colors=new Float32Array(48*t);this.bladeColor={alpha:1},this.rigContainer=document.getElementById("rigContainer"),this.bladeEl=this.el.querySelector(".blade"),this.layers=0,this.bladeTrajectory=[{top:new THREE.Vector3(-.5,0,0),center:new THREE.Vector3(0,0,0),bottom:new THREE.Vector3(.5,0,0)},{top:new THREE.Vector3(-.5,.5,0),center:new THREE.Vector3(0,.5,0),bottom:new THREE.Vector3(.5,.5,0)},{top:new THREE.Vector3(-.5,1,0),center:new THREE.Vector3(0,1,0),bottom:new THREE.Vector3(.5,1,0)}],this.newSample=null,e.setAttribute("position",new THREE.BufferAttribute(n,3).setUsage(THREE.DynamicDrawUsage)),e.setAttribute("vertexColor",new THREE.BufferAttribute(r,4).setUsage(THREE.DynamicDrawUsage));const i=new THREE.ShaderMaterial({side:THREE.DoubleSide,vertexColors:THREE.VertexColors,transparent:!0,depthTest:!1,blending:THREE.AdditiveBlending,vertexShader:["varying vec4 vColor;","attribute vec4 vertexColor;","void main() {","vec4 modelViewPosition = modelViewMatrix * vec4(position, 1.0);","vColor = vertexColor;","gl_Position = projectionMatrix * modelViewPosition;","}"].join(""),fragmentShader:["varying vec4 vColor;","uniform float pulse;","void main() {","gl_FragColor = vec4(vColor.xyz, vColor.a + pulse);","}"].join(""),uniforms:{pulse:{value:0}}}),o=this.mesh=new THREE.Mesh(e,i);o.frustumCulled=!1,o.vertices=n,this.rigContainer.setObject3D("trail__"+this.data.hand,o)},update:function(e){if(this.mesh.visible=this.data.enabled,!e.enabled&&this.data.enabled&&(this.enabledTime=this.el.sceneEl.time),e.colorScheme!==this.data.colorScheme){this.bladeColor=new THREE.Color(i.a.schemes[this.data.colorScheme][this.data.color]);this.bladeColor.red=this.bladeColor.r,this.bladeColor.green=this.bladeColor.g,this.bladeColor.blue=this.bladeColor.b}},tock:function(e,t){this.data.enabled&&(!this.mesh.visible&&e>this.enabledTime+250&&(this.mesh.visible=!0),this.mesh.material.uniforms.pulse.value*=.9,this.sampleBladePosition())},pulse:function(){this.mesh.material.uniforms.pulse.value=1},addLayer:function(e){const t=this.bladeColor,n=this.colors,r=this.segments,i=this.vertices;let o=2/r;this.layers>=this.maxLayers&&(this.layers=0);const a=this.layers*e;e=a+e;const s=this.layers*r*18,c=this.layers*r*24;for(let l=0;l<r;++l)i[s+18*l]=l*o-1,i[s+18*l+1]=a,i[s+18*l+2]=0,n[c+24*l]=t.red,n[c+24*l+1]=t.green,n[c+24*l+2]=t.blue,n[c+24*l+3]=t.alpha,i[s+18*l+3]=l*o-1,i[s+18*l+4]=e,i[s+18*l+5]=0,n[c+24*l+4]=t.red,n[c+24*l+5]=t.green,n[c+24*l+6]=t.blue,n[c+24*l+7]=t.alpha,i[s+18*l+6]=l*o-1+o,i[s+18*l+7]=e,i[s+18*l+8]=0,n[c+24*l+8]=t.red,n[c+24*l+9]=t.green,n[c+24*l+10]=t.blue,n[c+24*l+11]=t.alpha,i[s+18*l+9]=l*o-1+o,i[s+18*l+10]=a,i[s+18*l+11]=0,n[c+24*l+12]=t.red,n[c+24*l+13]=t.green,n[c+24*l+14]=t.blue,n[c+24*l+15]=t.alpha,i[s+18*l+12]=l*o-1,i[s+18*l+13]=a,i[s+18*l+14]=0,n[c+24*l+16]=t.red,n[c+24*l+17]=t.green,n[c+24*l+18]=t.blue,n[c+24*l+19]=t.alpha,i[s+18*l+15]=l*o-1+o,i[s+18*l+16]=e,i[s+18*l+17]=0,n[c+24*l+20]=t.red,n[c+24*l+21]=t.green,n[c+24*l+22]=t.blue,n[c+24*l+23]=t.alpha;this.layers++,this.geometry.attributes.position.needsUpdate=!0,this.geometry.attributes.vertexColor.needsUpdate=!0,this.geometry.attributes.uv.needsUpdate=!0},initGeometry:function(){const e=this.bladeColor,t=this.geometry.attributes.vertexColor.array,n=this.geometry.attributes.position.array,r=this.bladeTrajectory;let i,o,a;for(let s=1;s<r.length;s++){1===s&&(o=i),i=1-(r.length-s)/r.length;const c=r[s];a=r[s-1],n[36*s]=a.center.x,n[36*s+1]=a.center.y,n[36*s+2]=a.center.z,t[48*s]=e.red,t[48*s+1]=e.green,t[48*s+2]=e.blue,t[48*s+3]=.2*o,n[36*s+3]=c.top.x,n[36*s+4]=c.top.y,n[36*s+5]=c.top.z,t[48*s+4]=e.red,t[48*s+5]=e.green,t[48*s+6]=e.blue,t[48*s+7]=i,n[36*s+6]=a.top.x,n[36*s+7]=a.top.y,n[36*s+8]=a.top.z,t[48*s+8]=e.red,t[48*s+9]=e.green,t[48*s+10]=e.blue,t[48*s+11]=o,n[36*s+9]=a.center.x,n[36*s+10]=a.center.y,n[36*s+11]=a.center.z,t[48*s+12]=e.red,t[48*s+13]=e.green,t[48*s+14]=e.blue,t[48*s+15]=.2*o,n[36*s+12]=c.center.x,n[36*s+13]=c.center.y,n[36*s+14]=c.center.z,t[48*s+16]=e.red,t[48*s+17]=e.green,t[48*s+18]=e.blue,t[48*s+19]=.2*i,n[36*s+15]=c.top.x,n[36*s+16]=c.top.y,n[36*s+17]=c.top.z,t[48*s+20]=e.red,t[48*s+21]=e.green,t[48*s+22]=e.blue,t[48*s+23]=i,n[36*s+18]=a.bottom.x,n[36*s+19]=a.bottom.y,n[36*s+20]=a.bottom.z,t[48*s+24]=e.red,t[48*s+25]=e.green,t[48*s+26]=e.blue,t[48*s+27]=0,n[36*s+21]=c.center.x,n[36*s+22]=c.center.y,n[36*s+23]=c.center.z,t[48*s+28]=e.red,t[48*s+29]=e.green,t[48*s+30]=e.blue,t[48*s+31]=.2*i,n[36*s+24]=a.center.x,n[36*s+25]=a.center.y,n[36*s+26]=a.center.z,t[48*s+32]=e.red,t[48*s+33]=e.green,t[48*s+34]=e.blue,t[48*s+35]=.2*o,n[36*s+27]=a.bottom.x,n[36*s+28]=a.bottom.y,n[36*s+29]=a.bottom.z,t[48*s+36]=e.red,t[48*s+37]=e.green,t[48*s+38]=e.blue,t[48*s+39]=0,n[36*s+30]=c.bottom.x,n[36*s+31]=c.bottom.y,n[36*s+32]=c.bottom.z,t[48*s+40]=e.red,t[48*s+41]=e.green,t[48*s+42]=e.blue,t[48*s+43]=0,n[36*s+33]=c.center.x,n[36*s+34]=c.center.y,n[36*s+35]=c.center.z,t[48*s+44]=e.red,t[48*s+45]=e.green,t[48*s+46]=e.blue,t[48*s+47]=.2*i,o=i}this.geometry.attributes.position.needsUpdate=!0,this.geometry.attributes.vertexColor.needsUpdate=!0},sampleBladePosition:function(){let e;this.bladeTrajectory.length===this.maxPoints?(e=this.newSample=this.bladeTrajectory.shift(),e.top.set(0,-.5,0),e.center.set(0,0,0),e.bottom.set(0,.5,0)):this.newSample?(this.newSample.top.set(0,-.5,0),this.newSample.center.set(0,0,0),this.newSample.bottom.set(0,.5,0),e=this.newSample):e={top:new THREE.Vector3(0,-.5,0),center:new THREE.Vector3(0,0,0),bottom:new THREE.Vector3(0,.5,0)};const t=this.bladeEl.object3D;t.localToWorld(e.top),t.localToWorld(e.center),t.localToWorld(e.bottom),this.rigContainer.object3D.worldToLocal(e.top),this.rigContainer.object3D.worldToLocal(e.center),this.rigContainer.object3D.worldToLocal(e.bottom),this.bladeTrajectory.push(e),this.initGeometry()}}),window.AFRAME){const t=["trail"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("tunnels",{dependencies:["pool_tunnels"],schema:{isPlaying:{default:!1},songDuration:{default:0}},init:function(){this.addTunnel=this.addTunnel.bind(this),this.clearTunnels=this.clearTunnels.bind(this),this.curveEl=document.getElementById("curve"),this.curveFollowRig=document.getElementById("curveFollowRig"),this.timeout=0,this.tunnels=[],this.tick=AFRAME.utils.throttleTick(this.tick.bind(this),1e3),this.el.addEventListener("cleargame",this.clearTunnels),this.el.addEventListener("gamemenuexit",this.clearTunnels),this.el.addEventListener("gamemenurestart",this.clearTunnels)},update:function(e){!e.isPlaying&&this.data.isPlaying&&this.requestTunnel(),e.isPlaying&&!this.data.isPlaying&&this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},play:function(){this.pool=this.el.components.pool__tunnels},requestTunnel:function(){this.timeout=setTimeout(this.addTunnel,Math.floor(3e3+1e4*Math.random()))},addTunnel:function(){const e=this.pool.requestEntity();if(!e)return;e.setAttribute("render-order","tunnel"),e.object3D.visible=!0;const t=this.curveEl.components.supercurve;let n=(this.el.components.song.getCurrentTime()+20)/this.data.songDuration;n>1&&(n=1),t.getPointAt(n,e.object3D.position),t.alignToCurve(n,e.object3D),e.play(),this.tunnels.push(e),this.requestTunnel()},clearTunnels:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null);for(let e=0;e<this.tunnels.length;e++)this.tunnels[e].object3D.visible=!1,this.pool.returnEntity(this.tunnels[e]);this.tunnels.length=0},tick:function(e,t){if(0!=this.tunnels.length)for(let e=0;e<this.tunnels.length;e++){if(!(this.tunnels[e].object3D.position.z>this.curveFollowRig.object3D.position.z+5))return;{const t=this.tunnels.splice(e,1)[0];t.object3D.visible=!1,this.pool.returnEntity(t)}}}}),window.AFRAME){const t=["tunnels"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){var r=new THREE.Color;if(AFRAME.registerComponent("vertex-colors-buffer",{schema:{baseColor:{type:"color"},itemSize:{default:3}},update:function(e){var t,n,i,o,a=this.data,s=this.el,c=this;if((o=this.el.getObject3D("mesh"))&&o.geometry)if((i=o.geometry).attributes.position){for(i.attributes.color||i.setAttribute("color",new THREE.BufferAttribute(new Float32Array(i.attributes.position.array.length),3)),t=i.attributes.color.array,r.set(a.baseColor),n=0;n<t.length;n+=a.itemSize)t[n]=r.r,t[n+1]=r.g,t[n+2]=r.b;i.attributes.color.needsUpdate=!0}else console.warn("Geometry has no vertices",s);else s.addEventListener("object3dset",(function t(n){"mesh"===n.detail.type&&(s.removeEventListener("object3dset",t),c.update(e))}))}}),window.AFRAME){const t=["vertex-colors-buffer"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("victory-accuracy-ring",{dependencies:["geometry","material"],schema:{accuracy:{default:0}},update:function(){this.el.getObject3D("mesh").material.uniforms.progress.value=0,this.el.setAttribute("animation","to",this.data.accuracy/100),this.el.components.animation.beginAnimation()}}),window.AFRAME){const t=["victory-accuracy-ring"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r={sphericalEnvMap:"",roughness:.8,metalness:.4},i={sphericalEnvMap:"#envmapImg",roughness:.2,metalness:.6};if(AFRAME.registerComponent("victory-rank",{schema:{isVictory:{default:!1},rank:{type:"string"}},update:function(e){const t=this.el,n=this.data.rank;if(e.isVictory&&!this.data.isVictory&&this.el.object3D.scale.set(.001,.001,.001),n)switch(t.setAttribute("text-geometry","value",n),n[0]){case"S":t.setAttribute("material",Object.assign({color:"#F0e077"},i));break;case"A":t.setAttribute("material",Object.assign({color:"#6FF9EA"},i));break;case"B":t.setAttribute("material",Object.assign({color:"#F8d"},i));break;case"C":t.setAttribute("material",Object.assign({color:"#F971C3"},r));break;case"D":t.setAttribute("material",Object.assign({color:"#1E6269"},r));break;case"F":t.setAttribute("material",Object.assign({color:"#e3170a"},r))}}}),window.AFRAME){const t=["victory-rank"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("visible-raycastable",{schema:{default:!0},update:function(){this.el.object3D.visible=this.data,this.data?this.el.setAttribute("raycastable",""):this.el.removeAttribute("raycastable","")}}),window.AFRAME){const t=["visible-raycastable"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r=n(0);if(AFRAME.registerShader("wallShader",{schema:{colorTertiary:{type:"color",is:"uniform",default:r.initial.tertiary},environment:{type:"map",is:"uniform",default:"#envmapImg"},hitLeft:{type:"vec3",is:"uniform",default:{x:0,y:9e3,z:0}},hitRight:{type:"vec3",is:"uniform",default:{x:0,y:9e3,z:0}},iTime:{type:"time",is:"uniform"},opacity:{type:"number",is:"uniform"}},vertexShader:n(192),fragmentShader:n(193)}),window.AFRAME){const t=[],n=["wallShader"],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t){e.exports="varying vec2 uvs;\nvarying vec3 nrml;\nvarying vec3 worldPos;\n\nvoid main() {\n uvs.xy = uv.xy;\n nrml.xyz = normal.xyz;\n vec4 p = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n worldPos = (modelMatrix * vec4( position, 1.0 )).xyz;\n gl_Position = p;\n}\n"},function(e,t){e.exports="uniform float iTime;\nuniform float opacity;\nuniform sampler2D environment;\nuniform vec3 colorTertiary;\nuniform vec3 hitLeft;\nuniform vec3 hitRight;\nvarying vec2 uvs;\nvarying vec3 nrml;\nvarying vec3 worldPos;\n\n#define SEED 19.1252\n#define time (3.0 + iTime) / 1000.0\n\nfloat noise(vec3 uv) {\n return fract(sin(uv.x*123243. + uv.y*424. + uv.z*642. + SEED) * 1524.);\n}\n\nvec4 drawHit(vec3 p, vec3 center, vec3 color) {\n center.z -= 0.1;\n float dist = 1.0 - smoothstep(0.0, 0.3, length(p - center));\n float glitch = noise(floor(p*3.0)) * 0.06 - 0.03;\n float alpha = 1.0 - smoothstep(0.0, 0.01, abs(p.z-center.z + glitch));\n alpha += 1.0 - smoothstep(0.0, 0.01, abs(p.y-center.y + glitch));\n return vec4(color * dist, alpha * dist + alpha);\n}\n\nvoid main() {\n vec2 uv1 = uvs.xy-0.5;\n float alpha = 0.0;\n // border\n alpha += smoothstep(0.44, 0.50, abs(uv1.x));\n alpha += smoothstep(0.44, 0.50, abs(uv1.y));\n alpha += smoothstep(0.486, 0.49, abs(uv1.x));\n alpha += smoothstep(0.486, 0.49, abs(uv1.y));\n alpha = min(1.0, alpha * 0.5);\n\n // weapon collision\n vec4 hit;\n hit = drawHit(worldPos, hitRight, colorTertiary);\n hit += drawHit(worldPos, hitLeft, colorTertiary);\n\n // reflection\n vec3 ray = reflect(normalize(cameraPosition - worldPos + sin(worldPos.z) * 0.1 + cos(worldPos.z * 0.3) * 0.3), nrml);\n float m = 2.0 * sqrt(pow(ray.x, 2.0) + pow(ray.y, 2.0) + pow(ray.z, 2.0));\n vec2 uv = ray.xy / m + 0.5;\n vec3 col = texture2D(environment, uv).rgb * 0.3;\n\n gl_FragColor = vec4(mix(col, colorTertiary, alpha) + hit.rgb, (alpha * 0.2 + 0.8) * opacity + hit.a);\n}\n"},function(e,t,n){"use strict";n.r(t);n(24);if(AFRAME.registerComponent("wall",{dependencies:["material"],init:function(){this.curveEl=document.getElementById("curve"),this.curveFollowRig=document.getElementById("curveFollowRig"),this.el.setObject3D("mesh",new THREE.Mesh),this.geometry=null,this.isCeiling=!1,this.isRaycastable=!1,this.localPosition=new THREE.Vector3,this.songPosition=void 0,this.tick=AFRAME.utils.throttleTick(this.tick.bind(this),1e3)},play:function(){this.el.object3D.visible=!0},tick:function(e,t){const n=this.curveFollowRig.components["supercurve-follow"].songProgress;!this.isRaycastable&&n+.01>=this.songPosition&&(this.isRaycastable=!0,this.el.setAttribute("data-wall-active",""),this.isCeiling||(this.el.setAttribute("data-weapon-particles",""),this.el.setAttribute("raycastable-game",""))),n>=this.backPosition+.01&&this.returnToPool()},onGenerate:function(e,t,n,r,i,o){const a=this.el;this.isCeiling=i,this.backPosition=o,this.songPosition=e,this.setWallGeometry(e,t,n,r,i),a.getObject3D("mesh").material.uniforms.opacity.value=0,a.object3D.position.y=-5,a.components.animation__fadein.beginAnimation(),a.components.animation__scalein.beginAnimation()},setWallGeometry:function(){const e=new THREE.Vector3,t=new THREE.Vector3,n=new THREE.Vector3;return function(r,i,o,a,s){const c=this.el.sceneEl.components["beat-system"],l=this.curveEl.components.supercurve,u=r,h=r+a/l.length,d=s?1.5:2.5,p=-1*c.horizontalPositions[i]-o/2+.25;t.x=p-o/2,n.x=p+o/2;const f=(this.geometry=new THREE.BoxBufferGeometry(o,d,1,1,1,30)).attributes.position.array;for(let r=0;r<f.length;r+=3){const i=f[r+2]+.5;l.getPositionRelativeToTangent(u+i*(h-u),f[r]<0?t:n,e),f[r]=e.x,f[r+1]+=e.y+d/2,f[r+2]=e.z}let m=c.verticalPositions.middle+c.size/2;"punch"===c.data.gameMode&&(m-=.1),this.el.getObject3D("mesh").geometry=this.geometry,this.el.getObject3D("mesh").position.y=s?m:.1}}(),returnToPool:function(){this.el.object3D.visible=!1,this.el.removeAttribute("data-weapon-particles"),this.el.removeAttribute("data-wall-active"),this.el.removeAttribute("raycastable-game"),this.isCeiling=!1,this.isRaycastable=!1,this.el.isPlaying&&this.el.sceneEl.components.pool__wall.returnEntity(this.el),this.geometry&&this.geometry.dispose()}}),window.AFRAME){const t=["wall"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r={direction:{x:0,y:-.25,z:-1}},i={direction:{x:0,y:1,z:-1}};if(AFRAME.registerComponent("weapon-particles",{schema:{enabled:{default:!1},gameMode:{default:""},hand:{type:"string"}},init:function(){this.hiddenIntersection={x:999,y:0,z:0},this.intersectedEl=null,this.weaponEnter=this.weaponEnter.bind(this),this.weaponLeave=this.weaponLeave.bind(this)},update:function(e){e.gameMode!==this.data.gameMode&&this.el.setAttribute("raycaster__game","punch"===this.data.gameMode?r:i)},pause:function(){this.el.removeEventListener("mouseenter",this.weaponEnter),this.el.removeEventListener("mouseleave",this.weaponLeave)},play:function(){this.el.addEventListener("mouseenter",this.weaponEnter),this.el.addEventListener("mouseleave",this.weaponLeave)},weaponEnter:function(e){this.data.enabled&&e.target===this.el&&e.detail.intersectedEl.hasAttribute("data-weapon-particles")&&(this.intersectedEl=e.detail.intersectedEl)},weaponLeave:function(e){if(e.detail.target===this.el){if(this.intersectedEl.components.wall||"floor"===this.intersectedEl.id){const e=this.data.hand===RIGHT?"hitRight":"hitLeft";this.intersectedEl.getObject3D("mesh").material.uniforms[e].value=this.hiddenIntersection}this.intersectedEl=null}},tick:function(e,t){if(!this.data.enabled||!this.intersectedEl)return;const n=this.el.components.raycaster__game.getIntersection(this.intersectedEl);if(n&&(this.intersectedEl.components.wall||"floor"===this.intersectedEl.id)){const e="right"===this.data.hand?"hitRight":"hitLeft";this.intersectedEl.getObject3D("mesh").material.uniforms[e].value=n.point}}}),window.AFRAME){const t=["weapon-particles"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){AFRAME.registerComponent("zip-loader",{schema:{difficulties:{type:"array"},isLoading:{default:"false"},version:{type:"string"},directDownload:{type:"string"},bpm:{type:"number"}},init:function(){this.loadingIndicator=document.getElementById("zipLoaderIndicator"),this.cachedZip=null,this.cachedVersion=null,this.message={},this.worker=new Worker("build/zip.js"),this.worker.onmessage=this.onMessage.bind(this),this.worker.onerror=console.error},update:function(e){const t=this.data;e.version&&e.version!==t.version&&this.cachedVersion!==t.version&&(this.message.abort=!0,this.message.difficulties=JSON.stringify(this.data.difficulties),this.message.version=e.version,this.message.directDownload=this.data.directDownload,this.message.bpm=this.data.bpm,this.message.hash=this.data.hash,this.worker.postMessage(this.message)),t.version&&e.version!==t.version&&(this.cachedVersion=null,this.cachedZip=null,this.fetchZip(t.version)),e.isLoading||!this.data.isLoading||this.cachedVersion!==this.data.version||this.cachedZip||this.el.emit("songloaderror")},fetchZip:function(e){this.el.emit("ziploaderstart",null,!1),this.message.abort=!1,this.message.difficulties=JSON.stringify(this.data.difficulties),this.message.version=e,this.message.directDownload=this.data.directDownload,this.message.bpm=this.data.bpm,this.message.hash=this.data.hash,this.worker.postMessage(this.message)},onMessage:function(e){switch(e.data.message){case"error":this.el.emit("songloaderror");break;case"progress":if(e.data.version!==this.data.version)return;this.loadingIndicator.setAttribute("material","progress",e.data.progress);break;case"load":{let t;this.cachedVersion=e.data.version,this.cachedZip=e.data.data;const n=e.data.data.beats;for(t in n)break;if(!t)return this.cachedZip=null,void(e.data.version===this.data.version&&this.el.emit("songloaderror"));e.data.version===this.data.version&&this.el.emit("ziploaderend",e.data.data,!1);break}}}});if(window.AFRAME){const t=["zip-loader"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){var r={"./index.js":198};function i(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=197},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r);n(6);const a=n(29),s={};let c=!1;const l={Easy:"Easy",Expert:"Expert",ExpertPlus:"Expert+",Hard:"Hard",Normal:"Normal"},u={},h={author:"Juancho Pancho",difficulty:"Expert",id:"31",image:"assets/img/molerat.jpg",songDuration:100,songName:"Friday",songLength:100,songSubName:"Rebecca Black"},d="true"===AFRAME.utils.getUrlParameter("skipintro"),p=localStorage.getItem("colorScheme")||"blue";let f=localStorage.getItem("favorites-v2");if(f)try{f=JSON.parse(f)}catch(e){f=[]}else f=[];function m(e){let t=Math.ceil(e.search.results.length/6);e.search.hasPrev=e.search.page>0,e.search.hasNext=e.search.page<t-1,e.search.songNameTexts="",e.search.songSubNameTexts="",e.searchResultsPage.length=0,e.searchResultsPage.__dirty=!0;for(let t=6*e.search.page;t<6*e.search.page+6;t++){const n=e.search.results[t];if(!n)break;e.searchResultsPage.push(n),e.search.songNameTexts+=g(n.metadata.songName,22).toUpperCase()+"\n",e.search.songSubNameTexts+=g(n.metadata.songSubName||n.metadata.songAuthorName||"Unknown Artist",32)+"\n"}for(let t=0;t<e.searchResultsPage.length;t++)e.searchResultsPage[t].index=t;E(e)}function g(e,t){return e?e.length>=t?e.substring(0,t-3)+"...":e:""}AFRAME.registerState({nonBindedStateKeys:["genres"],initialState:{activeHand:localStorage.getItem("hand")||"right",challenge:{audio:"",author:"",difficulty:"",beatmapCharacteristic:"",id:AFRAME.utils.getUrlParameter("challenge"),image:"",isBeatsPreloaded:!1,numBeats:void 0,songDuration:0,songName:"",songNameShort:"",songSubName:"",metadata:{}},colorPrimary:o.a.schemes[p].primary,colorScheme:p,colorSecondary:o.a.schemes[p].secondary,colorSecondaryBright:o.a.schemes[p].secondarybright,colorTertiary:o.a.schemes[p].tertiary,controllerType:"",damage:0,difficultyFilter:"All",difficultyFilterMenuOpen:!1,favorites:f,gameMode:"ride",genre:"",genres:n(199),genreMenuOpen:!1,has3DOFVR:!1,has6DOFVR:!1,hasSongLoadError:!1,hasVR:AFRAME.utils.device.checkHeadsetConnected()||"true"===AFRAME.utils.getUrlParameter("debugvr"),introActive:!d,inVR:"true"===AFRAME.utils.getUrlParameter("debugvr"),isIOS:AFRAME.utils.device.isIOS(),isGameOver:!1,isLoading:!1,isMenuOpening:!d,isPaused:!1,isPlaying:!1,isSearching:!1,isSongProcessing:!1,isVictory:!1,isZipFetching:!1,leaderboard:[],leaderboardFetched:!1,leaderboardQualified:!1,leaderboardNames:"",leaderboardScores:"",mainMenuActive:!1,menuActive:d,multiplayer:{active:!1,lobbyOpen:!1,roomCode:"",shareUrl:"",shareCopied:!1,isHost:!1,uid:"",status:"idle",players:[],playerCount:0,readyCount:0,everyoneReady:!1,myReady:!1,myRank:0,myRankText:"",leaderName:"",leaderScore:0,scoreDelta:0,scoreDeltaText:"",opponentText:"",opponentScores:"",hostName:"",hostUid:"",songName:"",lastError:"",joinCodeInput:"",countdownText:"",countdownActive:!1,keyboardOpen:!1,nameKeyboardOpen:!1,nameInput:"",row0Name:"",row0Score:"",row0Visible:!1,row0IsMe:!1,row0IsHost:!1,row0Ready:!1,row1Name:"",row1Score:"",row1Visible:!1,row1IsMe:!1,row1IsHost:!1,row1Ready:!1,row2Name:"",row2Score:"",row2Visible:!1,row2IsMe:!1,row2IsHost:!1,row2Ready:!1,row3Name:"",row3Score:"",row3Visible:!1,row3IsMe:!1,row3IsHost:!1,row3Ready:!1,resultsText:"",resultsScores:"",winnerName:""},menuDifficulties:[],menuDifficultiesIds:[],menuSelectedChallenge:{author:"",difficulty:"",beatmapCharacteristic:"",downloads:"",downloadsText:"",genre:"",id:"",index:-1,image:"",isFavorited:!1,numBeats:void 0,songDuration:0,songInfoText:"",songLength:void 0,numBeats:void 0,songName:"",songSubName:"",version:"",metadata:{}},optionsMenuOpen:!1,playlist:"",playlists:n(200),playlistMenuOpen:!1,playlistTitle:"",score:{accuracy:100,accuracyScore:0,accuracyInt:100,activePanel:!1,beatsHit:0,beatsMissed:0,beatsText:"",combo:0,finalAccuracy:100,maxCombo:0,rank:"",score:0},search:{activePanel:!0,page:0,hasError:!1,hasNext:!1,hasPrev:!1,query:"",queryText:"",results:[],songNameTexts:"",songSubNameTexts:"",url:"",urlPage:0},searchResultsPage:[],speed:10},handlers:{activehandswap:e=>{e.activeHand="right"===e.activeHand?"left":"right",localStorage.setItem("activeHand",e.activeHand)},beathit:(e,t)=>{e.damage>.25&&(e.damage-=.25),e.score.beatsHit++,e.score.combo++,e.score.combo>e.score.maxCombo&&(e.score.maxCombo=e.score.combo),t.score=isNaN(t.score)?100:t.score,e.score.accuracyScore+=t.percent,e.score.score+=Math.floor(t.score),T(e)},beatmiss:e=>{e.score.beatsMissed++,_(e),T(e)},beatwrong:e=>{e.score.beatsMissed++,_(e),T(e)},beatloaderpreloadfinish:e=>{e.menuActive||(e.challenge.isBeatsPreloaded=!0)},colorschemechange:(e,t)=>{e.colorScheme=t,e.colorPrimary=o.a.schemes[t].primary,e.colorSecondary=o.a.schemes[t].secondary,e.colorSecondaryBright=o.a.schemes[t].secondarybright,e.colorTertiary=o.a.schemes[t].tertiary,localStorage.setItem("colorScheme",t)},controllerconnected:(e,t)=>{e.controllerType=t.name,e.has6DOFVR=-1!==["oculus-quest-controls","oculus-touch-controls","vive-controls","windows-motion-controls","generic-tracked-controller-controls"].indexOf(e.controllerType),e.has3DOFVR=-1!==["oculus-go-controls","daydream-controls"].indexOf(e.controllerType)},debugbeatpositioning:e=>{e.gameMode="classic",e.introActive=!1,e.menuActive=!1},debuggameplay:e=>{w(e),Object.assign(e.challenge,e.menuSelectedChallenge),e.menuActive=!1,e.menuSelectedChallenge.id="",e.isSearching=!1,e.isLoading=!1},debuggameover:e=>{e.isGameOver=!0,e.menuActive=!1},debugloading:e=>{h.id="-1",Object.assign(e.menuSelectedChallenge,h),Object.assign(e.challenge,h),e.menuActive=!1,e.isSongProcessing=!0},debugvictory:e=>{Object.assign(e.menuSelectedChallenge,h),Object.assign(e.challenge,h),e.isVictory=!0,e.leaderboardQualified=!0,e.menuActive=!1,e.score.accuracy=74.99,e.score.beatsHit=125,e.score.beatsMissed=125,e.score.maxCombo=123,e.score.rank="A",e.score.score=9001,e.introActive=!1,A(e)},difficultyfilter:(e,t)=>{e.difficultyFilter=t,e.difficultyFilterMenuOpen=!1,e.menuSelectedChallenge.id=""},difficultyfiltermenuclose:e=>{e.difficultyFilterMenuOpen=!1},difficultyfiltermenuopen:e=>{e.difficultyFilterMenuOpen=!0},displayconnected:e=>{if(e.hasVR=!0,!c)try{"getVRDisplays"in navigator&&navigator.getVRDisplays().then(e=>{e.length&&(c=!0)})}catch(e){}},favoritetoggle:e=>{const t=e.menuSelectedChallenge.id,n=s[t];if(n)if(e.menuSelectedChallenge.isFavorited){e.menuSelectedChallenge.isFavorited=!1;for(let n=0;n<e.favorites.length;n++)if(e.favorites[n].id===t)return e.favorites.splice(n,1),void localStorage.setItem("favorites-v2",JSON.stringify(e.favorites))}else{if(e.menuSelectedChallenge.isFavorited=!0,e.favorites.filter(e=>e.id===t).length)return;e.favorites.push(n),localStorage.setItem("favorites-v2",JSON.stringify(e.favorites))}},gamemenuresume:e=>{e.isPaused=!1},gamemenurestart:e=>{w(e),e.challenge.isBeatsPreloaded=!1,e.isGameOver=!1,e.isPaused=!1,e.isLoading=!0,e.isVictory=!1,e.leaderboardQualified=!1},gamemenuexit:e=>{w(e),e.challenge.isBeatsPreloaded=!1,e.isGameOver=!1,e.isPaused=!1,e.isVictory=!1,e.menuActive=!0,e.menuSelectedChallenge.id=e.challenge.id,e.menuSelectedChallenge.difficulty=e.challenge.difficulty,e.menuSelectedChallenge.beatmapCharacteristic=e.challenge.beatmapCharacteristic,e.menuSelectedChallenge.difficultyId=e.challenge.difficultyId,e.challenge.id="",e.leaderboardQualified=!1,e.multiplayer.active&&(e.multiplayer.lobbyOpen=!0)},gamemode:(e,t)=>{e.gameMode=t},genreclear:e=>{e.genre="",e.menuSelectedChallenge.id=""},genreselect:(e,t)=>{e.genre=t,e.genreMenuOpen=!1,e.menuSelectedChallenge.id="",e.playlist="",e.search.query=""},genremenuclose:e=>{e.genreMenuOpen=!1},genremenuopen:e=>{e.genreMenuOpen=!0},keyboardclose:e=>{e.isSearching=!1},keyboardopen:e=>{e.isSearching=!0,e.menuSelectedChallenge.id=""},leaderboard:(e,t)=>{e.leaderboard.length=0,e.leaderboardFetched=!0,e.leaderboardNames="",e.leaderboardScores="";for(let n=0;n<t.scores.length;n++){let r=t.scores[n];e.leaderboard.push(r),e.leaderboardNames+=`#${n+1} ${g(r.username,18)} (${Math.round(r.accuracy||0)}%)\n`,e.leaderboardScores+=r.score+"\n"}e.leaderboardLoading=!1},leaderboardqualify:e=>{e.has6DOFVR&&(e.leaderboardQualified=!0)},leaderboardscoreadded:(e,t)=>{for(let n=0;n<e.leaderboard.length;n++)if(t.scoreData.score>=e.leaderboard[n].score||n>=e.leaderboard.length-1){e.leaderboard.splice(n,0,t.scoreData);break}e.leaderboardNames="",e.leaderboardScores="";for(let t=0;t<e.leaderboard.length;t++){let n=e.leaderboard[t];e.leaderboardNames+=`${n.username} (${n.accuracy||0}%)\n`,e.leaderboardScores+=n.score+"\n"}},leaderboardsubmit:e=>{e.leaderboardQualified=!1},menuback:e=>{e.difficultyFilterMenuOpen=!1,e.genreMenuOpen=!1,e.isSearching=!1,e.optionsMenuOpen=!1,e.playlistMenuOpen=!1},menuchallengeselect:(e,t)=>{let n=s[t];if(!n)return;Object.assign(e.menuSelectedChallenge,n),e.menuSelectedChallenge.songName=g(n.metadata.songName,24),e.menuDifficulties.length=0,e.menuDifficultiesIds.length=0;const r=JSON.parse(n.metadata.characteristics);for(const t of Object.keys(r))if(!["90Degree","360Degree"].includes(t))for(const n of Object.keys(r[t])){if(null===r[t][n])continue;let i=l[n],o=i;"Standard"!==t&&(o=t+"\n"+o),e.menuDifficulties.unshift({id:t+"-"+n,filename:n+t,difficultyName:i,renderName:o,beatmapCharacteristic:t,difficulty:n})}e.menuDifficulties.sort(b);for(const t of e.menuDifficulties)e.menuDifficultiesIds.push(t.id);const i=e.menuDifficulties[0];e.menuSelectedChallenge.difficulty=i.difficulty,e.menuSelectedChallenge.beatmapCharacteristic=i.beatmapCharacteristic,e.menuSelectedChallenge.difficultyId=i.id,e.menuSelectedChallenge.image=e.menuSelectedChallenge.coverURL,S(e,n),e.challenge.audio="",E(e),e.isSearching=!1;const o=!!e.favorites.filter(e=>e.id===t).length;e.menuSelectedChallenge.isFavorited=o,x(e),e.leaderboardLoading=!0,e.hasSongLoadError=!1,u[t]&&(e.hasSongLoadError=!0)},menuchallengeunselect:e=>{e.menuSelectedChallenge.id="",e.menuSelectedChallenge.difficultyId="",e.menuSelectedChallenge.difficulty="",e.menuSelectedChallenge.beatmapCharacteristic="",x(e)},menudifficultyselect:(e,t)=>{let n;for(const r of e.menuDifficulties)if(r.id===t){n=r;break}e.menuSelectedChallenge.difficultyId=t,e.menuSelectedChallenge.difficulty=n.difficulty,e.menuSelectedChallenge.beatmapCharacteristic=n.beatmapCharacteristic,S(e,e.menuSelectedChallenge),x(e),e.leaderboardLoading=!0},menuopeningend:e=>{e.isMenuOpening=!1},minehit:e=>{_(e)},optionsmenuopen:e=>{e.optionsMenuOpen=!0},mpopen:e=>{e.multiplayer.lobbyOpen=!0,e.multiplayer.active=!0,e.multiplayer.status="idle",e.multiplayer.lastError="","ride"===e.gameMode&&(e.gameMode="classic")},mpclose:e=>{e.multiplayer.lobbyOpen=!1,e.multiplayer.active=!1,e.multiplayer.status="idle"},mpcodeinput:(e,t)=>{const n="string"==typeof t?t:t&&t.value||"";e.multiplayer.joinCodeInput=n.toUpperCase().slice(0,4)},mpnameinput:(e,t)=>{const n="string"==typeof t?t:t&&t.value||"";e.multiplayer.nameInput=n.slice(0,14)},mpkeyboardopen:e=>{e.multiplayer.keyboardOpen=!0},mpkeyboardclose:e=>{e.multiplayer.keyboardOpen=!1},mpnamekeyboardopen:e=>{e.multiplayer.nameKeyboardOpen=!0,e.multiplayer.nameInput=localStorage.getItem("threewsusername")||""},mpnamekeyboardclose:e=>{e.multiplayer.nameKeyboardOpen=!1},mpconnecting:e=>{e.multiplayer.status="connecting",e.multiplayer.lastError=""},mproomjoined:(e,t)=>{e.multiplayer.roomCode=t.code,e.multiplayer.isHost=!!t.isHost,e.multiplayer.status="lobby",e.multiplayer.lobbyOpen=!0,e.multiplayer.active=!0},mproomleft:e=>{e.multiplayer.roomCode="",e.multiplayer.isHost=!1,e.multiplayer.status="idle",e.multiplayer.players.length=0,e.multiplayer.players.__dirty=!0,e.multiplayer.playerCount=0,e.multiplayer.readyCount=0,e.multiplayer.everyoneReady=!1,e.multiplayer.opponentText="",e.multiplayer.opponentScores=""},mperror:(e,t)=>{e.multiplayer.lastError=t&&t.message||"Error","connecting"===e.multiplayer.status&&(e.multiplayer.status="idle")},mproomupdate:(e,t)=>{e.multiplayer.uid=t.uid,e.multiplayer.isHost=!!t.isHost,e.multiplayer.hostUid=t.hostUid||"",e.multiplayer.status=t.status||e.multiplayer.status,e.multiplayer.songName=t.song&&t.song.songName||"",e.multiplayer.players.length=0,e.multiplayer.players.__dirty=!0;const n=t.players.slice(),r=n.slice().sort((e,t)=>(0|t.score)-(0|e.score)),i={};r.forEach((e,t)=>{i[e.uid]=t+1});let a=0,s=!1,c=0,l=r[0]||null,u="",h="",d="",p="",f="";for(let r=0;r<n.length;r++){const i=n[r];e.multiplayer.players.push(i),i.ready&&a++,i.uid===t.uid&&(s=!!i.ready),i.uid===t.hostUid&&(u=i.name)}c=i[t.uid]||0;for(let e=0;e<r.length;e++){const n=r[e],i=Math.round(n.accuracy||0)+"%",o=n.uid===t.uid?" (YOU)":"",a=n.finished?" ✓":"";n.uid!==t.uid&&(h+=`#${e+1} ${g(n.name,12)} ${i}${a}\n`,d+=(0|n.score)+"\n"),p+=`#${e+1} ${g(n.name,14)}${o} ${i}\n`,f+=(0|n.score)+"\n"}for(let r=0;r<4;r++){const i=n[r],a="row"+r;if(!i){e.multiplayer[a+"Name"]="",e.multiplayer[a+"Score"]="",e.multiplayer[a+"Visible"]=!1,e.multiplayer[a+"IsMe"]=!1,e.multiplayer[a+"IsHost"]=!1,e.multiplayer[a+"Ready"]=!1,e.multiplayer[a+"NameColor"]="#ffffff",e.multiplayer[a+"ScoreColor"]="#ffffff",e.multiplayer[a+"BgOpacity"]=0;continue}const s=i.uid===t.uid,c=i.uid===t.hostUid,l=(c?"★ ":"")+g(i.name,14)+(s?" (YOU)":""),u="lobby"===e.multiplayer.status?i.ready?"READY":"...":(0|i.score)+" "+Math.round(i.accuracy||0)+"%"+(i.finished?" ✓":"");e.multiplayer[a+"Name"]=l,e.multiplayer[a+"Score"]=u,e.multiplayer[a+"Visible"]=!0,e.multiplayer[a+"IsMe"]=s,e.multiplayer[a+"IsHost"]=c,e.multiplayer[a+"Ready"]=!!i.ready,e.multiplayer[a+"NameColor"]=s?o.a.schemes[e.colorScheme].secondarybright:"#ffffff",e.multiplayer[a+"ScoreColor"]=i.ready?"#5dff80":"#ffffff",e.multiplayer[a+"BgOpacity"]=s?.18:.06}e.multiplayer.playerCount=n.length,e.multiplayer.readyCount=a,e.multiplayer.everyoneReady=n.length>=2&&a===n.length,e.multiplayer.myReady=s,e.multiplayer.myRank=c,e.multiplayer.myRankText=c?"#"+c+" / "+n.length:"",e.multiplayer.leaderName=l?l.name:"",e.multiplayer.leaderScore=l?0|l.score:0;const m=n.find(e=>e.uid===t.uid),y=(m?0|m.score:0)-(l?0|l.score:0);e.multiplayer.scoreDelta=y,e.multiplayer.scoreDeltaText=l&&l.uid!==t.uid?(y>=0?"+"+y:String(y))+" vs leader":l&&l.uid===t.uid&&n.length>1?"LEADING":"",e.multiplayer.opponentText=h,e.multiplayer.opponentScores=d,e.multiplayer.resultsText=p,e.multiplayer.resultsScores=f,e.multiplayer.winnerName=r.length&&r[0].score>0?r[0].name:"",e.multiplayer.hostName=u},mpcountdown:(e,t)=>{e.multiplayer.countdownText=t&&t.value||"",e.multiplayer.countdownActive=!(!t||!t.active)},mpsharelinkcopied:e=>{e.multiplayer.shareCopied=!0},mpsharelinkcleared:e=>{e.multiplayer.shareCopied=!1},mpremotesongselect:(e,t)=>{Object.assign(e.menuSelectedChallenge,{id:t.id,difficulty:t.difficulty,beatmapCharacteristic:t.beatmapCharacteristic,difficultyId:t.difficultyId,songName:t.songName,songSubName:t.songSubName,image:t.image,version:t.version,directDownload:t.directDownload,downloads:t.downloads,downloadsText:t.downloadsText,songDuration:t.songDuration,metadata:t.metadata||{}}),s[t.id]=e.menuSelectedChallenge},mpremoteplaystart:e=>{e.menuSelectedChallenge.id&&(w(e),Object.assign(e.challenge,e.menuSelectedChallenge),e.menuActive=!1,e.multiplayer.lobbyOpen=!1,e.menuSelectedChallenge.id="",e.menuSelectedChallenge.difficulty="",e.menuSelectedChallenge.beatmapCharacteristic="",e.isSearching=!1,e.isLoading=!0,e.loadingText="Loading...")},pausegame:e=>{e.isPlaying&&(e.isPaused=!0)},playbuttonclick:e=>{if(""===e.menuSelectedChallenge.id)return;if(u[e.menuSelectedChallenge.id])return;let t="frontpage";e.playlist&&(t="playlist"),e.search.query&&(t="search"),e.genre&&(t="genre"),gtag("event","songsource",{event_label:t}),w(e),Object.assign(e.challenge,e.menuSelectedChallenge),gtag("event","difficulty",{event_label:e.challenge.difficulty}),e.menuActive=!1,e.multiplayer.lobbyOpen=!1,e.menuSelectedChallenge.id="",e.menuSelectedChallenge.difficulty="",e.menuSelectedChallenge.beatmapCharacteristic="",e.isSearching=!1,e.isLoading=!0,e.loadingText="Loading...",gtag("event","colorscheme",{event_label:e.colorScheme})},playlistclear:(e,t)=>{e.menuSelectedChallenge.id="",e.playlist=""},playlistselect:(e,t)=>{e.genre="",e.menuSelectedChallenge.id="",e.playlist=t.id,e.playlistTitle=t.title,e.playlistMenuOpen=!1,e.search.query=""},playlistmenuclose:e=>{e.playlistMenuOpen=!1},playlistmenuopen:e=>{e.playlistMenuOpen=!0},searcherror:(e,t)=>{e.search.hasError=!0},searchprevpage:e=>{0!==e.search.page&&(e.search.page--,m(e))},searchnextpage:e=>{e.search.page>Math.floor(e.search.results.length/6)||(e.search.page++,m(e),void 0!==e.search.url&&e.search.page+3>Math.floor(e.search.results.length/6)&&(e.search.urlPage=e.search.urlPage+1,fetch(e.search.url.replaceAll("CURRENT_PAGE_INDEX",e.search.urlPage)).then(e=>e.json()).then(t=>{var n=(t.docs||t.maps).map(a);for(e.search.results.push(...n),i=0;i<n.length;i++){let e=n[i];s[e.id]=e}})))},searchresults:(e,t)=>{var n;for(e.search.hasError=!1,e.search.page=0,e.search.url=t.url,e.search.urlPage=t.urlPage,e.search.query=t.query,e.search.queryText=g(t.query,10),e.search.results=t.results||[],n=0;n<e.search.results.length;n++){let t=e.search.results[n];s[t.id]=t}m(e),e.menuSelectedChallenge.id="",e.isSearching&&(e.genre="",e.playlist="")},songcomplete:e=>{if(gtag("event","songcomplete",{event_label:e.gameMode}),"ride"===e.gameMode||!e.inVR)return e.challenge.isBeatsPreloaded=!1,e.isVictory=!1,e.menuActive=!0,void(e.challenge.id="");e.isVictory=!0,e.score.score=isNaN(e.score.score)?0:e.score.score,T(e),e.score.finalAccuracy=e.score.accuracy;const t=parseFloat(e.score.accuracy);e.score.rank=t>=97?"S":t>=90?"A":t>=80?"B":t>=70?"C":t>=60?"D":"F",A(e)},songloadcancel:e=>{e.challenge.isBeatsPreloaded=!1,e.challenge.audio="",e.challenge.id="",e.challenge.version="",e.isZipFetching=!1,e.isLoading=!1,e.isSongProcessing=!1,e.menuActive=!0},songloaderror:e=>{u[e.menuSelectedChallenge.id||e.challenge.id]=!0,e.hasSongLoadError=!0,e.loadingText="Sorry! There was an error loading this song.\nPlease select another song.",e.challenge.id="",e.challenge.isBeatsPreloaded=!1,e.isSongProcessing=!1,e.isZipFetching=!1},songprocessfinish:e=>{e.isSongProcessing=!1,e.isLoading=!1},songprocessstart:e=>{e.isSongProcessing=!0,e.loadingText="Wrapping up..."},"enter-vr":e=>{e.inVR=AFRAME.utils.device.checkHeadsetConnected(),AFRAME.utils.device.isMobile()||(gtag("event","entervr",{}),AFRAME.utils.device.isOculusBrowser()&>ag("event","oculusbrowser",{}))},"exit-vr":e=>{e.inVR=!1,e.isPlaying&&(e.isPaused=!0)},startgame:e=>{e.introActive=!1,e.menuActive=!0},victoryfake:e=>{e.score.accuracy="74.99",e.score.rank="C"},wallhitstart:e=>{_(e)},ziploaderend:(e,t)=>{e.challenge.audio=t.audio,e.hasSongLoadError=!1,e.menuSelectedChallenge.version="",e.isZipFetching=!1},ziploaderstart:e=>{e.challenge.isBeatsPreloaded=!1,e.isZipFetching=!0}},computeState:e=>{e.isPlaying=!(e.menuActive||e.isLoading||e.isPaused||e.isVictory||e.isGameOver||e.isZipFetching||e.isSongProcessing||!e.challenge.id||e.introActive);const t=e.menuActive||e.isPaused||e.isVictory||e.isGameOver||e.isLoading||e.introActive;e.leftRaycasterActive=t&&"left"===e.activeHand&&e.inVR,e.rightRaycasterActive=t&&"right"===e.activeHand&&e.inVR,e.mainMenuActive=e.menuActive&&!e.genreMenuOpen&&!e.difficultyFilterMenuOpen&&!e.playlistMenuOpen&&!e.optionsMenuOpen&&!e.isSearching,e.score.active="ride"!==e.gameMode&&e.inVR&&(e.isPlaying||e.isPaused),e.mpActive=!!e.multiplayer.active,e.mpCanStart=!e.multiplayer.active||e.multiplayer.isHost&&e.multiplayer.players.length>=2,e.mpHostControl=!e.multiplayer.active||e.multiplayer.isHost,e.mpLobbyVisible=e.multiplayer.lobbyOpen&&e.menuActive&&!e.isMenuOpening,e.mpHudVisible=e.multiplayer.active&&e.multiplayer.players.length>1&&(e.isPlaying||e.isPaused||e.isLoading),e.mpResultsVisible=e.multiplayer.active&&e.isVictory&&e.multiplayer.players.length>1,e.mpInRoom=!!e.multiplayer.roomCode,e.mpInLobbyPhase=e.mpInRoom&&"lobby"===e.multiplayer.status,e.mpCountdownVisible=e.multiplayer.countdownActive,e.mpKeyboardOpen=e.multiplayer.keyboardOpen,e.mpNameKeyboardOpen=e.multiplayer.nameKeyboardOpen,e.mpRoomCodeText=e.multiplayer.roomCode?"ROOM "+e.multiplayer.roomCode:"",e.mpShareButtonText=e.multiplayer.shareCopied?"LINK COPIED":"COPY SHARE LINK",e.mpShareButtonColor=e.multiplayer.shareCopied?"#5dff80":"#FFFFFF",e.mpReadyButtonText=e.multiplayer.myReady?"UNREADY":"READY",e.mpReadyButtonColor=e.multiplayer.myReady?"#5dff80":"#FFFFFF",e.mpReadyButtonBrightness=e.multiplayer.myReady?.5:.2,e.mpJoinButtonText=e.multiplayer.joinCodeInput?"JOIN "+e.multiplayer.joinCodeInput:"JOIN ROOM",e.mpRankHudText=e.multiplayer.myRankText?"RANK "+e.multiplayer.myRankText:"",e.mpDeltaColor=e.multiplayer.scoreDelta>=0?"#5dff80":"#ff8080",e.mpStatusText=e.multiplayer.lastError?e.multiplayer.lastError:"connecting"===e.multiplayer.status?"Connecting...":"idle"===e.multiplayer.status?"Create a room or paste a code.":"finished"===e.multiplayer.status?"Round over.":e.multiplayer.players.length<2?e.multiplayer.isHost?"Share the room code below — waiting for a friend.":"Waiting for another player...":e.multiplayer.isHost?e.multiplayer.songName?'Press PLAY to start "'+e.multiplayer.songName+'".':"Pick a song from the menu, then press PLAY.":e.multiplayer.songName?'Host queued "'+e.multiplayer.songName+'". Get ready.':"Waiting for host to pick a song...",e.mpWinnerBanner=e.multiplayer.winnerName?e.multiplayer.winnerName===(e.multiplayer.players.find(t=>t.uid===e.multiplayer.uid)||{}).name?"YOU WON!":e.multiplayer.winnerName.toUpperCase()+" WINS":""}});const y=["easy","normal","hard","expert","expertPlus"],v=["Standard"];function b(e,t){const n=y.indexOf(e.difficulty),r=y.indexOf(t.difficulty);if(n<r)return-1;if(n>r)return 1;const i=v.indexOf(e.beatmapCharacteristic),o=v.indexOf(t.beatmapCharacteristic);return i>o?-1:i<o?1:0}function _(e){e.isPlaying&&e.inVR&&(e.score.combo=0)}function w(e){e.damage=0,e.score.accuracy=100,e.score.accuracyInt=100,e.score.accuracyScore=0,e.score.beatsHit=0,e.score.beatsMissed=0,e.score.finalAccuracy=100,e.score.combo=0,e.score.maxCombo=0,e.score.score=0}function E(e){e.menuSelectedChallenge.index=-1;for(let t=0;t<e.searchResultsPage.length;t++)if(e.searchResultsPage[t].id===e.menuSelectedChallenge.id){e.menuSelectedChallenge.index=t;break}}function A(e){e.score.beatsText=`${e.score.beatsHit} / ${e.score.beatsMissed+e.score.beatsHit} BEATS`}function x(e){e.leaderboard.length=0,e.leaderboard.__dirty=!0,e.leaderboardNames="",e.leaderboardScores="",e.leaderboardFetched=!1}function S(e,t){let n=JSON.parse(t.metadata.characteristics)[e.menuSelectedChallenge.beatmapCharacteristic][e.menuSelectedChallenge.difficulty];e.menuSelectedChallenge.songInfoText=`Mapped by ${g(t.metadata.levelAuthorName,55)}\n${t.genre&&"Uncategorized"!==t.genre?t.genre+"\n":""}${function(e){e/=60;const t=""+Math.floor(e);var n=Math.round(60*(e-t));return n<10&&(n="0"+n),`${t}:${n}`}(t.metadata.duration)} / ${n.notes} notes\n${n.bombs} bombs | ${n.obstacles} obstacles\nNJS: ${n.njs}`}function T(e){const t=e.score.beatsHit+e.score.beatsMissed;e.score.accuracy=e.score.accuracyScore/(100*t)*100,e.score.accuracy=isNaN(e.score.accuracy)?100:e.score.accuracy,e.score.accuracy=e.score.accuracy.toFixed(2),e.score.accuracyInt=parseInt(e.score.accuracy)}},function(e,t){e.exports=[{name:"Pop",row:1,column:1},{name:"R&B",row:1,column:2},{name:"Rap",row:1,column:3},{name:"Rock",row:1,column:4},{name:"Soundtrack",row:1,column:5},{name:"Video Games",row:1,column:6},{name:"Electronic",row:2,column:1},{name:"Hip Hop",row:2,column:2},{name:"House",row:2,column:3},{name:"J-Pop",row:2,column:4},{name:"K-Pop",row:2,column:5},{name:"Meme",row:2,column:6},{name:"Alternative",row:3,column:1},{name:"Anime",row:3,column:2},{name:"Comedy",row:3,column:3},{name:"Dubstep",row:3,column:5},{name:"Dance",row:3,column:6}]},function(e,t){e.exports=[{name:"favorites",author:"You!",title:"Your Saved Favorites"},{name:"3966",author:"BeastSaber",title:"Songs With Fantastic Flow Vol. 1"},{name:"3967",author:"BeastSaber",title:"Songs With Fantastic Flow Vol. 2"},{name:"3968",author:"BeastSaber",title:"Songs With Fantastic Flow Vol. 3"},{name:"4134",author:"BeastSaber",title:"Songs With Fantastic Flow Vol. 4"},{name:"4135",author:"BeastSaber",title:"Songs With Fantastic Flow Vol. 5"},{name:"7483",author:"BeastSaber",title:"Maps Of The Weeks"},{name:"4137",author:"BeastSaber",title:"Curator's Picks of 2020"},{name:"4139",author:"BeastSaber",title:"Curator's Picks of 2021"},{name:"11584",author:"BeastSaber",title:"Curator's Picks of 2022"},{name:"4405",author:"BeastSaber",title:"Intro to Dance"},{name:"4138",author:"BeastSaber",title:"Mom's Maps"}]},function(e,t,n){var r=n(21);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0},o=n(206)(r,i);r.locals&&(e.exports=r.locals),e.hot.accept(21,(function(){var t=n(21);if("string"==typeof t&&(t=[[e.i,t,""]]),!function(e,t){var n,r=0;for(n in e){if(!t||e[n]!==t[n])return!1;r++}for(n in t)r--;return 0===r}(r.locals,t.locals))throw new Error("Aborting CSS HMR due to changed css-modules locals.");o(t)})),e.hot.dispose((function(){o()}))},function(e,t){e.exports=function(e){return"string"!=typeof e?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),/["'() \t\n]/.test(e)?'"'+e.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':e)}},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var i=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),o=r.sources.map((function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"}));return[n].concat(o).concat([i]).join("\n")}var a;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<e.length;i++){var a=e[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAU0AAAGDCAMAAACYzLIyAAACWFBMVEUAAAAAkP8AkP8AkP8AkP8AkP8AkP8AkP8AkP8AkP8AkP8BkP8AkP8AkP8AkP8AkP8Bkf8AkP8AkP8Dkf8BkP8BkP8Bkf8Vj/y44P8Rl///drb/drZx/+n/drZx/+n/drb/drZx/+n/drf/drZw/+pu/upx/+n/drdx/+lWtv//drb/drbL6f9w/+r+drdx/+n/drZw/+pu/utx/+ll9exMsv9x/+lx/+lw/+r/drb/drb/drb8drf+drdx/+nh8v9q+uzR7P9w/+phu//e8f8wpf9s++qJzP8Ek/9w/urZ7v9v/url9P9x/+n9drf/drb9drdDrv9x/+l2w/9uwf9u/eps++px/+mt3P//drY7qv//drZ7xv/2d7ml2P9x/+knov9x/+m+4//W7f+03/9I1/H8drf/drYru/iZ0/+AyP/B5P//drZx/+kXp/tpvv/t9/86yvX/draU0P8gnv/+drbp9v//drZ+g9xx/+mSgdZK2fHF5v9x/+nWe8Py+f8Xp/uQz///drYbnP/3/P+f1f9x/+kVpfsxwPZO3vD/drbfecArjPMwi/IktPncesBx/+lV5e9Wh+dx/+khjfY9iu5+g9ucgNMajvhx/+mDyf8Kmv6+fcmOgte4fcr/dra5fcpGiexOiOkpjPSwfs1J2PEVpfuIgtkpufcouPj/drb/drbteLzSe8MPoPyof89KiesPoPzreLxghuQ8y/Rx/+n/drZx/+kktPnGfMc9zfNLierleb64fctd7O3oeL1x/+n/drZb6vj/////drZx/+lv/exr+vEkKZq9AAAAw3RSTlMAeUKEWG9nmlCMKho2YJMVCkolDyEwOgbfoXqEZ5R3Zm6EN0xPI4xUk7iNROZEH1qcLjacCbRgbT8qYFoVP3zxFepKvO+rD8ygVu0p83EPdTCxOsPCHRng2uCuJcUK1+2poeHt3Q8Zox7Rx+LvmEC+9xazz6cG9cVD8g8i5Lkm+SvN6qX806lINy+sQGRXLzfASDW0XEwhFWf4yFIvLBrmIVRDQjYpYjYlUdjPbF5YThhsU0xJx7rOW1RBKUlCPGTZ+uxEzOy6AABDfElEQVR42uycz05iSRTGZ2zaK9oiyP9HuAlb1oQAoUPYEFkQQowBN8pCEw0rE2NsX6Jfhxeb+nu/W/dUUVywp3smfGaSnhm7+9SvvnOq6lThXwcddNBBBx100EEHHXTQ/1dVKfYL8XXQrhzzxQuiIlNeijP+jxGuCnPkDUUDqv6ykeQ5ybOzUulSqyR1FgmAdSx/INiqAKix6YjPrJJD+fQQFMnL09NyufxNqqx0GiliDLgg+1vQgmAE0MRXUu44NYQB8bF8LtFqUZP8VqkcWVThijOO2CbJ/mto4UAABD/g4+bQqiQkhsMHAqKfgPKCoWQkBcjCSUKFk4JUgm/E9jSG1qwIn12cYEAHQM0P8IygC1psUBgRGwmI7ssSKDnITOac6ZjpHMpEigE2nAuyFtcCraa7HV+sHrQAugEa9LQ3Mg6J0YDonjzzjGWEMsMxfhX6+++vho6FANlgywSyEVomghZ0FWGIAVO64F8GO1IACUAnPxkuj/vYKjEWEAXP3YzJWLI/SaJkFJm+GPob+sq/TLwgC7RGPTAKAuhiMaMqSV1KRb+tDH4OgOAHdCpcETuEEYmhRETBc0djMpYFFgdHyUFms9lcXFmIMJZsCVmgBVvDtsZiRlVWwuIBfFsANPCZ3sgmpIcSEd2DZ14Yk7EEylwQBL3mw9Ws359djR86YXM07U0DCIQB17CtURAIWs6WqgIdWSUWDvBzAxQy6eWEAof4aMQQROgxnvnUMIUxOUvlyiBo9petNdGP18dht92YT67v+vdXnXA01YAJWiSQja1WcsNwor/ELyOBHfh5AFJ+YdgZz/pvd9eT2/lLo90edFut1nA47C4aL/Pr/jj8HkREwbN0VkwFs8hgCmMKliyGYPrWXm+r4YDB/XibPYSjUcy2IGthaxR/LY4pjkyvG2AHfG6AhN99/25yu2wPho/+odz+7Eii4MntWaymgMlLpjImz/Bev7HeUY+tdqPGbHvVaY6QQVwGW7qUQQliICe+gM/lwGYzHN+/fUzmjUWL8vNr+PHQ+R7nWUG2bwXz8rRypIzJWALlfnplpl3eCrRhs0nQgi0IQxQb4AFfDOCMObD20u6uPiP04Rg8GU6S7X6Yyphg+bladdsvtclHfzYGWuAVhDlkUzmgM1aPUZNnMCuAt0s48FM1fNA8o2zfEmZZw2T18tfApAWB1/1btpS9sbVszLwLwoZGTE2ObvazLxYPRq+LAvgrNZT5/lVm+3Y48wZMsPwN+vHjx+vr4+NqOGQL7Wr1+Mr+w/p3ahh+z3Gc5wpnfput0R8C80/UkONkPAXO0kV1i32mhvm9vT4oifM9kNl+wmonct0HMxs8d9cHEa1Ytiuc5c2ls3pxBpi91fogm1oC53nGVzqLZ0jz6ev6oA04UTqd1iyVjwqqZrbWNrUn/auHsPNwxTYoT3yHUls2xBHt/yDWcli1uNarVw/OLErnZmueu1fzWg+ba7P1Uq8/T5v8BMwPcN3/Ro1gh94XdjITx4dp771eNwc07Uxart8aBqJ0FljpdJkzr6zpgFmb1gO2eyXCOYVLx9JrdmZ9djJZDNd/kIaLxu31089xOOpJeOgjUuXYOJpPbetEPMvSCXPSPNfWzFpgtkOGMiu6p0rOIzTYRrYNx/2732Ta4YB3XRjA6bMGCHwwh7UlIIi+12y5HjCcMKcrz4U1e9SYQU6ijPpl7BfiS+grRWwYN27aUXjF+xGNwWe7FhksHHjPAN5ogOBH6dF+1Vc5IEk0F9RrNpzZjeZUeQ5rmjC/SJQZ0qxFt5b0u0GWoIVr75+ub18Wrdfd6Q15/4QXwAfJzwswjo7bQinZSD0Wtw4Onh2rOZHol3oJCtemur1AHU8zJwV6k8CVQAy2IOtGq9m+30ybohn+9DFhu4X5fPnSYA3xxaDb7Q4W7XajsZzXbieT6+uPJ7Z2dFj1Y/A0PSQwADr4GfBOINyoF+RY2BgUT4KzazcnEr1yZF2CGu+ydSJRiiuwb5C+sqnYr7koWTda9Cm9QlsU+NwGpHfT9HJafknJwaiLb9XlfU4m7BjmtCY6r5o0zxeBPugLlOJ69hI3sNY7WMAFWQPtOWELup57RAjswM8LMIaPacMVaZmNhAMVPGFPak4ciMhe80s2uQRNoybUtzJ/QnIBmdfcArKMQs0sMgimpWhhW+D1Ceho/aP3zLjahCEZSAEw+dwPAxJjETyVPecmmCtpzool1bHX7CcXoKzKct6+vyjK+6UqF148crE3NppkQQGLl3f9CsXz8MLcLVCp/2l7uhOvfjCgiAZFJ/EkBgYpSmE88lkg56nsmavbzMmaH6WLPFmDsNckq7lq3pcuJEoqwZKhlCRF2IbdzFcoRj2AcSBjccWX+Hfr2gF8yGAzGi4Y2QimzHgWi/bHv5KntGc2meth7otahxKVM88TXVhzav6Outj08yzHPZ2dpQw+o98rJRMTr1AK3BRlvBcCWgEXKjDKkGIGgR593kSjcQdzBJ7WoTEyah+ewPkUSKN9wyYJK3pBrEEvNM/FysX+PjvMvGSp39jI90rJJUStGGIQaginqLVKxpuYCv8i4v9Vy3yNiwJIohHh2IMRQAVP1/iYPy/Leu9Yp6l+LMyZJ2VTJPqNeZ4Mcho/Si3521T0Inh9Isup7XlPtxP4bkYOQg5BjsB4ZqnpArBLtrfiF0IkGrYc63ACvTnNIRg1uzL3ig634FxjmrPJcep1iNJM7txDmefuw31eZILeSOjYg/ro6mPeja7EXhe1p3GvLonqIUSOqEaVH5sFn+KvEvHo3xVNr9OftFuizfa6arGuYgfBsGgUz1OnPc8uxZmbmPNHL1qHyCLEvz14MqtmlOf2mpmXVtDRf5Ek+8u1VbUZH4QaAhyRtzxz9anKREdti6Z3X9sQDAOqeSIYV6uSmnPG1yFdOOkiFMwTVXNjnhfNt188+CaJnbRIxRDgCEzUjkKapI2m1mRANU+9bdncq2yaW07QtC5Cg3VMPVE1keckfLz9QnPAp8aMDQGOwAj2EdIE0TxvE03tWfNkwSDbaa4rc9ZdNL2LUJtZU31z3hk+Tl5+lvA8HOEawY5PJNNHUxP+lME4s73IzUnP3eONNM1j5SRQ5/pS0Rm+sgKJ3uPPEI7ACPaGWUgbDXiqYFylpxiVwpqdprGkX6olvbOOqc8THVXTHj5aAqk0H0lHYAT7w6QNilTJgmxHMHRhud7oTZwrjxnNWaIhKtZ/kLeHnwuaL+vUqt0EOTKCPWAiTULc5aRJFpXtCMakWbFk+gMIEZpoeeAcit2UM3xYIS1PMoI9YaY3Jr1eIMF4aCLT6Xbzbh3TCDS94e8/grPi3jBFxVzuGMxSvCcETgfNtrtu4pWhrSpgp09rMsJ/N2Zrx3qF6rwnzNruwXSnQY7iTE8TNXayjulZ0yyS3dd+4UMvfDnFeeu3wUSuIFX2pmlGU5c0T0HTOBl4w18s5xP+/LfR9Y7gfLfSiTzxRzMctBvLRrs79OMkqeKnWTW/90h879JDE2Y43xh++7o/GsWfpc8WG0eA9PIrfZ50WZ8DD7/Dh/6kuxEnTZV8tLJ8OM5CvhXrVfabjmB6I7Pc4bf7U9314pItMUZ04RpBNs1KlDZPum8MpP5ETXTpHD61UqSKddfjpxkf8CrI4hbJkllZe/jtn7yvYd4oCqQM6NjqiRuSXims6cmTbshQmtGICeZAW06cmNu9aLbigUQ08/bMmtpYdkTw8rrgGFe9fBDcoQvb79lxJUI0gElYGtFwxZ7EdFr2VMHcUpo/vTTRQloZg7TQjD/xHNDor2T0+tpF61x/9JX5c+FML/ghVZ4786Q7FhswFY0Ox3gSc2VZk6aWucVp8Z72NylNFhSP6XUNNUCTtKaM62XwV9Hrz3QX8GRCfixbjGA0sOOEH3bI8zqlMjCikTfr7B/jSYzt1W/3O51bP01fQ24e6O5mPmFNZBbN2Ph7pYq6MFP3h1HnETgtt3nFnfKcnIBWTRKN1JG+zdSn+kdyKiJzSzsZoHm8Hc1b0CTWRGaRo8S5vuPFdaL+cRbRCAb29DpPZ87ihjwf1APVtMwkoynLaDKq4xQ8tzxzi/cGSZr3oOlrb16DJu3ov1uMibdfFf6EAi9R9I9aKWSiptPQ5ustzUmrTkhgKmNyluLFz2UpFgyPRvCUk0uzPUzOLWhe0Z4lpSm/dbSO6U7QROed3DYRGgKmjF7+oCsl9WOA9AhEvRpQP6Q0ZxFVp01hCmOqaEoyGgRzxniiU09xNsjcRjTHW9M05/gtwLcm61SPwMQHEEX0xTz5uUolNQKV7cmtZz0awIWPI606FKY0pj0aRpTzFMmicHrmFv30By9NtN4dRcFXp9po/FZE9FXXzwOqRIa4ed3PnKg6dQtMfPLZGk1V8FSTC5zuuQUiYriMSbMKGzu3pubr46bt013k7Zd1BNoQ2aDpHEBxL2sCZqW8KRoxucDpnlt3+t4RmnQzRS8yUDVlnXqhCzLCBwsLTxgCt81kAIjNraLLmsO6iMb/EyPyfHI5TqSKa279NPOpLjIQvy3Pszr8EsJ3vFrShrBslJ7J9T0VYnZZsxkAJoxpn1zgzAahe25BM5GWH5rmWd57kZEFTSP+uqVoKpg6fJ8hMvI41SUD2HYdQqI8J/M8C5i+WYnjTOb6O+bWSfMaNFNeZCD+0L7xrnj6k8j26Kg/TmTXtqnuTpQuphYwvThlxVg55jZOMztybMnTXWTQ+JHnpEngtZW9dM6kHSreVHcnyhifdgZMD06VKsHMPbc44BiNswloprrIcMc/Jf1AL4mS8AO1ecOwg1MImWwvBtHUAqYXZ9me66McUIFmb3uaczdNxD8m1tR5Xt22kSb9QM15k8WmzOfvii1RwhRTSz8R+WCmOrrlLpq3dpoVAcrsxChMKi4aPzZ3aRu9qnRSa/2EHfxlE4liWvM8Q6bWnyqZc2rOeqzUFX2NIc8l2w/Q3BD/fco+L/xgM+ectFR9ZbNHrCnzHFO71c8sUubsmJmCwpmOJj5CYNLMKJo4L4kyDPWwBPnMQH9KA+oGrS5bls2ZxZqY2rRz+31oHgbBykszzZUl4jd3+AuJHPGnHABSne5xqSwR18ixOd3UwunYcNPCuT/NR3zgwPieOdlwoU6lM+cJUt3RlHGXzVNb2WnmvqS3JrbSODeSTNmJZttO0x1/Ty3CjjrlX5TRfqW3J25hhaU0T1JYk7R9QlvhLO9Fk16n00UI2yNHZvp3SUh1euvspWnrjw2MSp9ubplXsKrTTsVONBdraAiaznPqJMDhJaVIqvuXIXebBvsr91T46zA+4UM7vLvQHNhp+u9FUsePVA+WjuYAke8o3BFlM23ZwR+I4dFj+EV6mkZPpxVPujzaTO4WqF/+l+QdJBeRZ9lE2Uwfjb1wNoAgBU3fwxmnG6apy2b6lz2QZ/qHqcum72Zs8Hk0B3aaNUdephWtHah9oOk7pf/D3pnsphEEYTi77Sw2MUmARxhprpwRYhAR8gUNB4SQZYEvhgOWQD5ZiiySl8jr5MXSK383RdMzwwx2lkoUJ5HiFF9X9VJdXXXhGv4cliG4Z96e7j8uZXeuPtmAJ6PJV7BbT96URzxLxx02iV6aaRIO/VvS7M7Vcty0pN28h7nQbG63lrM8T5b+ZT+nqQrLaGqaM/lP96QZbg+jeeKb3ogctn7/rG0aBpX8XghLzLWDZqHz5vxJzZuRY9703ACnuBf6v6aXMPa+IA3uLH9sR/Vn7DfvitxvejMOfXUo8DDwXz0L3YOmd+zT5Hr48xf/9nM6rMnzBhioHA+q/5AYUidzDKnsiyHRBA73K2lvjpwzvikXvceLbwY5xDcBwB3fJN5A5pY0+Zvu2PvzvyD2LllhdOiuBjTHPpr+3GLnvVD/9C+5F1JD23LcC5F1j1ySQ5Cy5Dg2Oe8sw7zvLE/3ubNcpLuzxHeDozvuLNOcBXGkd5zUCrxPnz/6fbpO9oBv0vt00Iw8cQpytqAngUPlesweI9eDJiLRXA9MLf41k9gxMZQD5SF1HiUPCUlyrjykVHEWegqnCZxwrri4HLn2vjlyrWw5cirXue/KkXNsIqp0B0IrA9D1/6D5m8ep8jd7OeVv0ncZQzgKDR/SgJzzUQbdcP4xucVx1txi+DmtolchgOh+zr3hpFukPybvvfE1W947/VgdPHGhzkuLpHi3SBNMHMnfZDw79JuMVUFvMmp6Dn9XJgsLOXk6JvXIsah53wvhiUvm90JXytGfzHshOYefkYCqJwToYD+E59lv2ULi6+T12KO9ZbtdmdqAJ1XGesvW/k7esmFo3dtNerCk8WJ6GNjZ5aVBXjb631m+PNA7S4wunXI87ywxtHhyTkI02G46o0h0x+V7A4xnq0nfAC9vD/EGWIxuaXuV4M/kDbCj+AANANN3gf5lCBPnGcwBHQscT6o/S56+9+ndQ7xPV2+qNVA8Txfvqd3v01tW8YQybl3cNVL8NHtY13y1E0i1gkPWTggdtRPUe/9zrU5Zl05Qb/1dtRPu7cIeWH+b7iXd39mhg8rFqOuBt6IEp7Oux6fNuh6NA9T10KP75b1WB2U9vqxLmW+r4lM3is6QvaGfJk5qcxK+VMbsqznTXR6d0Joz57rMi6fmTC+3mjPQRo4u1LFKzhzrgkJH7e01ZxAYw2am5VnSaYjL9WTcWw/p1qhA9HGjHhJTv9h6SONt2sjRNQoivTDKIemK0cF3oowZF3NvtH84lnRgQqiePCsmtbpmO2p1vdqo1XVccK2ubQXqump0jWJdZqkuVVuq4ShrB9Okjo7rX3cnMWenDDigXUcuoh/AqtxmNWh8U2QdOVTBsSTi2iigTJQqGiXqntnSNurI2YdYe4kOcEOe9MlMD4tDshqHgf4ETNDekqvvrHE42bPGobt8ZTQ/OjXV4T+Ngot9f41D4uj+aZNeqro3Lv76myOj/uZr8UOXvOzN4eTEGDLW3/SUVo1adQGUiVV+k/n43F9/c1ePjAWmzV3R7NB13ktcG/bnUHVnEqK7NxVTG9Zf9jcK1sVhURo2iBKVUYZpEl9sYdr0VCNwGGeKusU3U6tucS++nORVtzhDSeroIa7rwsVBEC+A0lu3uGQGq/zTJg1xNV0nvlK6mtrN8TXrMjuozrq51tTOWi69ETW/qZLaPpibMxvCAd5pk3a0dG5lc6/3Hq6IMaTHWVS9d3xW130eps3E3VZr5l6QfoDlAXoRoG+Yr3x+e5JZmWab9CKAH5Ibh8CaNqnGpBMwjBPWc7g+GRXV++7MENnSDmTz0wYjC5j2+WBO+6dj2tzVpTogxomZrdAeLgDJIKIv40a/RYYVTIk2+fVwgZ/TGp8BbQKcqnstDIj2FwrCDOq3SX8hxZGDZAjRM3SjFygnC6a5dDua1cnIOmp2wzTh6J5odstzPMje+wrqk95XFebXkuO5arjN5AWRL5wsmJbLlb20QZF6jCxgump2T+3m6Z62jSH1dUyd2fuyQX3Sl02SFBzRM5y32T+G8D+hYfd7wVT0zS5l1gYzpjmy3nNK4M8UrewwTkydsM78egYqknbvdbt9vRY07EbLbm6iWbVBjzv0DESzTscZuvF1vQZVnqU3Tkyd6JdI+1muqkns8ifpZwmSmqPu0v2aCvtbDVW37JYmSrprdprJlEGQG5+OfTgFE37uWoP8xhm4DtNfxOg5e60GHqDVIem1ii72du91dAnRov/GYGp1lbe1YeoMqwmUwQUMOpVKU9cwt5smkuOSGyei8BIn/k9XH+D6Q+hQfir7AEN95lgCJUgyjqRJ96kSNOwGU3SVF0AtbcTwLvuOPsD9JZThTg4vR9d0AyY1TWw2fcZJo6+hjpvBH2iPagWUER1dzoyAVzS+iYdbelTL+y70jTdB6ibd7V7Qn47iVlAftpeqeziYWl3l2TeENmp4OdFVwNSZRHffvn+7iyazy1F9ZSijeyrLT4WG8B8Bk5om1qBsxhliR4Zm4+7+6YLEqj0cXq1qte3905VVHptd7DXHWo8BaDaQwYDu4dcPrTa+o9VVnn9T9KIn/dO1nBJlVFIFPpCYMVwwYZqVpOn9FOdXtBsQ5lne2dv/xNPbn6PEP3oOu75qPVQjb4O/6o3qyC6+M4ByA/2sBmnD2qELVeYcLLV542hF/Rymmcg44euQ5gp7XO5UmmdZ8YTHYg0xVg44Jb+QtVFqnwxuwlTnqTkzUmVnJhsxgUAbqKN0sZVRXfElS0y9Moti/Gubn8M0ExknfN2QyRLeTnnaqwkTsqvRCwY+q5zddN/4cZaY3kNPmqjltwKotUtQComvHyxl3srPAZYvcPE/JKHZi6/kmJ3wpiV0xAawIsuMI60J2TNaW269mVHQYZUcZau6T1yyv1JAbQOFNsfq7lR+OYYy8iPwhA7JEk6OEyr1czz78Bqn8nUnTmO3qJUpVbh9npHzjBacXDBZAuWqE/7aV+7nzEKpgUKbF+Iynf+C4746mFYYSrDEcaqH3b9hmghZlNLetEwcBzHwVCc7EXfEWVvELJjK8oc6VZsosT3tz/ZGiaAUNVChDUIo/IsMm2i9Ncq3YImj/j5+TiPr7Z2nbJjAuY47lhEHYoIwmvY6oMTRKTe572810HOhDoRHn7QFlNYowdJycgrzNX2m6/d1rES087nJE14jI7oI8vIor0CqSWqUjnNfIQYqgdope2zUhYhAqkJps+zNXDDT+DkNRYWOuAsyjrC8KDuEVeqULqz0mCx/OmISec+gGO63wibXVD+JiDRQguUSw0xhws/T4MRKtJvnG+w2pCDGqziuSWIJjzH2BUh1CQOFcnK+hCCQivkHsTw3TLyMynLn377byRMpXAwbYyfXTv47xNY0SeyGCpZqoLVTymFjoQUbD4VSsryCcm6Y8PO0K9HJ0dWFZ46SRFVIF0FexNbWJFOuO41uOL6+XHTieNR5uLkcDMZ3UWKgnCeGWyDlTLVop7Hmn55Lu+8tEyb8PNVKJFOZV66PEI5ULEYiVYJDkB0TqtUTbCwRdUKyyymXdRZOMPox7ibb1CugONhaaZASpDn/ONW7aB+dZIVJrwHdFGbTtiaKeC6ivDqCUxv+JOdGT7fzUzQNh+iAUK8+TZKHMI7JcCMNEl6DzZrTy0+eZ4NJLiWB0yHVUa+mA10QZVC1dqszaCa2yVgltG0G2+1BEkx7wU0CovfTZQ0hUQicxjeVXygvzwgTOBF/7jV2K92t/pi2hiyWqYK8VyzK2+ovqvBJP8lOHcmWRj7tB+ai/Av/qS1KEmU2OkpiorNFa1Ujwy2dphZ0sMFwGKb08mww8fgMT+dYbCrhnPft7uIWifnJUc7ryibpLHcs5JUULG0qrbUXJ8s9Gj/M61eMqZbaVT1eSJv0GCbCuplg0haF8PYipBtroyQr8AtbPq7jU2aP+3pyD7i9aHSb4aRxgbC+1zC1l+P+O53gybG5FrUL4dnt1I3s9M3d4XtLsEtURPWJvx4DaH5yEWjDxAPnPaS8kZLSC3NnaaCUNklOLudacIIBUQEUBpovS2WY8HICM/taJHj2wzxRsq0QUHKSeHh2vg5UnCnRx2uOFXedxnVvfZQHUEyYOqFmLy+na9F7MwOhFeaEsi/MEihlgEJ3O8e714oU8XuRzyk7suPyxzDQICeeDckShgkv3xen8PZ8eXan8HDcd+lQKZIJiSC9kxFVQG0D7UT7swzWLGGYe8GE8nLytHgO9+I56ViTJVBqkkm04kQlUGKg825uLKlh5uTtNs92RgOd/Jj3juzJEiiFTaYYZwEUBprHDNqIN1nmaJjw9g2eWYBOLmNG0rRKaZZAmcFxXAZaj6P0KB8YSsTBOctcDRNK2zw10OG0mUzPcDDSJDVKeDhFmdlA1ftYCXQepUSJPC+whGbF8USCxnA4X4zdakezy2nAQIIkR2lNlvsqXCIGCqBBZxAlIDmIgbJQlpQnVNZEjxjTYLQYXI/vmxN2cptVB5c3i84oriuOJxZJGyUpUbO/gQKoeOHZ6lxHTpDjG0ESKItlSXkCKMLBViIaorwIfIIkUBIPz8tAARRIp4vBOOxG7Ij+7a4RTZqzwWLUCuA12PcWzBI8tQlAZyZ2dBgxXjO2BpL5o6QGCuWeG0iJiKgVnX8Eywwuk3kRtVKrEcm2BCldAiRI5oqSGqgGCt02BhtDDq8xUR6CJXhqlTdSuHhAV4v8g/WIAiSBshjtABTDTUcbXmOGCDjKQ7CkKmuiL9QNoCmKIh74mCQL1bVkAjWRatGXQ5wjAoBA6R/pQoBKoshDE1y50MdnRZOkQKVyQEpGm3jNwVHSo7IOkXGoTL5IeS8FsTWQPJAo5YAUg32M1EMBUpF8FJSUqFQbiWhGkJc82j2k6Cewargx2CrjA6MtSZaePQGpCKYCqhQEeR+JIw3fcaQYbQy4BPlUSFpMKyVLKkyePQWpcCvFaEOewGj/qfKbPTqmAQAAgRgoggH/TiEhePjhbure/tu1rkJuAwAAAAAAAMCwdwariQRBGL6EiLKQQNjVVxC8zlkGFZfQF1kPQWQPiZeNBz0sngSR1ZfI6/hiW2Pb801PMehMxtUFv44QkkvyUfZ4qPrrxo2zUbfIN3JuvRKf6odTPAlx39H/JrgenXT71D/oq3mkV9PCFhAHgt3fco1m0SfamNUGeDhP79zBJD2vwtcDqX5NBPtmL1OzFKAT6Otz+2FqCrabYLSsIQx63H3IEks6jt2mzaL2fG6pQC0Qf2QHEnKR4gubOMoyWtcN+Rb2gFhSfmO3tYRa/0Yo+3LCX7ZA/OkFMXEgmhwvQhajn3WphkWE/SwD3MU4w4JXuZhVVYvavC20deSpCzBboGfP1cYd6BEDjOKz+By1U+myvgU7ZgP3MUm/qMVsrFbQarFrDYMIczxEB3fqAlQCM/2xIMYmgN8r9v8LRvFZrDBrcQ59PKTqkZxjkpPSi1nUeveBdyFgl4cZoG0PITROH/4yBOLPyXLFYU/maJYzis+ChZkaUbbhcFAF5di6VWZRi1vK1sHDDNCGOoEozWMC8RfL8/L+fBi2dUbxWTB8QlyiMhr67AUzicKUSenhrNMMBqPeqAIJw9lmyenUly3AN1C/I3kcf0pglj+2w1QAGGk9BLEVjVIgBondMtWKhLmwlgU2q7nphq1XmUfvv8umlcHICUatbzbbLXrZGyYvd1grhjvtTwvM9teU4ECbkyqD9a0wlHHrdtsY031rLV9/9odubl3FfBSL6GLv0TrcnYp5Frnb9XjWHAwSZYtZ3KIWvK1h8kKZfME98AaWowQqf+/9Xy+Tafh8QpScmXx0xKiKoMkz1GqXBhHK3yu+LGDeDlsNKdsfnUDMWrh0lVoqFzAGPDyov6wKDAJZULTeyqT/Gxt2cmC2M6Km8gfKPRFtWGoW30qKdjrZq20GgVKLWwyD1oY89CUEjqUCG8uwu9iVgBnikxi0XDJtYeKyXBbdcNl42fbHQ9SiV6iKY7DSUCdUYBBE72C5ACdTKrBUzEx85gjiRGacYUoo15mZt6N7fyKPsrU8y4ZSuxj2GAhBpG780d8/PMRelwvwnJhO/pDYR08mLi/AZrNZrebzhTHyoF0s5iv5we5SEMcpqRWEvh//aHQlMq8RQ+wui0dOW0b+PdzdSGH+VKpqWcZxmdXK7+7uxl/2zsI3qiAI4wSHQFIguBxWipQCpRToXaEUKEEqSJEipViRKwR3De7ursHd3f8tZmZ339y92XePu5Ig4SuQd/Ag4cc3M7uzG0ZoBUa7GczGOH1m4eB4jP8iyQmMNEyMU6f/nKaSjZ//KwZOTp0+8wIpZw60TyGeOGzsoi6DF42FBcpSXKE0W5BKW7R/QdByWDEQ9XnFRh+cdfxTZyMx304ObaHFtWy9NG++rKQP7oBxAzfk78gRsOldBzsz2j6UDNVTFPgvVDJ4onaUVJdaep6890zLJPucVR7oTCN7hOoYMWKc3ttn8JRhsDOZOerzH6RRM1NhwM7pcV1GDyV43EcU0vOMlw6y/kMsE/NWRZzLGcCsQV14Wg/JewvNbB3bdhk3bN5vMu2oEdh1AYAlywzACHxeTQGe7WIfCj8QBycKc9rHgg6VxuRJUqYhRl/u/o6bLdu2Fo+cHov9iNQRv9q1HMHkwPkAcLoByPwkPdmvqsHDTcxoMYkz9pxq68hahmmmnIlmLckgVnwZsCYr0bJr5y+dNmvdzIEbE6c3CvsnmAAXKX6+ABmdmgyj5Wqk6klyHjwHW83Jgd5Qxbmc6z9kKMDkCXwuqUNo1lHQXvyOOrn3JKiGP1qaDz69pA81w5dumwirhRkzFqxLhYb4zBFDhgwZMXPQoNTUBTOazZo4cdq0bUuhdgyG7AfwgJ4IYAnwodF1R/eUzqD4OAVVm8eMeY63HGI3Jwd6k6rWEpTKo6lpOiSfcYH4yAa/X7ly5diVY6RLRvtACBa5ohkMVolW9imlZMeZ8UkDRhJ8oXXzxU2lHVoLWeZv08TMO+TRq8vcATuOzWkNdMyaMs5nOoOUCSUdz/IYENcZ7GGlVY4ea2muZFzmShKVzOcc0bOh7GrWX2eICO/JzSdar5R2OtqP2sSqy9NhI8YCN/MwJ2+IxFqzWh13CSoxTSjz37Kj5O0A/PH16+Pnzp27cePqqreg+45W3XfIomsZK5/vuCbj+UmWDqyJJv1RBJP/NMFDbr179y49fdc10FqjuREyo0MbR82ldw2WG6vM2cQS6rzWHOYuQHXMAPq6NI+6qXMllm88gtY8OH4cSF69Chxfou6y8CNC1boMwnygEy4XMi5l+GWX+UV5dae2lgpf40CC17Fjxx6sjqjc7t2JKOAcnwOarZSRAX+f2c5YWx6nDmSa28wJzQ89KlTWIAx0Wc1VlMOmVKGUWkMskeSeN28ePXr0HnQnQvARoBqkN27cOAyqd/kKiM/EWZG11fnS3ww6VtStMkh+9eph9O7alf4OQRLHzFaovih6yszM7DGciPZLT++VnDw+L896+ZdH/dNap5kYpa7rkCtzJmGgkzVLon9Hc1r0Y5TzOZ1keeL4xbNX3+7ZAyRTglmBQNu2bQtbRKiwsJCYKp++fXv16jnQ69fAlK8LOcmf1cAleXcBvyKuN0H6278f4hdRds8FkpmZSDG/DWoAip7ykSoSJaDMU6iROr7V63AXzqW19PRvXiRxRW9ANWidjHOqXJ6TN5quOXHx4tkDCiWQJJAtQV0jBB+RKSF99OjNnj1vr567eBz1+jVPtSKZxQJ+CdFP8/Ua9w0mSHlrQcASUA5HSwJIoNiuXbtOLPiEVPOBKAE1PDPsVwvgaAfjVsb6EIJD5kwSaZMCfXr0ftLEeT3PxuiaE+c3AMvsDoQSSSLH1qCePcvLy3fvhh964kdgSkQDgfcpCPTA2Q0Xz58APQC572vVjS3LXXGsjotBc4FlP2BJKJEkcuzcuaKid+/eZWVl8GNFRefOyBSJElDNszjHas8ksCfVFBnrfRCnqUOSpnvl3sXEuXlfGvP8xQ0HsrM7pABLQtkVUPYsX7Ly9qTwxy9aH8OTbq/cDVCJaGHbQCArpUO24rmmKYkqGS8W/BR5K5Ev/WfMXpw8klgOzySURLJ32faDzz+Urj516uvXr6dOrS798Hz99rLeRJSAZip/jmR7ilNc2nMLc24d6tQhUYTw9VpLo7OmE+f2nNkUjFnU3mHZUpG8feGLVZOIKPBEoEHgmX2gaMP5E029rrlKxb4zOzunOLlXej/Dsp0i+XTCV5smPFVE2xmeyp4ZMVqV0pxTsA6ZxCmLkF5TcdbkOLdGORqzWwfNklBOYnpWoruBJwBtG8gCnt2y229IC02t8iuUMXs8GdOwRJRHmKSV6BEEaniSPTna7b3KPq4lJ9O0FaGokVFDKWtynFuiHI0ZdFhKlFIXVoJBMd6JZ3b7/mmhgl8B0xizh2G5XaC0Ad1uePYge3K0i1gnczb3oulbhAaBNfXLSfYoPwAw0ZiCpY9BwZ+Kp8I5p2Bq5WGyMZUvmaUPT/KntqdXtDdCc8p997iYNKO3lRNxPUVZs5EFpolyMqZg6ePPZ4Yn4iyaTNFeeZhkTKg9gqU/T6hHYE8d7RmSppMKm9lpRpX0hrqkD458dxgGOmdNCROjXBtTsPSz5xLiiTi7UbRPrTxMNqZg6ceT7EnRbsfJhWVaTG/yvrIm0JziaohS/WfyAiZEORpziazi/jwpfVJxZ5yVg4kZE4y5vvRrvCpdD/Zsk4/RrnBKmk0skb6ICQma3PLgfSivpiRMHeXxG5PTJxV3xpkwzF4IMzFjsj0p2hFnL8bpS5MjXS4350W+O1rQFDA5yhPFScmTcBZUxpndCWasjPmN5ZE9VbRDLWJ3SpqDvPMm3zK0ZQWx0jdac55WRirKy+OMclncFc7JcwoqE+Y9FMwJ3hi/G3nwLIXFEiVPDvaEaHKOnRj57jJDs5Eb5mSGicZMXBcoeRLOIo71BHOmhKkoSnnZU+Gk3FmcVymasv43VzTrumg2DaUV/RTM8IVJt27dmjTpQtg3eWaldEswdeYVe8B0g/xkJGhaccIyPh6aTaPfrUrvLvCnOTWU1r99t5SsmDC33Lq9BNZASlDzl6wMx8JZGAh2SAxn3vhkAVOo9MPTg0d6Vyj1Xo89kK+xceb2i65ESU5l2ea7F7JXrI2q31SV95UMs0MwUOgJc8ttBEkNIxI8ENGwF86uLbgSxV/O++XGhFn6HEB2hiYciLqc8AxIn6+OgTMTKpHCKVc9cdCcGXnvE2jKU6QCgJndARftXe0wt6ykvobqD6Oo5UntJQ+HlreOuxJxnGM5z2SYciEJKLE/jM030gD80AmBrvbEibsiSJ2zK0lzoKu1rGgmRcCcwxVot40l7hkJJJxmBLTgEYmiQ8O23xN/JeI4p3LOMAVLRImNduy0k/rm5yNSXJkeXG3F2WlAPuDE1Dlb0jztS5NbSCtcTQ9BkyuQjUx4pWKJILOygsFgSkpKEJSVFVBAwZ/h2JWoIKE472SDWXoQWAJKAEnnakrwhEgBqAfP7ZbUybvF+bK/KWlChwSboZG3gVIlTbKmdwXaQstH3N5gsw3UjQQPwJSAgj+Zp6xEFOsJxXmZBaZmScdpeOabm9sdvsPTcDx8UzzLJM7SMpM6Odb9afo15GbUMt3NJLc1C71gEktASSCz22tlA1EECpYmnmHvSlTE5qxcnJ86QlvFfH2QBkeTY5T6wTMewRFP3NWf8kqdHOuyk8E0a/4czVlMU1jTUoHCSwCmZokgi4r6OyoCogAU/dnCniN261iPx5x5Os4HQJxLg1WAMYllLoBM7wUaicKHdECaSzzBnhXbV9tSp471KJr13TTnM02/9uY0QXMqWZMWR+W2KEeYimVR/8lpaWlztNLSJiNQaIYST5U9pa8LhTn9rGnifL2AqY1JLNN7jUxOTi4uHo8qLobnkb3Siaeyp4z29SbWjTmZ5ljZs5Q01aujI1+dRzSp886rI7amPcqDhmUoFCqYqlUQCiFQ9KdpiJaHZayzOeOwJsV5qYSpjNlRsSyGqzF5GUp5OTnjixXPjmhPjVPGepQ5HZrjfGnaz38313Je5TjX1twtYVKUA0xgmZYWcp1NLEeg4E/gGfSI9nLHnKH4rElxLmEqY44hlq6zHiCKPMegPb1wdmJzRvXTF/nRlK13e1IoUCWIrClgmihvTyyXV2FxmkCegFNFe/nHypkzx7FmmR2mMiazFDzJnh44yxxz5tgRseGqR9NsKmxsXZouDzmroyWuAqRh0qGEZMn+xHDX0d4V/xBpziBnzgStyTDJmIal5Dke7SlxSnN6h+88QVMspuRBhgl0QKFWRxcsBTlAUc7nuXaelD31xjTsZc7Q8p/Mmj0s1lxdxjD5ANLjzJhxbj/lZc6fopkU70FGgSroljhHDLoL5LM1LKDsiThV6pTmxA2RCHUbCi9rHqlgmMKYwp4GZ6eK9V7mzMlgmq7rCT/Yu5YVJ6IgGtSNj4XgIuILRHCh+MLxAT5Q0YiPAR1QUYni20Ui6qZJQBHRLGYhAReSjbocxvWMW/0zu27n9unOuZfqm86MmWh/QEOf1DlVt6rOzUeL5vqN6iBjLdDMEn3PM4do9sFklrN63kVDr0HBmVD9ZAGix8cgo5qdQZ7vzoCpvgVwDnK9Y4IzPhAJ1T1o3gOagYMMEH2ReF6o3Qu2mxgXOKOB4CSqq0RHaEI0dxCYOpyiGD0Kzm0HEqoDzbXXPSV5wCCDiM48L9IAQtXqls7I5CFQXSd6HFL5iOrGonns6CWAWQjOS0dj6Wwu9Jv2Vjl3n06pjgPOHdrfIDT1QYaf6LPguS53yZv6cG4ZDPNvKdVVNFOif2aem4gCmDqcx8H1DJqfU6pn0bxQHM2HfjTrKdEjCk3Lc/BT0c5EOhGcoPrWYlSv3Tg04yL6G7R6a0GNKMP1LtAE1WcO3XhCaHIrg8ZCq/NjoWSnSwYZlp99olOpSTxXHiudVLlGaVav67LJRJfQTHk+FdAkFa6b4EzRBNUT4dykNYaUIdsHoJnKJhM9Cuvz8oG/4cjq8cvqBWRTAOg4QhN93mJwCtcRnECzA+EMQZMtBBbNNQmakM2te2bzqokUBHIWkU4bnBFn9V2n8NNosrngCk3muc51BGc6Hu5COAPQVEeWftlsiGoiBQUH5yDVX4tw7tqrVZxTbtn82QwMTUR6EpzNn4ImC2d5NF/mDAd1t2zOG9VECgoLTqb6DxFOSkOqbCILTyM0Q4Nz27Q0SgVNFs6h0DzrQ1OCySWbszYJcwrSg9NB9dvm11HT0BmLZofQjIUuLDQhw4ImC6egWas8KYEmj9ORhLg8orNgsSrJRfUG0pCCZv/rSTYPxF9PoakHp431Vj6p2V+n8uS5gqaynHAVaCbjNXw8Ez18XZCoTmlIiyVJQrHO4VlIMvqMZA16FB2+IjoswjnwwultSVIfBs3LPjSraShFTpkDMcOpfjsvHQh2PaU3f1EoxbIZRnS8UIK9m33hr2aa1F8Ngeb57D0gGKdbNCWl/8h+++J2I5vX7gYSPVckzDveqKKZpPTmfbdsVkIfCGeu8dFMknoYmvriTNX97a+Hk02c+1Fy4TSAs6VeIGXRbGmyGS7EFs0bpdG8TGjKfI14WQpN1o4IJVKRU3qLv92Uh5WRpKGWLTgFzU8jZPrTfrm5PTvE+G1qd+SMoEdRYh1N2UroEZqhSQjRztrRk/67QbOmohmycAg03zOaQzkAUCUsutGsBxbvOprBStyDdhCaZU6W1f0WzQZVhyNFcx5dpFA0b5lz5b7yaOIx536gyf1NtSPH/c1/PDbPWTSVuRB1ix+70fyvm0BTmwDrc6EVktMPL2VOn9ugbM7wzPKje2a5MurN3pLWm3PKxqF2DwWMgf/PQoKm4iII2PWoqio3Buf07lKe0+dogYM8wLQ4695DGt8e0kKu9T50D6mm9ZCA5j3VJV1gR67t72+eWPn9TTPK8Pc3Bc13rkR9BGgG7W+2fb33LZPQezdEx6/DvXeg+VBHU98trrrnQtGkzIUM0QfRfJBFE8dF55AcD60s8bGp6p5Zfhv1zHL735hZ3hwgOs8sBU1ldOZ3uLD7qvrFztNfT9o83S57gOg8T596btE87x32sDPwqq8lV2mP4a7HsZK7HryIxLJpx0LvXtDtUuREpaGld62r/XSC95CwJOeWzQqhyexVVg7zC5zVr8uwIzdbdkeuG7wjh70ZhCbvyMkggxtym6khRzcDOPO/COdk72/uIF9GB7IpaFINSQ05NmX4z/Ttt5O9W2x5jh8Gsjn1igHiFhIXnP7OcvvrSth7bz0Ycu8dCR3HSrv3zuTlS1LUEukRCgBD9bdFPBmV5fZkPBixJwM5aOe0tV9tfPWOEgsf07lEOs9J3foI2t8VvxAsLiX9QvvHxC8Uv0UEmKa6rsSiJ/U7giaE8+tb1csm5t/68nnZXMHZ62S9bMCTsSzgZdsXd4rNnva6Vc5ykw+W3C9GFwnCCaq7fJawBhb1WW5dHp8lvIHsC9R8ljYHseUcl0ug3FS7SJshnJbqHg8wbKvj5gGGb5U9q34P8P2cQZ0bwOwL1NOQCCeEQajO/nS2VF9L8BwPf3riqe4DCo7fNH5qvz+9m7s8YRPuMlXuSCE0yWppb4cVOPnuBLb7nxI8tbsTDo7y7gQfnEet399enlCzVydYrz/dneC82AO3Fp/1p3T9nx0uZm8uFuV03usBOL33euz/S/d6mLsoZtKLPf4wd94tTkRRFMduxN6SAUUFEaIRbFFBsBDjig1j7IqR2HvFsvbeC/beRVEQUcQ/FFECfi7vfWXOJDeTlyZ6bBtBWX85572Zt+M9i/yxHgso5HrsTLkpPjcxdAZBxybkoonWkR2lt/VBM7dWmjmzYeBwOXNmhZ45M981c2Z3s2fOnN02zMxJGYqhM6MxcmaompESPnMGA5EQdN5V3Fu6xo/bemhvycR3DJ2ROH/trjAPacS/mIekZ/gEBiJNDIxD0vN7wuch4WAPQY+JTQhbumxrwlE9dnUbdTGr62mFWV2TSmZ1Ecu/OqsLY2egnJkvNQHDugKjuiaY2VLKmHI/19bknMug48u/FZrEwpoysA8Vz5HbEDJHjnhijhxJzZEjln9xjhz+07+cfWaAkswYOYtSzj2Tc+SK0HRfLZZNOXIcUZcHH/zAhzCnxbm70ozDwcUzDoll6IzDrQ3POJyLpVPM5TNA1ZBD/k4faZRVzTiUQXcvm3JeF6IOczYwf5MUPn/zYoPzN7F0luNJefcHcE72x29SxpmlHsb7O3z+ZnhHxh6xbIprJNnA6MGcrtmw4En7EUbDmvamUZVnw06qezasGGcqhnD6w2ExGtZM2GeaGLGN2bBmSjmsKUvWUmLZLHuNlAw1Zw1zi9/vL5lb/G5r0+cWu0ftYtru9Zs8uHjstrEE8vrXHCZFE8yKc4t7ov8vVsWyKVsDpwlzorGJcTpmagPpsmXvSI3M1G58DDR0MJe7n8vppRI0y8LEohnYg7yCa9l0N1rCnPznzE70H817FyPKqxNoVpr3jhYxWBNBF8umq20V5jRZx07U/C6C1lBi6A1zdRGczdUNU3YRoPUKexCCjmWzbNTRBCzNWZJ14GxaT0YpzKhpce0RkK60i4b0ZNRXOgJjip4MWIxvuWV/OpbNSi3VcWFOk3WBs5kdLtEgSIKoC4ZZJX2LhFUzlR0uk2tJ+2/6FtrhUtoWWLKbxGUJcG3ttVg6gbORfqGLol/IcGSQhBDl1yVdoEwWTIvKmuZy2m+6ecq+O9kvhJzLDX2KLKgO34dSBZl1LJ3AWX/31VPZfRWNUqwVx96mcJvUVqg/kwXTPuvGBYrEak87xsKj+wowdc5lo/JmUZ5eqbYxIbOOpRM46+1lOyl72VpbqXFVGZK9qCmqmv1gfzJ/62WZdlVM++7aRc3SpuSuzl42YmlSPlLCRAOw3IMQVqloBXNi6Qy4c8X8ZnUG3n1CjcC9u4Cjbaq2JeDBfm8F1vfp8bcbN+6aqme91tsZSCxFZ2AfCxM5R9Bn+nsQlm+3OeXSyTijGue89WTPmvssT8o+yyfP7jz+doNIgiMjJHWQot/VUA3Trl2vHn/LJeiLkXbN80vOnfEvfv8ipRzttdz+a2CKnIs9yG3OeCFk6ewfqP6ex2lvqGuVYR49+vgxNX+/VCQtx0DFfztf5jeCTBXQ/kSUWuVLulZVQai7GtTvBg12ra7btbF3Px9meWvKcmq3OXEKzzj9WnqkvfYeYDam/frR0aNHH715Q13/bTVJy5EZRoy6G5mXFqtiykCJKHXQn+ea/qIe4CG6UTmkB/j6WWVL9NYi5esIJj0qA5hlrYmLTbc504ViJdJqJyIz6LT3DKZ9hOWpgKqO6nfBu3PuqN5d1FFtWT569ebAixe3r3Q2JAGyeyeW56Uz8YWbV2ZT8eTy9F7P49/sDqYEVFv03PbtVOh/6JDfUT1gLjqqj3z5uSSXo5Lq+3SnvuTnl5voqJ47wHYq25SPI5Zv/UZ/wJTWRNBrNmdC7URkBlP0b+8y2Z6Kp+hP5/r03dyfThxtf7pZL9VWTihfHThAKK/cumxI+hy9zMpVW6ZN2Vko1bE1a0+k0p5hykSNRR8yUDIo96ebIoyi/vRtY7W2Ffen2z56YqlTziyvdt1OxuwWBhPWxB7kMKfEyX+LTTvbs4+1p89zUqDbf7jo9ieSbEuV8UvXFMoDn58TynsdtScVSG916kRsesGh6bFNC9MeE1UeNUCNQZnnyKG6kH6C6PanF5qkraJHFz23hu869Lbr9u3amBqmzLmwpsOcyDo07VT3iEk729Pn2dpqeGqgTJSRKjFE5kggmSShpFr/S9eIZTFK7UkvvilRqEGxHWRStqgBSjy1QS+M+WEMykS5oIk1mSCy5s5VJI0tFxBLDrlhycY891AbM9J9Zr5QLuewZlXmFFlnrdmLtJfwfHKUaukVUEuUmVoNYpBM8tN3YvmKFktGSSzv3WMDKFN66c35Qu1KnMiQRS1QGPQ1G5SAMlFGyppAEEnEUZE0tpzNLGcEWG6nkBtjLp9VKNEck3NY021OZL3Mdae2p+ZJ62dUF9M/eUZAr/lEuZ/J1yReKRXJa69evXnDtlQoO9p8e6lYoX7FFp5SQIVBxyzQRJkpazz/xByZJLuSbMkZn6H2Hs2SjalYRpDyMjnv36UvW9NpTmS9PM6IsSd49olGiacGaokyU4hBMsnHhJL2nedXrlwGylMtiUKjOryDHWoN+sE3qCJKSAkqaSj9IIwEUpFUtqTnkwglsVSbTyDknTI4NoI1Tc71eYdTODhhnGskTk/ZEzy7ENCPH1tb6USXgRJR0jXWJV/04tWjx4SSr4bMYmlduXBLoTmKpcsZ9NDrC/SwDDElTZw48QeJOSqSixZPXbfOojwOlirkHozpzrk769iJpD2DPAmoIkoiqJroM2L6CFIk9YWlj7Kd2nUaCbg06EJpUH1RT9ehsy9ovabXJLq359MSoOSN3LBEyCVMDqbIuTvr2IkEztXgae/smGjv3nSUS1TvBPSYRCRvMEmg1LZc7kDZsEGJpwH6mvkZ7SKtU6IP6LVB2TbIMrMlDKbMuTvrITsR4g6efGdnjsj0ce431o0b9F3pBcmQDKI89WCam03jK6gFev7q1atv3/o81S8M8vjxfoSyLaMEy72xggOmyLkbp9yJJE+2gCFq9JKwvrS6/fI2gbQkfZRedkvhLyq2FwZloJ2Z6Hb6vK72Ox6Qf5DaqzOj1Czlgilhcs5hzdp2ovS+UJ64s7PnjoSVxAe7Wu2JY7d7liSuhv6yYnEYVH1yD/0jUSscpBqUmuXqWMENEzmvdSeKdFo9x7FGaaLmSBeHvDhb80nWuO9MmZXIr121pyWbXdlyYtOqpUvz+6ZXDZR54u3WCSKmRvx+2wNArD+ZsM/udCoIEzmvdSdqE+l+KuyfkFjp6cMHjdSIAFq1CZ4JecnqLyyn5zdlk8lOWt1ZnYwy8ZVn8rOqu6jXQHF8x0x9ddMgg+tP6Kc3J90pUh9MLJ04RwmnsGVz2hLFea6FaDiyJ5c/yFcLcmlLKqkZ8l8L4a8jpsnNawpu5bPi7e5oxB8jNQhNSMojbeqECZw440tUNMHKjKf++ZGgjKG8dKpl6bSqPZlNKo54cwyG4jdJMc3EN1VB9PDmvR6ORCGExrWUzzEprxMmcOL8OTOlUFGzYmc2p5af8jxzyLuaTnlTC/fEkEk3yRbKtgGpEJrVmCOqP4CjNFHy6MpqLLplT+qUJ95uHRov3iIuMIQxVcoBsx6ctHb26084zdlUlWvesX1zdp4u1KzpO5LGk3KVM5cHWtjamChbNMtA3cqf2JFcTUytvNXJ7B7tSYcxcawLmPXg7N3F4ETa/4ZmZa0pxQ7ctli9/K9pWqIMNFl9AnbOmTJrWmLNlDk41nca06YcX/+uR1F6Die4F6X/Cs9ZLQal9qQCiavDrkXCVaImaoASzyyANk9z4sqYSDku2utRH+xF+v410XSWAZT4oi4ekCH1tlKv1B0MiCqgMGhzWRpjIuUCZv17keK5MNFMlHQpZFHiDrU/cbTPGbF6GPHH9jmlfpqoAWoNurIpQLFgRmBMkfL69yKVdsszlWgSyoXKlkDJJBklgcSDhaSolvpYPc/JTA1RBho0aLxJPKdoljAmUt4oTpX25vKctRkJNyg1yS5MEg8TCuHxTiJqgBYbtGV64yzjPksYEzAbUVQvnkU8l/9p345ZEwaiOIBLF1uoECzUfgXB1VnElIBbyRIkOCQu6pAh0KlQOvR7917uHv87H4LGS0wh/w4tnR6/9y6YZ3KTZx45F0tQsuQlVZGoBhUDWqy9WcrB9HTaXc/3mgOa/xYfQ/diCcpqJq/pM4FiQH1cQRfxqaXHwcRpP/GsA5pvY5K0plKPJShrHJxzAzqPw+spfxQl9uBk6XUwUbTryaCbw/KyOmdJypJMiRMuKWsP6IgHlECL8EpKOjTCEpU15okHNDaboszOlx0et4epgoQkUToXy1sLDsSAAnQaJeEFkkkMykYtpSdKZtGhMp2mZbLLvpa5unM7viXbfRml8dw4PjmSLiU94ID4GVCAquLmq2gXnoXM9pUkKBu2lJ4MqkWxd+Rgy4vFJyRBKU64rwEFKEgPZZLN1qG6Rf/+XIT58piU6WqKU4PPvQ1bwpNHADWruNth7Hid3Rok/VPKAX3EZgSkInprJa4/xlIemUY8xwyKb1YMKoJlN0NC0iulHFAGRW0nzUbLcWpsyjYs4cklu4/9j2ifyxlVP85LFJAEZTPVARTtlt3GqbFXBETZhqUsmUVp7ahREaOIF3xsyUZrDWxQm5RDghRyxAIQlDU67QO0EsXbUtqVIl8+a0cSoNxukIpui1PTOqW8VeYVGaGqvOo862C3BsmWwsWBlGK+SkfLCZIl70EpRXXZhGpnTBEv7bYZfgXWtBvNftC/0G0tGQw6kIk2pcLt0D/u5YjaiNRsRMnUzdhAdkXSMZ0ETiYqg24k4CPk5v7d/q9Bt19U9F+d6XafPn369Olza/4AHTMK9clhnYAAAAAASUVORK5CYII="},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMDAwIDE3MSIgd2lkdGg9IjIwMDAiIGhlaWdodD0iMTcxIj4KICA8ZGVmcz4KICAgIDxsaW5lYXJHcmFkaWVudCBpZD0idGV4dEdyYWQiIHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjAlIj4KICAgICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3R5bGU9InN0b3AtY29sb3I6I2ZhZjQ5OTtzdG9wLW9wYWNpdHk6MSIgLz4KICAgICAgPHN0b3Agb2Zmc2V0PSI0NSUiIHN0eWxlPSJzdG9wLWNvbG9yOiNmNjcyYzI7c3RvcC1vcGFjaXR5OjEiIC8+CiAgICAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3R5bGU9InN0b3AtY29sb3I6IzZmZjllYTtzdG9wLW9wYWNpdHk6MSIgLz4KICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICA8ZmlsdGVyIGlkPSJnbG93IiB4PSItMTAlIiB5PSItNTAlIiB3aWR0aD0iMTIwJSIgaGVpZ2h0PSIyMDAlIj4KICAgICAgPGZlR2F1c3NpYW5CbHVyIGluPSJTb3VyY2VHcmFwaGljIiBzdGREZXZpYXRpb249IjUiIHJlc3VsdD0iYmx1ciIgLz4KICAgICAgPGZlTWVyZ2U+CiAgICAgICAgPGZlTWVyZ2VOb2RlIGluPSJibHVyIiAvPgogICAgICAgIDxmZU1lcmdlTm9kZSBpbj0iU291cmNlR3JhcGhpYyIgLz4KICAgICAgPC9mZU1lcmdlPgogICAgPC9maWx0ZXI+CiAgPC9kZWZzPgogIDx0ZXh0CiAgICB4PSIxMDAwIgogICAgeT0iMTI1IgogICAgZm9udC1mYW1pbHk9IidUdyBDZW4gTVQnLCAnQ2VudHVyeSBHb3RoaWMnLCBGdXR1cmEsICdUcmVidWNoZXQgTVMnLCBzYW5zLXNlcmlmIgogICAgZm9udC1zaXplPSIxMTAiCiAgICBmb250LXdlaWdodD0iYm9sZCIKICAgIGxldHRlci1zcGFjaW5nPSIxMiIKICAgIHRleHQtYW5jaG9yPSJtaWRkbGUiCiAgICBmaWxsPSJ1cmwoI3RleHRHcmFkKSIKICAgIGZpbHRlcj0idXJsKCNnbG93KSI+dGhyZWUud3M8L3RleHQ+Cjwvc3ZnPgo="},function(e,t,n){var r,i,o={},a=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=r.apply(this,arguments)),i}),s=function(e,t){return t?t.querySelector(e):document.querySelector(e)},c=function(e){var t={};return function(e,n){if("function"==typeof e)return e();if(void 0===t[e]){var r=s.call(this,e,n);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}}(),l=null,u=0,h=[],d=n(207);function p(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=o[r.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](r.parts[a]);for(;a<r.parts.length;a++)i.parts.push(b(r.parts[a],t))}else{var s=[];for(a=0;a<r.parts.length;a++)s.push(b(r.parts[a],t));o[r.id]={id:r.id,refs:1,parts:s}}}}function f(e,t){for(var n=[],r={},i=0;i<e.length;i++){var o=e[i],a=t.base?o[0]+t.base:o[0],s={css:o[1],media:o[2],sourceMap:o[3]};r[a]?r[a].parts.push(s):n.push(r[a]={id:a,parts:[s]})}return n}function m(e,t){var n=c(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=h[h.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),h.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var i=c(e.insertAt.before,n);n.insertBefore(t,i)}}function g(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=h.indexOf(e);t>=0&&h.splice(t,1)}function y(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var r=function(){0;return n.nc}();r&&(e.attrs.nonce=r)}return v(t,e.attrs),m(e,t),t}function v(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function b(e,t){var n,r,i,o;if(t.transform&&e.css){if(!(o="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=o}if(t.singleton){var a=u++;n=l||(l=y(t)),r=E.bind(null,n,a,!1),i=E.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",v(t,e.attrs),m(e,t),t}(t),r=x.bind(null,n,t),i=function(){g(n),n.href&&URL.revokeObjectURL(n.href)}):(n=y(t),r=A.bind(null,n),i=function(){g(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=f(e,t);return p(n,t),function(e){for(var r=[],i=0;i<n.length;i++){var a=n[i];(s=o[a.id]).refs--,r.push(s)}e&&p(f(e,t),t);for(i=0;i<r.length;i++){var s;if(0===(s=r[i]).refs){for(var c=0;c<s.parts.length;c++)s.parts[c]();delete o[s.id]}}}};var _,w=(_=[],function(e,t){return _[e]=t,_.filter(Boolean).join("\n")});function E(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=w(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function A(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function x(e,t,n){var r=n.css,i=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(r=d(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var i,o=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?e:(i=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:r+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")}))}},function(e,t,n){const r='<a-scene\n bind__beat-generator="challengeId: challenge.id; difficulty: challenge.difficulty; beatmapCharacteristic: challenge.beatmapCharacteristic; gameMode: gameMode; has3DOFVR: has3DOFVR; hasSongLoadError: hasSongLoadError; isPlaying: isPlaying; isZipFetching: isZipFetching; menuSelectedChallengeId: menuSelectedChallenge.id; songDuration: challenge.metadata.duration; speed: speed"\n bind__beat-system="gameMode: gameMode; hasVR: hasVR; isLoading: isLoading; isPlaying: isPlaying"\n bind__gameover="isGameOver: isGameOver"\n bind__intro-song="isPlaying: menuActive && !menuSelectedChallenge.id; isSearching: isSearching"\n bind__leaderboard="difficulty: menuSelectedChallenge.difficulty || challenge.difficulty; beatmapCharacteristic: menuSelectedChallenge.beatmapCharacteristic || challenge.beatmapCharacteristic; gameMode: gameMode; inVR: inVR; isVictory: isVictory; menuSelectedChallengeId: menuSelectedChallenge.id; challengeId: challenge.id"\n bind__search="difficultyFilter: difficultyFilter; genre: genre; playlist: playlist; query: search.query"\n bind__song="audio: challenge.audio; challengeId: challenge.id; isLoading: isLoading; isPlaying: isPlaying; isBeatsPreloaded: challenge.isBeatsPreloaded; isGameOver: isGameOver; isVictory: isVictory"\n bind__song-preview-system="selectedChallengeId: menuSelectedChallenge.id; selectedChallengeVersion: menuSelectedChallenge.version"\n bind__stage-colors="colorScheme: colorScheme"\n bind__tunnels="isPlaying: isPlaying; songDuration: challenge.metadata.duration"\n bind__zip-loader="difficulties: menuDifficulties; isLoading: isLoading; version: menuSelectedChallenge.version; directDownload: menuSelectedChallenge.directDownload; bpm: menuSelectedChallenge.metadata.bpm"\n animation__gameover="property: object3D.background; type: color; to: #750000; startEvents: gameover"\n agent-picker\n console-shortcuts\n debug-beat-generator\n debug-beat-positioning\n debug-controller\n debug-intro\n debug-song-time\n debug-state\n hack\n gpu-preloader\n \n leaderboard\n multiplayer\n loading-screen="backgroundColor: #000"\n pool__beat-arrow-blue="mixin: arrowBlueBeat; size: 30; container: #beatContainer; dynamic: true"\n pool__beat-arrow-red="mixin: arrowRedBeat; size: 30; container: #beatContainer; dynamic: true"\n pool__beat-dot-blue="mixin: dotBlueBeat; size: 30; container: #beatContainer; dynamic: true"\n pool__beat-dot-red="mixin: dotRedBeat; size: 30; container: #beatContainer; dynamic: true"\n pool__beat-mine="mixin: mine; size: 30; container: #beatContainer"\n pool__plume-arrow-blue="mixin: arrowBluePlume; size: 30; container: #beatContainer; dynamic: true"\n pool__plume-arrow-red="mixin: arrowRedPlume; size: 30; container: #beatContainer; dynamic: true"\n pool__plume-dot-blue="mixin: dotBluePlume; size: 30; container: #beatContainer; dynamic: true"\n pool__plume-dot-red="mixin: dotRedPlume; size: 30; container: #beatContainer; dynamic: true"\n pool__plume-mine="mixin: minePlume; size: 12; container: #beatContainer; dynamic: true"\n pool__beat-broken-blue="mixin: blueBeatBroken; size: 10; container: #rigContainer; dynamic: true"\n pool__beat-broken-red="mixin: redBeatBroken; size: 10; container: #rigContainer; dynamic: true"\n pool__beat-broken-blue-dot="mixin: blueDotBroken; size: 10; container: #rigContainer; dynamic: true"\n pool__beat-broken-red-dot="mixin: redDotBroken; size: 10; container: #rigContainer; dynamic: true"\n pool__punch-broken-blue-dot="mixin: blueDotPunchBroken; size: 10; container: #rigContainer; dynamic: true"\n pool__punch-broken-red-dot="mixin: redDotPunchBroken; size: 10; container: #rigContainer; dynamic: true"\n pool__beat-broken-mine="mixin: mineBroken; size: 10; container: #rigContainer; dynamic: true"\n pool__beat-fx-blue="mixin: blueBeatFX; size: 10; container: #rigContainer; dynamic: true"\n pool__beat-fx-red="mixin: redBeatFX; size: 10; container: #rigContainer; dynamic: true"\n pool__beat-fx-mine="mixin: mineFX; size: 12; container: #rigContainer; dynamic: true"\n pool__punch-fx-blue="mixin: bluePunchFX; size: 10; container: #rigContainer; dynamic: true"\n pool__punch-fx-red="mixin: redPunchFX; size: 10; container: #rigContainer; dynamic: true"\n pool__punch-fx-mine="mixin: yellowPunchFX; size: 12; container: #rigContainer; dynamic: true"\n pool__tunnels="mixin: tunnel; size: 10; container: #tunnelsContainer; dynamic: true"\n pool__wall="mixin: wall; size: 20; container: #wallContainer; dynamic: true"\n proxy-event__cleargame1="event: gamemenuexit; as: cleargame; to: a-scene"\n proxy-event__cleargame2="event: gamemenurestart; as: cleargame; to: a-scene"\n proxy-event__cleargame3="event: songcomplete; as: cleargame; to: a-scene"\n proxy-event__pausegame="event: pausegame; as: textglowoff; to: a-scene"\n proxy-event__resumegame="event: gamemenuresume; as: textglownormal; to: a-scene"\n play-sound__crescendo="sound: #crescendo; event: victory; volume: 0.75"\n render-order="stage, aurora, sideglow, tunnel, curve, curveshadow, beatShadow, score, beats, menu, menuitem, menubutton, menutext, menugenre, cursor, particles, weapon, victory, stepback"\n stats-param\n tunnels\n vr-mode-ui="enterVRButton: #vrButton">\n\n <a-assets timeout="3000">\n \x3c!-- <require path="/workspaces/three.ws/rider/src/assets.html"> --\x3e\n<a-asset-item id="VigaRegularThree" src="assets/fonts/Viga-Regular-Three.json"></a-asset-item>\n<a-asset-item id="agentGlb" src="assets/avatars/cz.glb"></a-asset-item>\n\n<a-asset-item id="arrowredObj" src="assets/models/arrowred.obj"></a-asset-item>\n<a-asset-item id="arrowblueObj" src="assets/models/arrowblue.obj"></a-asset-item>\n<a-asset-item id="beatObj" src="assets/models/beat.obj"></a-asset-item>\n<a-asset-item id="laserObj" src="assets/models/laser/laser.obj"></a-asset-item>\n\n<a-asset-item id="tunnelObj" src="assets/models/tunnel.obj"></a-asset-item>\n<a-asset-item id="redBeatObj" src="assets/models/redbeat.obj"></a-asset-item>\n<a-asset-item id="blueBeatObj" src="assets/models/bluebeat.obj"></a-asset-item>\n<a-asset-item id="dotRedObj" src="assets/models/dotred.obj"></a-asset-item>\n<a-asset-item id="dotBlueObj" src="assets/models/dotblue.obj"></a-asset-item>\n<a-asset-item id="backGlowObj" src="assets/models/backglow.obj"></a-asset-item>\n<a-asset-item id="aurorasObj" src="assets/models/auroras.obj"></a-asset-item>\n<a-asset-item id="merkabaObj" src="assets/models/merkaba.obj"></a-asset-item>\n<a-asset-item id="ringsObj" src="assets/models/rings.obj"></a-asset-item>\n<a-asset-item id="homeObj" src="assets/models/home.obj"></a-asset-item>\n<a-asset-item id="homeShadowObj" src="assets/models/homeshadow.obj"></a-asset-item>\n<a-asset-item id="weaponObj" src="assets/models/weapon.obj"></a-asset-item>\n<a-asset-item id="weaponHandleObj" src="assets/models/weaponhandle.obj"></a-asset-item>\n<a-asset-item id="weaponGlowObj" src="assets/models/weaponglow.obj"></a-asset-item>\n<a-asset-item id="beatBrokenObj" src="assets/models/beatbroken.obj"></a-asset-item>\n<a-asset-item id="dotBrokenObj" src="assets/models/dotbroken.obj"></a-asset-item>\n<a-asset-item id="dotPunchBrokenObj" src="assets/models/dotbroken.gltf"></a-asset-item>\n<a-asset-item id="cutfxObj" src="assets/models/cutfx.obj"></a-asset-item>\n<a-asset-item id="punchfxObj" src="assets/models/punchfx.obj"></a-asset-item>\n<a-asset-item id="leftFistObj" src="assets/models/leftfist.obj"></a-asset-item>\n<a-asset-item id="leftFistWeaponObj" src="assets/models/leftfistweapon.obj"></a-asset-item>\n<a-asset-item id="rightFistObj" src="assets/models/rightfist.obj"></a-asset-item>\n<a-asset-item id="rightFistWeaponObj" src="assets/models/rightfistweapon.obj"></a-asset-item>\n<a-asset-item id="plumeObj" src="assets/models/plume.obj"></a-asset-item>\n\n<a-asset-item id="mineObj" src="assets/models/mine.obj"></a-asset-item>\n<a-asset-item id="mineBrokenObj" src="assets/models/minebroken.gltf"></a-asset-item>\n\n\x3c!--\n https://freesound.org/people/juskiddink/sounds/70043/\n https://freesound.org/people/Robinhood76/sounds/337436/\n--\x3e\n<audio id="confirmSound" src="assets/sounds/beatHit.ogg"></audio>\n<audio id="clearSound" src="assets/sounds/clear.ogg"></audio>\n<audio id="hoverSound" src="assets/sounds/hover.ogg"></audio>\n<audio id="victorySound" src="assets/sounds/victory.ogg"></audio>\n<audio id="crescendo" src="assets/sounds/crescendo.ogg"></audio>\n\n\n<audio id="hitSound1" src="assets/sounds/hit1.ogg"></audio>\n<audio id="hitSound1left" src="assets/sounds/hit1left.ogg"></audio>\n<audio id="hitSound1right" src="assets/sounds/hit1right.ogg"></audio>\n\n<audio id="hitSound2" src="assets/sounds/hit2.ogg"></audio>\n<audio id="hitSound2left" src="assets/sounds/hit2left.ogg"></audio>\n<audio id="hitSound2right" src="assets/sounds/hit2right.ogg"></audio>\n\n<audio id="hitSound3" src="assets/sounds/hit3.ogg"></audio>\n<audio id="hitSound3left" src="assets/sounds/hit3left.ogg"></audio>\n<audio id="hitSound3right" src="assets/sounds/hit3right.ogg"></audio>\n\n<audio id="hitSound4" src="assets/sounds/hit4.ogg"></audio>\n<audio id="hitSound4left" src="assets/sounds/hit4left.ogg"></audio>\n<audio id="hitSound4right" src="assets/sounds/hit4right.ogg"></audio>\n\n<audio id="hitSound5" src="assets/sounds/hit5.ogg"></audio>\n<audio id="hitSound5left" src="assets/sounds/hit5left.ogg"></audio>\n<audio id="hitSound5right" src="assets/sounds/hit5right.ogg"></audio>\n\n<audio id="hitSound6" src="assets/sounds/hit6.ogg"></audio>\n<audio id="hitSound6left" src="assets/sounds/hit6left.ogg"></audio>\n<audio id="hitSound6right" src="assets/sounds/hit6right.ogg"></audio>\n\n<audio id="hitSound7" src="assets/sounds/hit7.ogg"></audio>\n<audio id="hitSound7left" src="assets/sounds/hit7left.ogg"></audio>\n<audio id="hitSound7right" src="assets/sounds/hit7right.ogg"></audio>\n\n<audio id="hitSound8" src="assets/sounds/hit8.ogg"></audio>\n<audio id="hitSound8left" src="assets/sounds/hit8left.ogg"></audio>\n<audio id="hitSound8right" src="assets/sounds/hit8right.ogg"></audio>\n\n<audio id="hitSound9" src="assets/sounds/hit9.ogg"></audio>\n<audio id="hitSound9left" src="assets/sounds/hit9left.ogg"></audio>\n<audio id="hitSound9right" src="assets/sounds/hit9right.ogg"></audio>\n\n<audio id="hitSound10" src="assets/sounds/hit10.ogg"></audio>\n<audio id="hitSound10left" src="assets/sounds/hit10left.ogg"></audio>\n<audio id="hitSound10right" src="assets/sounds/hit10right.ogg"></audio>\n\n\n<img id="cursorMeshImg" src="assets/models/laser/laser.png">\n<img id="downIconImg" src="assets/img/downIcon.png">\n<img id="envmapTemplateImg" src="assets/img/envmap.png">\n<img id="envmapImg">\n<img id="favoriteImg" src="assets/img/favorite.png">\n<img id="sliceImg" src="assets/img/slice.png">\n<img id="stepbackImg" src="assets/img/stepback.png">\n<img id="soundboxingImg" src="assets/img/soundboxing.jpg">\n<img id="genresImg" src="assets/img/genres.png">\n<img id="starImg" src="assets/img/star.png">\n<img id="merkabaBloomImg" src="assets/img/merkababloom.png">\n<img id="homeShadowImg" src="assets/img/homeshadow.jpg">\n<img id="backGlowImg" src="assets/img/backglow.png">\n<img id="weaponImg" src="assets/img/weapon.jpg">\n<img id="weapon2Img" src="assets/img/weapon2.jpg">\n<img id="weaponHandleImg" src="assets/img/weaponhandle.png">\n<img id="difficultyImg" src="assets/img/difficulty.png">\n<img id="selectedImg" src="assets/img/selected.png">\n<img id="cutfxImg" src="assets/img/cutfx.png">\n\x3c!--\n<img id="cutFxTemplateImg" src="assets/img/cutfx.png">\n<img id="cutFxImg">\n--\x3e\n<img id="minefxImg" src="assets/img/minefx.png">\n<img id="sideglowImg" src="assets/img/sideglow.png">\n<img id="logoImg" src="assets/img/logo.svg">\n<img id="moonImg" src="assets/img/moon.png">\n<img id="plumeImg" src="assets/img/plume.png">\n<img id="tubeImg" src="assets/img/tube.png">\n<img id="tubeColorImg" src="assets/img/tube.jpg">\n<img id="handStarTrailImg" src="assets/img/handstartrail.png">\n\n<img id="modeRideImg" src="assets/img/moderide.jpg">\n<img id="modeClassicImg" src="assets/img/modeclassic.jpg">\n<img id="modePunchImg" src="assets/img/modepunch.jpg">\n<img id="modeViewerImg" src="assets/img/modeviewer.jpg">\n\n<a-mixin id="slice" slice9="color: #050505; transparent: true; opacity: 0.9; src: #sliceImg; left: 50; right: 52; top: 50; bottom: 52; padding: 0.18"></a-mixin>\n<a-mixin id="font" text="font: assets/fonts/Viga-Regular.json; shader: msdf; letterSpacing: 1"></a-mixin>\n\n<a-mixin id="superKeyboardTextInput" mixin="font"></a-mixin>\n\n<a-mixin id="beat"></a-mixin>\n<a-mixin id="beatBlock"></a-mixin>\n<a-mixin id="beatSign"></a-mixin>\n\n<a-mixin id="arrowBlueBeat" mixin="beat" beat="color: blue; type: arrow"></a-mixin>\n<a-mixin id="arrowRedBeat" mixin="beat" beat="color: red; type: arrow"></a-mixin>\n<a-mixin id="dotBlueBeat" mixin="beat" beat="color: blue; type: dot"></a-mixin>\n<a-mixin id="dotRedBeat" mixin="beat" beat="color: red; type: dot"></a-mixin>\n<a-mixin id="mine" mixin="beat" beat="type: mine"></a-mixin>\n<a-mixin id="beatShadow" mixin="beat" geometry="primitive: plane; width: 0.7; height: 0.6" rotation="-90 0 0" material="src: #minefxImg; shader: flat; color: #000; transparent: true; opacity: 0.2" render-order="beatShadow"></a-mixin>\n\n<a-mixin id="plume" plume obj-model="obj: #plumeObj"></a-mixin>\n<a-mixin id="arrowBluePlume" mixin="plume" plume="type: arrow; color: blue" materials="name: arrowBluePlume"></a-mixin>\n<a-mixin id="arrowRedPlume" mixin="plume" plume="type: arrow; color: red" materials="name: arrowRedPlume"></a-mixin>\n<a-mixin id="dotBluePlume" mixin="plume" plume="type: dot; color: blue" materials="name: dotBluePlume"></a-mixin>\n<a-mixin id="dotRedPlume" mixin="plume" plume="type: dot; color: red" materials="name: dotRedPlume"></a-mixin>\n<a-mixin id="minePlume" mixin="plume" plume="type: mine" materials="name: minePlume"></a-mixin>\n\n<a-mixin\n id="superCut"\n bind__supercutfx="colorPrimary: colorPrimary; colorSecondary: colorSecondary"\n supercutfx\n geometry="primitive: plane; width: 3; height: 3"\n material="shader: superCutFxShader; transparent: true; depthWrite: false"></a-mixin>\n\n<a-mixin\n id="redBeatBroken"\n obj-model="obj: #beatBrokenObj"\n beat-cut-fx="color: red"\n render-order="beats"></a-mixin>\n<a-mixin\n id="blueBeatBroken"\n obj-model="obj: #beatBrokenObj"\n beat-cut-fx="color: blue"\n render-order="beats"></a-mixin>\n<a-mixin\n id="redDotBroken"\n obj-model="obj: #dotBrokenObj"\n beat-cut-fx="color: red; type: dot"\n render-order="beats"></a-mixin>\n<a-mixin\n id="blueDotBroken"\n obj-model="obj: #dotBrokenObj"\n beat-cut-fx="color: blue; type: dot"\n render-order="beats"></a-mixin>\n\n<a-mixin\n id="redDotPunchBroken"\n gltf-model="#dotPunchBrokenObj"\n beat-cut-fx="color: red; type: dot"\n render-order="beats"></a-mixin>\n<a-mixin\n id="blueDotPunchBroken"\n gltf-model="#dotPunchBrokenObj"\n beat-cut-fx="color: blue; type: dot"\n render-order="beats"></a-mixin>\n\n<a-mixin\n id="redBeatFX"\n bind__material="color: colorPrimary"\n obj-model="obj: #cutfxObj"\n material="shader: cutfxShader; progress: 1"\n render-order="menu"\n animation="property: components.material.material.uniforms.progress.value; from: 0; to: 1; dur: 400; loop: false; easing: linear; startEvents: explode"></a-mixin>\n\n<a-mixin\n id="blueBeatFX"\n bind__material="color: colorSecondary"\n obj-model="obj: #cutfxObj"\n material="shader: cutfxShader; progress: 1"\n render-order="menu"\n animation="property: components.material.material.uniforms.progress.value; from: 0; to: 1; dur: 400; loop: false; easing: linear; startEvents: explode"></a-mixin>\n\n<a-mixin\n id="mineBroken"\n gltf-model="#mineBrokenObj"\n beat-cut-fx="type: mine"\n render-order="beats"></a-mixin>\n\n<a-mixin\n id="mineFX"\n geometry="primitive: plane; width: 0.6; height: 0.6"\n material="shader: flat; transparent: true; src: #minefxImg; color: #fff568; depthWrite: false"\n render-order="menu"\n animation="property: components.material.material.opacity; from:1; to:0; dur: 400; loop: false; easing: linear; startEvents: explode"></a-mixin>\n\n<a-mixin\n id="redPunchFX"\n bind__material="color: colorPrimary"\n obj-model="obj: #punchfxObj"\n material="shader: cutfxShader; progress: 1"\n render-order="menu"\n animation="property: components.material.material.uniforms.progress.value; from: 0; to: 1; dur: 600; loop: false; easing: linear; startEvents: explode"></a-mixin>\n\n<a-mixin\n id="bluePunchFX"\n bind__material="color: colorSecondary"\n obj-model="obj: #punchfxObj"\n material="shader: cutfxShader; progress: 1"\n render-order="menu"\n animation="property: components.material.material.uniforms.progress.value; from: 0; to: 1; dur: 600; loop: false; easing: linear; startEvents: explode"></a-mixin>\n\n<a-mixin\n bind__material="color: colorTertiary"\n id="yellowPunchFX"\n obj-model="obj: #punchfxObj"\n material="shader: cutfxShader; progress: 1"\n render-order="menu"\n animation="property: components.material.material.uniforms.progress.value; from: 0; to: 1; dur: 600; loop: false; easing: linear; startEvents: explode"></a-mixin>\n\n<a-mixin\n id="wall"\n material="shader: wallShader; transparent: true; side: double; opacity: 0"\n animation__fadein="property: components.material.material.uniforms.opacity.value; from: 0; to: 1; easing: easeInCubic; autoplay: false; dur: 1500"\n animation__scalein="property: object3D.position.y; from: -5; to: 0; easing: easeInOutElastic; autoplay: false; dur: 1500"\n render-order\n wall></a-mixin>\n\n<a-mixin\n id="tunnel"\n obj-model="obj: #tunnelObj"\n materials="name: tunnel"></a-mixin>\n\n<a-mixin\n id="bigMenuButton"\n geometry="primitive: plane; width: 1.15; height: 0.23"\n material="shader: panelShader; brightness: 0.5; borderWidth: 0.05; ratio: 4; borderRadius: 0.6"\n animation__mouseenter1="property: components.material.material.uniforms.activePanel.value; from: 0; to: 1; startEvents: mouseenter; pauseEvents: mouseleave; dur: 100"\n animation__mouseleave1="property: components.material.material.uniforms.activePanel.value; from: 1; to: 0; startEvents: mouseleave; pauseEvents: mouseenter; dur: 100"\n animation__mouseenter2="property: scale; from: 1 1 1; to: 1.04 1.04 1.04; startEvents: mouseenter; pauseEvents: mouseleave; dur: 80"\n animation__mouseleave2="property: scale; to: 1 1 1; from: 1.04 1.04 1.04; startEvents: mouseleave; pauseEvents: mouseenter; dur: 80"\n render-order="menubutton"></a-mixin>\n\n<a-mixin id="cancelSoundUI" play-sound__cancel="event: click; sound: #clearSound; volume: 0.5"></a-mixin>\n<a-mixin id="clickSoundUI" play-sound__click="event: click; sound: #confirmSound; volume: 0.25"></a-mixin>\n<a-mixin id="hoverSoundUI" play-sound__hover="event: mouseenter; sound: #hoverSound; volume: 0.1"></a-mixin>\n\x3c!-- </require> --\x3e</require>\n </a-assets>\n\n <a-entity id="beatObjTemplate" obj-model="obj: #beatObj" visible="false"></a-entity>\n <a-entity id="redBeatObjTemplate" obj-model="obj: #redBeatObj" visible="false"></a-entity>\n <a-entity id="blueBeatObjTemplate" obj-model="obj: #blueBeatObj" visible="false"></a-entity>\n <a-entity id="dotRedObjTemplate" obj-model="obj: #dotRedObj" visible="false"></a-entity>\n <a-entity id="dotBlueObjTemplate" obj-model="obj: #dotBlueObj" visible="false"></a-entity>\n <a-entity id="mineObjTemplate" obj-model="obj: #mineObj" visible="false"></a-entity>\n <a-entity id="cursorLaser" obj-model="obj: #laserObj" visible="false"></a-entity>\n\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/loading.html"> --\x3e\n<a-entity\n id="loadingSongInfoContainer"\n bind__animation__scale="enabled: isLoading"\n bind__visible="isLoading"\n animation__scale="property: scale; from: 1 1 1; to: 1.05 1.05 1.05; dir: alternate; loop: true; dur: 1200; easing: easeInOutCubic"\n position="0 1.5 -2">\n\n <a-entity\n id="loadingMenuBackground"\n bind-toggle__raycastable="isLoading"\n render-order="menu"\n geometry="primitive: plane; width: 1.15; height: 1.2"\n material="shader: panelShader; ratio: 1.15; borderRadius: 0.4"\n position="0 0 -0.03"></a-entity>\n\n <a-entity id="loadingSongImage"\n copy-texture="from: #menuSelectedChallengeImage"\n geometry="primitive: plane; buffer: false; skipCache: true; height: 0.3; width: 0.3"\n material="shader: flat; transparent: false"\n position="0 0.24 0"\n render-order="menu"></a-entity>\n\n <a-entity id="loadingSongInfo">\n <a-entity\n position="0 -0.05 0"\n mixin="font"\n bind__text="color: colorSecondary"\n bind__text-truncate="value: challenge.songSubName + \' - \' + challenge.author"\n text="wrapCount: 40; align: center"\n text-truncate="length: 35"\n render-order="menutext"></a-entity>\n\n <a-entity position="0 -0.13 0"\n mixin="font"\n text="align: center; color: #FFF; wrapCount: 21; baseline: top; lineHeight: 36; width: 0.81"\n bind__text="value: challenge.metadata.songName"\n render-order="menutext"></a-entity>\n\n <a-entity\n id="loadingText"\n mixin="font"\n bind__animation__color="enabled: isLoading"\n bind__text="color: colorPrimary; value: loadingText; wrapCount: hasSongLoadError && 24 || 18"\n bind__visible="isLoading"\n text="align: center; wrapCount: 18; width: 0.65"\n render-order="menutext"\n position="0 -0.32 0.001"></a-entity>\n\n <a-entity\n id="zipLoaderIndicator"\n bind__material="color: colorPrimary"\n bind__visible="isZipFetching"\n geometry="primitive: plane; height: 0.1; width: 0.1"\n material="shader: ring; radiusInner: 0.2; radiusOuter: 0.9; progress: 0; transparent: true"\n render-order="menuitem"\n position="0 -0.4 0.002">\n </a-entity>\n\n <a-entity\n id="songProcessingIndicator"\n bind__animation__spin="enabled: isSongProcessing"\n bind__material="color: colorPrimary"\n bind__visible="isSongProcessing"\n animation__spin="property: object3D.rotation.z; from: 0; to: -360; easing: linear; dur: 1000; loop: true"\n geometry="primitive: plane; height: 0.15; width: 0.15"\n material="shader: ring; radiusInner: 0.2; radiusOuter: 0.4; transparent: true; progress: 0.2"\n render-order="menutext"\n position="0 -0.4 0.004"\n visible="false">\n </a-entity>\n\n <a-entity\n id="loadingCancelButton"\n mixin="bigMenuButton"\n bind-toggle__raycastable="isLoading"\n position="0 -0.67 0.01"\n proxy-event="event: click; to: a-scene; as: songloadcancel">\n <a-entity mixin="font" text="align: center; color: #FAFAFA; wrapCount: 20; value: CANCEL" position="0 -0.065 0.001"></a-entity>\n </a-entity>\n </a-entity>\n</a-entity>\n\x3c!-- </require> --\x3e</require>\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/stage.html"> --\x3e\n<a-entity\n id="audioAnalyser"\n audioanalyser="fftSize: 32; enableBeatDetection: false; enableLevels: false; enableWaveform: false; enableVolume: false"></a-entity>\n\n<a-entity id="stage" no-frustum-cull follow-z="target: #curveFollowRig">\n <a-entity\n id="backglow"\n obj-model="obj: #backGlowObj"\n materials="name: backglow"\n render-order="stage"></a-entity>\n\n <a-entity\n id="rings"\n obj-model="obj: #ringsObj"\n materials="name: rings"\n position="0 0 -1500"\n render-order="stage"></a-entity>\n\n <a-entity\n id="auroras"\n class="aurora"\n obj-model="obj: #aurorasObj"\n materials="name: aurora"\n render-order="aurora"></a-entity>\n\n <a-entity\n id="merkaba"\n obj-model="obj: #merkabaObj"\n bind__visible="!isVictory && !isGameOver"\n materials="name: merkaba"\n animation="property: rotation; from: 0 0 0; to: 360 360 360; dur: 50000; easing: linear; loop: true"\n position="0 46 -1500"></a-entity>\n\n <a-entity\n class="merkababloom"\n geometry="primitive: plane; width: 200; height: 200"\n material="shader: flat; src: #merkabaBloomImg; blending: additive; depthTest: false; color: #888"\n position="0 46 -1400"\n render-order="stage"></a-entity>\n\n <a-entity\n class="merkababloom"\n bind__material="color: colorTertiary"\n geometry="primitive: plane; width: 250; height: 250"\n animation="property: object3D.rotation.z; from: 0; to: 360; loop: true; easing: linear; dur: 30000"\n material="shader: flat; src: #merkabaBloomImg; blending: additive; depthTest: false"\n position="0 46 -1380"\n render-order="stage"></a-entity>\n\n <a-entity\n id="moon"\n geometry="primitive: plane; width: 1000; height: 500"\n position="0 1000 -1000"\n rotation="45 0 0"\n materials="name: moon"\n ></a-entity>\n\n <a-entity class="stars" stars render-order="particles"></a-entity>\n\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/intro.html"> --\x3e\n<a-entity\n id="mainLogo"\n geometry="primitive: plane; width: 9; height: 1.125"\n material="shader: flat; src: #logoImg; transparent: true; depthTest: false; blending: additive; opacity: 0"\n position="0 3.3 -2.5"\n rotation="0 0 0"\n scale="0.8 0.8 0.8"\n bind__visible="introActive || menuActive"\n animation__opacity="property: components.material.material.opacity; from: 0; to: 1; dur: 2000; delay: 1000"\n animation__position="property: object3D.position.y; to: 3.4; dur: 2000; easing: easeInOutQuad; startEvents: startgame"></a-entity>\n\n<a-entity\n id="startButton"\n bind__visible-raycastable="introActive"\n geometry="primitive: plane; width: 1; height: 0.35"\n position="0 1.6 -2.2"\n render-order="menu"\n proxy-event="event: click; to: a-scene, #menu, #mainlogo, #menuTopButtons, #menuBackground; as: startgame"\n delayed-proxy-event="event: click; to: a-scene; as: menuopeningend; delay: 1800"\n mixin="bigMenuButton"\n play-sound__hover="event: mouseenter; sound: #hoverSound; volume: 0.1"\n play-sound__click="event: click; sound: #confirmSound; volume: 0.25"\n material="ratio: 3; opacity: 0"\n animation="property: components.material.material.uniforms.opacity.value; from: 0; to: 1; dur: 500; delay: 3000">\n <a-entity\n id="startButtonLabel"\n mixin="font"\n text="value: BEGIN; color: #f0f0f0; align: center; width: 1; wrapCount: 12; opacity: 0"\n position="0 -0.1 0.01"\n animation="property: components.text.material.uniforms.opacity.value; from: 0; to: 1; dur: 500; delay: 3500"\n ></a-entity>\n</a-entity>\n\x3c!-- </require> --\x3e</require>\n</a-entity>\n\x3c!-- </require> --\x3e</require>\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/menu.html"> --\x3e\n\x3c!-- Macro is a templating function. It is rendered into the HTML below with searchResults(). --\x3e\n\n\n\n<template id="searchResultTemplate">\n <a-entity class="searchResult" bind-item__data-id="item.id" bind-item__data-index="item.index">\n <a-entity class="searchResultBackground" bind-item__active-item="active: menuSelectedChallenge.id === item.id"\n bind-item__animation__mouseenter="enabled: menuSelectedChallenge.id !== item.id"\n bind-item__animation__mouseleave="enabled: menuSelectedChallenge.id !== item.id"\n bind-toggle__raycastable="mainMenuActive || isSearching" bind__material="color: colorPrimary"\n animation__mouseenter="property: components.material.material.opacity; to: 0.4; startEvents: mouseenter; pauseEvents: mouseleave; dur: 75; delay: 1"\n animation__mouseleave="property: components.material.material.opacity; to: 0.0; startEvents: mouseleave; pauseEvents: mouseenter; dur: 75"\n geometry="primitive: plane; width: 1.1; height: 0.2"\n material="shader: flat; transparent: true; opacity: 0.0; src: #selectedImg" position="0 -0.13 -0.002"\n play-sound="event: mouseenter; sound: #hoverSound; volume: 0.03" render-order="menuitem"></a-entity>\n </a-entity>\n </a-entity>\n</template>\n\n\n\x3c!-- Menu container begins here. --\x3e\n<a-entity id="menu" bind__visible="menuActive" position="0 1.4 -2.3"\n animation__position="property: object3D.position.z; to: -2; dur: 1500; easing: easeInOutCubic; delay: 300; startEvents: startgame">\n\n <a-entity id="menuBackground"\n bind__menu-midsection="active: !!menuSelectedChallenge.id && (mainMenuActive || difficultyFilterMenuOpen) || difficultyFilterMenuOpen; selectedChallenge: menuSelectedChallenge.id"\n bind-toggle__raycastable="menuActive || genreMenuOpen || isSearching || difficultyFilterMenuOpen"\n geometry="primitive: plane; width: 3.4; height: 1.82" material="shader: panelShader; ratio: 1.86; opacity: 0"\n animation__opacity="property: components.material.material.uniforms.opacity.value; from: 0; to: 1; dur: 1000; delay: 300; startEvents: startgame"\n animation__midsectionshow="property: components.material.material.uniforms.midSection.value; from: 0; to: 1; dur: 160; startEvents: showdifficultysection; easing: easeOutCubic"\n animation__midsectionhide="property: components.material.material.uniforms.midSection.value; from: 1: to: 0; dur: 160; startEvents: hidedifficultysection; easing: easeOutCubic"\n render-order="menu" position="0 0 -0.005"></a-entity>\n\n <a-entity id="mainMenu" bind__visible="mainMenuActive && !isMenuOpening || isSearching">\n <a-entity id="searchResultsContainer" position="0 0 0.001" class="menuAnimation"\n bind__menu-slide-animation="isSearching: isSearching; menuSelectedChallengeId: menuSelectedChallenge.id"\n animation__menuleft="property: object3D.position.x; to: -0.79; dur: 200; easing: easeOutCubic; autoplay: false"\n animation__menuright="property: object3D.position.x; from: -0.79; to: 0; dur: 200; easing: easeOutCubic; autoplay: false">\n\n \n<a-entity id="searchResultList"\n bind-for="for: item; in: searchResultsPage; key: id; template: #searchResultTemplate; updateInPlace: true; pool: 6; delay: 25"\n layout="type: box; columns: 1; marginRow: -0.2; orderAttribute: data-index" search-result-list position="0 0.644 0">\n</a-entity>\n\n\x3c!-- All search result text merged and spaced out. --\x3e\n<a-entity id="searchSongNameTexts" mixin="font" bind__text="value: search.songNameTexts" render-order="menutext"\n text="baseline: top; align: left; color: #FAFAFA; wrapCount: 28; lineHeight: 130" position="0.181 0.51943 0.001">\n</a-entity>\n<a-entity id="searchSongSubNameTexts" mixin="font"\n bind__text="color: colorSecondaryBright; value: search.songSubNameTexts" render-order="menutext"\n text="baseline: top; align: left; wrapCount: 42; lineHeight: 190" position="0.181 0.445 0.001">\n</a-entity>\n\n<a-entity id="searchThumbnailImages" bind__search-thumbnail-atlas="dummyUpdater: search.songSubNameTexts"\n bind__visible="searchResultsPage.length > 0" geometry="primitive: plane; buffer: false; width: 0.2; height: 1.2"\n dynamic-texture-atlas="canvasId: thumbnailAtlasMap; canvasWidth: 64; canvasHeight: 512; numColumns: 1; numRows: 6"\n material="shader: flat; transparent: true" render-order="menubutton" position="-0.45 0.0146 0.002"></a-entity>\n\n<a-mixin id="searchPageButton"\n animation__mouseenter="property: components.slice9.material.opacity; from: 0; to: 0.3; startEvents: mouseenter; pauseEvents: mouseleave; dur: 150"\n animation__mouseleave="property: components.slice9.material.opacity; from: 0.3; to: 0; startEvents: mouseleave; pauseEvents: mouseenter; dur: 150"\n mixin="slice" raycaster-target="width: 1; height: 0.32" render-order="menubutton"\n slice9="width: 0.8; color: #08bfa2; height: 0.130; padding: 0.03; opacity: 0"></a-mixin>\n\n<a-entity id="searchPrevPage" mixin="searchPageButton" bind__slice9="color: colorPrimary"\n bind__visible-raycastable="search.hasPrev && (mainMenuActive || isSearching)"\n raycaster-target="bindToggle: search.hasNext && menuActive; position: 0 0.08 0" position="-0 0.69 0.01"\n proxy-event="event: click; to: a-scene; as: searchprevpage; captureBubbles: true">\n <a-entity id="prevArrow" bind__material="color: colorPrimary" geometry="primitive: plane; width: 0.12; height: 0.12"\n material="shader: flat; src: #downIconImg; transparent: true" rotation="0 0 180" position="0 0 -0.001"></a-entity>\n</a-entity>\n\n<a-entity id="searchNextPage" mixin="searchPageButton" bind__slice9="color: colorSecondary"\n raycaster-target="bindToggle: search.hasNext && (mainMenuActive || isSearching); position: 0 -0.08 0"\n position="-0 -0.674 0.01" proxy-event="event: click; to: a-scene; as: searchnextpage; captureBubbles: true"\n bind__visible="search.hasNext">\n <a-entity id="nextArrow" bind__material="color: colorSecondary" geometry="primitive: plane; width: 0.12; height: 0.12"\n material="shader: flat; src: #downIconImg; transparent: true" position="0 0 -0.001"></a-entity>\n</a-entity>\n\n </a-entity>\n\n <a-entity id="menuDifficultiesGroup" position="0 0.18 0">\n\n \x3c!-- Top-aligned. --\x3e\n \x3c!-- Uses bind-for and bind-item to render difficulties. --\x3e\n <a-entity id="menuDifficulties" bind-for="for: item; in: menuDifficultiesIds; updateInPlace: true; pool: 10"\n bind__visible="!!menuSelectedChallenge.id"\n layout="type: box; columns: 1; marginRow: -0.2; orderAttribute: data-bind-for-key" position="0 0.34 0"\n menu-difficulty-select>\n \n <template>\n \x3c!-- Item is a string representing the difficulty. --\x3e\n <a-entity class="difficultyOption" bind-item__data-difficulty="item">\n <a-entity class="difficultyBackground"\n bind-item__active-item="active: (menuSelectedChallenge.difficultyId === item)"\n bind-item__animation__mouseenter="enabled: !(menuSelectedChallenge.difficultyId === item)"\n bind-item__animation__mouseleave="enabled: !(menuSelectedChallenge.difficultyId === item)"\n bind-item__difficulty-background="enabled: menuActive && !!menuSelectedChallenge.id && !(menuSelectedChallenge.difficultyId === item) && !difficultyFilterMenuOpen"\n bind__material="color: colorPrimary" geometry="primitive: plane; width: 0.4; height: 0.2"\n material="shader: flat; transparent: true; opacity: 0.0; src: #difficultyImg" position="0 -0.005 0"\n play-sound="event: mouseenter; sound: #hoverSound; volume: 0.03"\n animation__mouseenter="property: components.material.material.opacity; to: 0.3; startEvents: mouseenter; pauseEvents: mouseleave; dur: 75"\n event-set__mouseenter="visible: true"\n animation__mouseleave="property: components.material.material.opacity; to: 0.0; startEvents: mouseleave; pauseEvents: mouseenter; dur: 75"\n event-set__mouseleave="visible: true; _delay: 160" render-order="menuitem"></a-entity>\n <a-entity class="difficultyText" mixin="font"\n bind-item__active-text-color="active: (menuSelectedChallenge.difficultyId === item)"\n bind-item__difficulty-text="id: item" active-text-color="color: #fff"\n text="wrapCount: 30; align: center; color: #8d8d8d" position="0 -0.057 0.001" render-order="menutext">\n </a-entity>\n </a-entity>\n </template>\n \n </a-entity>\n </a-entity>\n\n \x3c!-- Selected challenge info. --\x3e\n <a-entity id="menuSelectedChallengePanel" bind__visible="!!menuSelectedChallenge.id"\n position="0.8394583182784089 0 0.001">\n <a-entity id="menuFavoriteButton" bind__animation__mouseenter="to: menuSelectedChallenge.isFavorited && 0.25 || 1"\n bind__animation__mouseleave="to: menuSelectedChallenge.isFavorited && 1 || 0.25"\n bind__material="color: colorTertiary; opacity: menuSelectedChallenge.isFavorited && 1 || 0.25"\n bind__raycastable="menuActive && !!menuSelectedChallenge.id"\n animation__mouseenter="property: components.material.material.opacity; startEvents: mouseenter; dur: 150; easing: easeInOutCubic"\n animation__mouseleave="property: components.material.material.opacity; startEvents: mouseleave; dur: 100; easing: easeInOutCubic"\n geometry="primitive: plane; width: 0.1; height: 0.1"\n material="src: #favoriteImg; shader: flat; transparent: true; opacity: 0.25"\n play-sound__hover="event: mouseenter; sound: #hoverSound; volume: 0.1" position="0.46 0.68 0.001"\n proxy-event="event: click; to: a-scene; as: favoritetoggle" render-order="menuitem"></a-entity>\n\n <a-entity id="menuSelectedChallengeImage"\n bind__menu-selected-challenge-image="coverURL: menuSelectedChallenge.coverURL"\n geometry="primitive: plane; height: 0.4; width: 0.4" material="shader: flat" position="0 0.42 0"></a-entity>\n\n <a-entity id="menuSelectedChallengeInfoContainer" position="0 0.058 0">\n <a-entity id="menuSelectedChallengeSongAuthor" mixin="font"\n bind__text="color: colorSecondaryBright; value: (menuSelectedChallenge.metadata.songSubName || menuSelectedChallenge.metadata.songAuthorName || \'Unknown Artist\')" position="0 0.042 0"\n render-order="menutext" text="wrapCount: 40; lineHeight: 40; width: 1.185; align: center; baseline: center">\n </a-entity>\n <a-entity id="menuSelectedChallengeSongName" mixin="font"\n bind__text="color: colorPrimary; value: menuSelectedChallenge.metadata.songName" position="0 -0.059 0"\n render-order="menutext" text="align: center; wrapCount: 31; baseline: top; lineHeight: 36; width: 1.4">\n </a-entity>\n <a-entity id="menuSelectedChallengeInfo" mixin="font" bind__text="value: menuSelectedChallenge.songInfoText"\n mixin="font" position="0 -0.18 0" render-order="menutext"\n text="align: center; color: #989898; wrapCount: 55; lineHeight: 72; width: 1.5; baseline: top"></a-entity>\n </a-entity>\n\n <a-entity id="playButton"\n bind__visible-raycastable="menuActive && !!menuSelectedChallenge.id && !genreMenuOpen && !difficultyFilterMenuOpen && !isIOS && !hasSongLoadError && mpHostControl && mpCanStart"\n geometry="primitive: plane; width: 0.7; height: 0.25"\n play-sound="event: mouseenter; sound: #hoverSound; volume: 0.03"\n play-sound__click="event: click; sound: #confirmSound; volume: 0.25" position="0 -0.561 0"\n proxy-event="event: click; to: a-scene; as: playbuttonclick"\n material="shader: panelShader; brightness: 0.7; transparent: true; midSection: 0; ratio: 2.8; borderRadius: 0.6; borderWidth: 0.08"\n render-order="menubutton"\n animation__mouseenter1="property: components.material.material.uniforms.activePanel.value; from: 0; to: 1; startEvents: mouseenter; pauseEvents: mouseleave; dur: 100"\n animation__mouseleave1="property: components.material.material.uniforms.activePanel.value; from: 1; to: 0; startEvents: mouseleave; pauseEvents: mouseenter; dur: 100"\n animation__mouseenter2="property: scale; from: 1 1 1; to: 1.1 1.1 1.1; startEvents: mouseenter; pauseEvents: mouseleave; dur: 100"\n animation__mouseleave2="property: scale; to: 1 1 1; from: 1.1 1.1 1.1; startEvents: mouseleave; pauseEvents: mouseenter; dur: 100">\n <a-entity mixin="font" text="align: center; color: #FFF; wrapCount: 15; value: PLAY" position="0 -0.085 0.01">\n </a-entity>\n </a-entity>\n\n <a-entity id="iOSNotice" bind__visible="mainMenuActive && isIOS" mixin="font" position="0 -0.5 0.01"\n text="align: center; baseline: top; color: #FFF; wrapCount: 32; value: Sorry, iOS is currently not playable but support is coming soon!">\n </a-entity>\n\n <a-entity id="menuLoadError" bind__visible="hasSongLoadError" mixin="font" position="0 -0.5 0.01"\n text="align: center; baseline: top; color: #FFF; wrapCount: 32; value: Sorry! There was an error loading this song.">\n </a-entity>\n </a-entity>\n\n <a-entity id="searchError" mixin="font" bind__visible="search.hasError" render-order="menuText"\n text="align: center; value: Sorry, there was an issue fetching search results. Please try again."\n position="0 0 0.01"></a-entity>\n\n <a-entity id="menuNoPlaylists" mixin="font"\n bind__visible="playlist === \'favorites\' && favorites.length === 0 && !menuSelectedChallenge.id"\n render-order="menuText" position="0 0.1 0.01"\n text="align: center; baseline: top; color: #FFF; wrapCount: 32; value: Add a song to your favorites by clicking the star in the top right of the menu after selected a song.">\n </a-entity>\n\n <a-entity id="searchNoResults" mixin="font"\n bind__visible="!isSearching && search.results.length === 0 && playlist !== \'favorites\'" render-order="menuText"\n text="align: center; value: No search results found. Please try again with another query." position="0 0 0.01">\n </a-entity>\n </a-entity>\n\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/genreMenu.html"> --\x3e\n<a-entity\n id="genreMenu"\n bind-for="for: genre; in: genres; updateInPlace: true; key: name"\n bind__visible="genreMenuOpen"\n layout="type: box; columns: 6; marginRow: 0.4; marginColumn: 0.4; align: center"\n menu-genre\n position="0 0 0.05">\n <template>\n <a-entity class="genre" bind-item__data-genre="item">\n <a-entity\n mixin="slice"\n slice9="opacity: 0.9; width: 0.35; left: 70; top: 70; height: 0.35; padding: 0.07"\n animation__mouseenter2="property: scale; from: 1 1 1; to: 1.03 1.03 1.03; startEvents: mouseenter; pauseEvents: mouseleave; easing: easeOutCubic; dur: 150"\n animation__mouseleave2="property: scale; from: 1.03 1.03 1.03; to: 1 1 1; startEvents: mouseleave; pauseEvents: mouseenter; easing: easeOutCubic; dur: 150"\n proxy-event__enter="event: mouseenter; to: CHILDREN; captureBubbles: true"\n proxy-event__leave="event: mouseleave; to: CHILDREN; captureBubbles: true"\n play-sound__click="event: click; sound: #confirmSound; volume: 0.1"\n raycaster-target="bindToggle: genreMenuOpen; width: 0.35; height: 0.35"\n render-order__nonrecursive="menubutton">\n <a-entity\n mixin="font"\n bind-item__text="value: item.name"\n text="align: center; width: 1.1; color: #888"\n animation__mouseenter="property: components.text.material.uniforms.color.value; from: #888; to: #FFF; type: color; startEvents: mouseenter; pauseEvents: mouseleave; easing: easeOutCubic; dur: 150"\n animation__mouseleave="property: components.text.material.uniforms.color.value; from: #FFF; to: #888; type: color; startEvents: mouseleave; pauseEvents: mouseenter; easing: easeOutCubic; dur: 150"\n render-order="menutext"\n position="0 -0.16 0.001"></a-entity>\n <a-entity\n class="genreIcon"\n bind-item__atlas-uvs="totalColumns: 6; totalRows: 3; row: item.row; column: item.column"\n geometry="primitive: plane; width: 0.22; height: 0.22; buffer: false; skipCache: true"\n position="0 0.04 0.002"\n material="shader: flat; src: #genresImg; transparent: true; color: #888"\n render-order="menutext"\n animation__mouseenter="property: components.material.material.color; type: color; from: #888; to: #FFF; startEvents: mouseenter; pauseEvents: mouseleave; easing: easeOutCubic; dur: 150"\n animation__mouseleave="property: components.material.material.color; type: color; from: #FAFAFA; to: #888; startEvents: mouseleave; pauseEvents: mouseenter; easing: easeOutCubic; dur: 150"></a-entity>\n </a-entity>\n </a-entity>\n </template>\n</a-entity>\n\x3c!-- </require> --\x3e</require>\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/difficultyMenu.html"> --\x3e\n\n\n\n\n<a-entity\n id="difficultyFilterMenu"\n bind__visible="difficultyFilterMenuOpen"\n layout="type: box; columns: 1; marginRow: -0.2"\n difficulty-filter\n position="0 0.5 0">\n \n \n <a-entity class="difficultyFilterOption" data-difficulty-filter="All">\n <a-entity class="difficultyFilterBackground"\n bind__active-item="active: difficultyFilter === \'All\'"\n bind__animation__mouseenter="enabled: difficultyFilter !== \'All\'"\n bind__animation__mouseleave="enabled: difficultyFilter !== \'All\'"\n bind__animation__mouseentervisible="enabled: difficultyFilter !== \'All\'"\n bind__animation__mouseleavevisible="enabled: difficultyFilter !== \'All\'"\n bind__difficulty-background="enabled: difficultyFilterMenuOpen && difficultyFilter !== \'All\'"\n bind__material="color: colorPrimary"\n animation__mouseenter="property: components.material.material.opacity; to: 0.3; startEvents: mouseenter; dur: 150"\n animation__mouseleave="property: components.material.material.opacity; to: 0.0; startEvents: mouseleave; dur: 75"\n event-set__mouseenter="visible: true"\n event-set__mouseleave="visible: true; _delay: 160"\n geometry="primitive: plane; width: 0.4; height: 0.2"\n material="shader: flat; transparent: true; opacity: 0; src: #difficultyImg"\n position="0 -0.005 0"\n play-sound="event: mouseenter; sound: #hoverSound; volume: 0.03"\n render-order="menuitem"></a-entity>\n <a-entity\n class="difficultyFilterText"\n mixin="font"\n bind__active-text-color="active: difficultyFilter === \'All\'"\n active-text-color="color: #fff"\n difficulty-text="id: All"\n text="wrapCount: 30; align: center; color: #8d8d8d"\n position="0 -0.057 0.001"\n render-order="menutext"></a-entity>\n </a-entity>\n\n \n \n <a-entity class="difficultyFilterOption" data-difficulty-filter="Easy">\n <a-entity class="difficultyFilterBackground"\n bind__active-item="active: difficultyFilter === \'Easy\'"\n bind__animation__mouseenter="enabled: difficultyFilter !== \'Easy\'"\n bind__animation__mouseleave="enabled: difficultyFilter !== \'Easy\'"\n bind__animation__mouseentervisible="enabled: difficultyFilter !== \'Easy\'"\n bind__animation__mouseleavevisible="enabled: difficultyFilter !== \'Easy\'"\n bind__difficulty-background="enabled: difficultyFilterMenuOpen && difficultyFilter !== \'Easy\'"\n bind__material="color: colorPrimary"\n animation__mouseenter="property: components.material.material.opacity; to: 0.3; startEvents: mouseenter; dur: 150"\n animation__mouseleave="property: components.material.material.opacity; to: 0.0; startEvents: mouseleave; dur: 75"\n event-set__mouseenter="visible: true"\n event-set__mouseleave="visible: true; _delay: 160"\n geometry="primitive: plane; width: 0.4; height: 0.2"\n material="shader: flat; transparent: true; opacity: 0; src: #difficultyImg"\n position="0 -0.005 0"\n play-sound="event: mouseenter; sound: #hoverSound; volume: 0.03"\n render-order="menuitem"></a-entity>\n <a-entity\n class="difficultyFilterText"\n mixin="font"\n bind__active-text-color="active: difficultyFilter === \'Easy\'"\n active-text-color="color: #fff"\n difficulty-text="id: Easy"\n text="wrapCount: 30; align: center; color: #8d8d8d"\n position="0 -0.057 0.001"\n render-order="menutext"></a-entity>\n </a-entity>\n\n \n \n <a-entity class="difficultyFilterOption" data-difficulty-filter="Normal">\n <a-entity class="difficultyFilterBackground"\n bind__active-item="active: difficultyFilter === \'Normal\'"\n bind__animation__mouseenter="enabled: difficultyFilter !== \'Normal\'"\n bind__animation__mouseleave="enabled: difficultyFilter !== \'Normal\'"\n bind__animation__mouseentervisible="enabled: difficultyFilter !== \'Normal\'"\n bind__animation__mouseleavevisible="enabled: difficultyFilter !== \'Normal\'"\n bind__difficulty-background="enabled: difficultyFilterMenuOpen && difficultyFilter !== \'Normal\'"\n bind__material="color: colorPrimary"\n animation__mouseenter="property: components.material.material.opacity; to: 0.3; startEvents: mouseenter; dur: 150"\n animation__mouseleave="property: components.material.material.opacity; to: 0.0; startEvents: mouseleave; dur: 75"\n event-set__mouseenter="visible: true"\n event-set__mouseleave="visible: true; _delay: 160"\n geometry="primitive: plane; width: 0.4; height: 0.2"\n material="shader: flat; transparent: true; opacity: 0; src: #difficultyImg"\n position="0 -0.005 0"\n play-sound="event: mouseenter; sound: #hoverSound; volume: 0.03"\n render-order="menuitem"></a-entity>\n <a-entity\n class="difficultyFilterText"\n mixin="font"\n bind__active-text-color="active: difficultyFilter === \'Normal\'"\n active-text-color="color: #fff"\n difficulty-text="id: Normal"\n text="wrapCount: 30; align: center; color: #8d8d8d"\n position="0 -0.057 0.001"\n render-order="menutext"></a-entity>\n </a-entity>\n\n \n \n <a-entity class="difficultyFilterOption" data-difficulty-filter="Hard">\n <a-entity class="difficultyFilterBackground"\n bind__active-item="active: difficultyFilter === \'Hard\'"\n bind__animation__mouseenter="enabled: difficultyFilter !== \'Hard\'"\n bind__animation__mouseleave="enabled: difficultyFilter !== \'Hard\'"\n bind__animation__mouseentervisible="enabled: difficultyFilter !== \'Hard\'"\n bind__animation__mouseleavevisible="enabled: difficultyFilter !== \'Hard\'"\n bind__difficulty-background="enabled: difficultyFilterMenuOpen && difficultyFilter !== \'Hard\'"\n bind__material="color: colorPrimary"\n animation__mouseenter="property: components.material.material.opacity; to: 0.3; startEvents: mouseenter; dur: 150"\n animation__mouseleave="property: components.material.material.opacity; to: 0.0; startEvents: mouseleave; dur: 75"\n event-set__mouseenter="visible: true"\n event-set__mouseleave="visible: true; _delay: 160"\n geometry="primitive: plane; width: 0.4; height: 0.2"\n material="shader: flat; transparent: true; opacity: 0; src: #difficultyImg"\n position="0 -0.005 0"\n play-sound="event: mouseenter; sound: #hoverSound; volume: 0.03"\n render-order="menuitem"></a-entity>\n <a-entity\n class="difficultyFilterText"\n mixin="font"\n bind__active-text-color="active: difficultyFilter === \'Hard\'"\n active-text-color="color: #fff"\n difficulty-text="id: Hard"\n text="wrapCount: 30; align: center; color: #8d8d8d"\n position="0 -0.057 0.001"\n render-order="menutext"></a-entity>\n </a-entity>\n\n \n \n <a-entity class="difficultyFilterOption" data-difficulty-filter="Expert">\n <a-entity class="difficultyFilterBackground"\n bind__active-item="active: difficultyFilter === \'Expert\'"\n bind__animation__mouseenter="enabled: difficultyFilter !== \'Expert\'"\n bind__animation__mouseleave="enabled: difficultyFilter !== \'Expert\'"\n bind__animation__mouseentervisible="enabled: difficultyFilter !== \'Expert\'"\n bind__animation__mouseleavevisible="enabled: difficultyFilter !== \'Expert\'"\n bind__difficulty-background="enabled: difficultyFilterMenuOpen && difficultyFilter !== \'Expert\'"\n bind__material="color: colorPrimary"\n animation__mouseenter="property: components.material.material.opacity; to: 0.3; startEvents: mouseenter; dur: 150"\n animation__mouseleave="property: components.material.material.opacity; to: 0.0; startEvents: mouseleave; dur: 75"\n event-set__mouseenter="visible: true"\n event-set__mouseleave="visible: true; _delay: 160"\n geometry="primitive: plane; width: 0.4; height: 0.2"\n material="shader: flat; transparent: true; opacity: 0; src: #difficultyImg"\n position="0 -0.005 0"\n play-sound="event: mouseenter; sound: #hoverSound; volume: 0.03"\n render-order="menuitem"></a-entity>\n <a-entity\n class="difficultyFilterText"\n mixin="font"\n bind__active-text-color="active: difficultyFilter === \'Expert\'"\n active-text-color="color: #fff"\n difficulty-text="id: Expert"\n text="wrapCount: 30; align: center; color: #8d8d8d"\n position="0 -0.057 0.001"\n render-order="menutext"></a-entity>\n </a-entity>\n\n \n \n <a-entity class="difficultyFilterOption" data-difficulty-filter="Expertplus">\n <a-entity class="difficultyFilterBackground"\n bind__active-item="active: difficultyFilter === \'Expertplus\'"\n bind__animation__mouseenter="enabled: difficultyFilter !== \'Expertplus\'"\n bind__animation__mouseleave="enabled: difficultyFilter !== \'Expertplus\'"\n bind__animation__mouseentervisible="enabled: difficultyFilter !== \'Expertplus\'"\n bind__animation__mouseleavevisible="enabled: difficultyFilter !== \'Expertplus\'"\n bind__difficulty-background="enabled: difficultyFilterMenuOpen && difficultyFilter !== \'Expertplus\'"\n bind__material="color: colorPrimary"\n animation__mouseenter="property: components.material.material.opacity; to: 0.3; startEvents: mouseenter; dur: 150"\n animation__mouseleave="property: components.material.material.opacity; to: 0.0; startEvents: mouseleave; dur: 75"\n event-set__mouseenter="visible: true"\n event-set__mouseleave="visible: true; _delay: 160"\n geometry="primitive: plane; width: 0.4; height: 0.2"\n material="shader: flat; transparent: true; opacity: 0; src: #difficultyImg"\n position="0 -0.005 0"\n play-sound="event: mouseenter; sound: #hoverSound; volume: 0.03"\n render-order="menuitem"></a-entity>\n <a-entity\n class="difficultyFilterText"\n mixin="font"\n bind__active-text-color="active: difficultyFilter === \'Expertplus\'"\n active-text-color="color: #fff"\n difficulty-text="id: Expertplus"\n text="wrapCount: 30; align: center; color: #8d8d8d"\n position="0 -0.057 0.001"\n render-order="menutext"></a-entity>\n </a-entity>\n\n \n</a-entity>\n\x3c!-- </require> --\x3e</require>\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/optionsMenu.html"> --\x3e\n<a-entity\n id="optionsMenu"\n bind__visible="optionsMenuOpen"\n position="0 0.5 0.01"\n render-order="menutext">\n\n <a-entity id="optionsTitle" mixin="font" text="align: center; value: OPTIONS; width: 2.5"></a-entity>\n\n <a-entity id="colorOptionsContainer" position="0 -0.25 0">\n <a-entity id="colorTitle" mixin="font" text="align: center; value: THEMES; width: 2"></a-entity>\n\n <a-entity id="colorOptions" position="-0.79 -0.175 0.00" layout="type: box; columns: 10; margin: 0.2" materials-color-menu>\n \n <a-entity\n class="colorOption"\n data-color-name="Super Medium"\n data-color-scheme="default"\n mixin="clickSoundUI hoverSoundUI"\n animation__mouseenter="property: scale; to: 1.2 1.2 1.2; dur: 150; easing: easeInOutCubic; startEvents: mouseenter"\n animation__mouseleave="property: scale; to: 1 1 1; dur: 125; easing: easeInOutCubic; startEvents: mouseleave"\n geometry="primitive: plane; width: 0.15; height: 0.15"\n material="shader: gradientShader; color1: #f971c3; color2: #6ff9ea; transparent: true"\n render-order="menutext"\n bind-toggle__raycastable="optionsMenuOpen">\n </a-entity>\n \n <a-entity\n class="colorOption"\n data-color-name="Star Warrior"\n data-color-scheme="blue"\n mixin="clickSoundUI hoverSoundUI"\n animation__mouseenter="property: scale; to: 1.2 1.2 1.2; dur: 150; easing: easeInOutCubic; startEvents: mouseenter"\n animation__mouseleave="property: scale; to: 1 1 1; dur: 125; easing: easeInOutCubic; startEvents: mouseleave"\n geometry="primitive: plane; width: 0.15; height: 0.15"\n material="shader: gradientShader; color1: #1e4482; color2: #c27727; transparent: true"\n render-order="menutext"\n bind-toggle__raycastable="optionsMenuOpen">\n </a-entity>\n \n <a-entity\n class="colorOption"\n data-color-name="Galactic Royal"\n data-color-scheme="purple"\n mixin="clickSoundUI hoverSoundUI"\n animation__mouseenter="property: scale; to: 1.2 1.2 1.2; dur: 150; easing: easeInOutCubic; startEvents: mouseenter"\n animation__mouseleave="property: scale; to: 1 1 1; dur: 125; easing: easeInOutCubic; startEvents: mouseleave"\n geometry="primitive: plane; width: 0.15; height: 0.15"\n material="shader: gradientShader; color1: #6A39B3; color2: #FAF239; transparent: true"\n render-order="menutext"\n bind-toggle__raycastable="optionsMenuOpen">\n </a-entity>\n \n <a-entity\n class="colorOption"\n data-color-name="Space Joker"\n data-color-scheme="green"\n mixin="clickSoundUI hoverSoundUI"\n animation__mouseenter="property: scale; to: 1.2 1.2 1.2; dur: 150; easing: easeInOutCubic; startEvents: mouseenter"\n animation__mouseleave="property: scale; to: 1 1 1; dur: 125; easing: easeInOutCubic; startEvents: mouseleave"\n geometry="primitive: plane; width: 0.15; height: 0.15"\n material="shader: gradientShader; color1: #779E37; color2: #6A39B3; transparent: true"\n render-order="menutext"\n bind-toggle__raycastable="optionsMenuOpen">\n </a-entity>\n \n <a-entity\n class="colorOption"\n data-color-name="Solar Flare"\n data-color-scheme="yellow"\n mixin="clickSoundUI hoverSoundUI"\n animation__mouseenter="property: scale; to: 1.2 1.2 1.2; dur: 150; easing: easeInOutCubic; startEvents: mouseenter"\n animation__mouseleave="property: scale; to: 1 1 1; dur: 125; easing: easeInOutCubic; startEvents: mouseleave"\n geometry="primitive: plane; width: 0.15; height: 0.15"\n material="shader: gradientShader; color1: #C2C04C; color2: #E03A3E; transparent: true"\n render-order="menutext"\n bind-toggle__raycastable="optionsMenuOpen">\n </a-entity>\n \n <a-entity\n class="colorOption"\n data-color-name="Trail Blazer"\n data-color-scheme="red"\n mixin="clickSoundUI hoverSoundUI"\n animation__mouseenter="property: scale; to: 1.2 1.2 1.2; dur: 150; easing: easeInOutCubic; startEvents: mouseenter"\n animation__mouseleave="property: scale; to: 1 1 1; dur: 125; easing: easeInOutCubic; startEvents: mouseleave"\n geometry="primitive: plane; width: 0.15; height: 0.15"\n material="shader: gradientShader; color1: #E03A3E; color2: #DADADA; transparent: true"\n render-order="menutext"\n bind-toggle__raycastable="optionsMenuOpen">\n </a-entity>\n \n <a-entity\n class="colorOption"\n data-color-name="Mint Choco"\n data-color-scheme="rgb"\n mixin="clickSoundUI hoverSoundUI"\n animation__mouseenter="property: scale; to: 1.2 1.2 1.2; dur: 150; easing: easeInOutCubic; startEvents: mouseenter"\n animation__mouseleave="property: scale; to: 1 1 1; dur: 125; easing: easeInOutCubic; startEvents: mouseleave"\n geometry="primitive: plane; width: 0.15; height: 0.15"\n material="shader: gradientShader; color1: #34eb89; color2: #34ebd8; transparent: true"\n render-order="menutext"\n bind-toggle__raycastable="optionsMenuOpen">\n </a-entity>\n \n <a-entity\n class="colorOption"\n data-color-name="Cheetah SoL"\n data-color-scheme="cheetah"\n mixin="clickSoundUI hoverSoundUI"\n animation__mouseenter="property: scale; to: 1.2 1.2 1.2; dur: 150; easing: easeInOutCubic; startEvents: mouseenter"\n animation__mouseleave="property: scale; to: 1 1 1; dur: 125; easing: easeInOutCubic; startEvents: mouseleave"\n geometry="primitive: plane; width: 0.15; height: 0.15"\n material="shader: gradientShader; color1: #c27727; color2: #635c54; transparent: true"\n render-order="menutext"\n bind-toggle__raycastable="optionsMenuOpen">\n </a-entity>\n \n <a-entity\n class="colorOption"\n data-color-name="Ash Nova"\n data-color-scheme="black"\n mixin="clickSoundUI hoverSoundUI"\n animation__mouseenter="property: scale; to: 1.2 1.2 1.2; dur: 150; easing: easeInOutCubic; startEvents: mouseenter"\n animation__mouseleave="property: scale; to: 1 1 1; dur: 125; easing: easeInOutCubic; startEvents: mouseleave"\n geometry="primitive: plane; width: 0.15; height: 0.15"\n material="shader: gradientShader; color1: #555; color2: #FFF; transparent: true"\n render-order="menutext"\n bind-toggle__raycastable="optionsMenuOpen">\n </a-entity>\n \n </a-entity>\n\n <a-entity\n id="colorName"\n mixin="font"\n text="align: center; color: #CCC; width: 1"\n position="0 -0.35 0.1"\n render-order="menutext"></a-entity>\n </a-entity>\n</a-entity>\n\x3c!-- </require> --\x3e</require>\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/playlistMenu.html"> --\x3e\n<a-entity\n id="playlistMenu"\n bind-for="for: playlist; in: playlists; updateInPlace: true; key: name"\n bind__visible="playlistMenuOpen"\n layout="type: box; columns: 2; marginRow: -0.23; marginColumn: 1.3; align: center"\n menu-playlist\n position="0 0 0.05">\n <template>\n \n <a-entity class="playlist" data-playlist="{{ item.name }}" data-title="{{ item.title }}">\n \n <a-entity\n mixin="slice"\n slice9="opacity: 0.9; width: 1.2; left: 70; top: 70; height: 0.19; padding: 0.07"\n animation__mouseenter="property: scale; from: 1 1 1; to: 1.03 1.03 1.03; startEvents: mouseenter; pauseEvents: mouseleave; easing: easeOutCubic; dur: 150"\n animation__mouseleave="property: scale; from: 1.03 1.03 1.03; to: 1 1 1; startEvents: mouseleave; pauseEvents: mouseenter; easing: easeOutCubic; dur: 150"\n proxy-event__enter="event: mouseenter; to: CHILDREN; captureBubbles: true"\n proxy-event__leave="event: mouseleave; to: CHILDREN; captureBubbles: true"\n play-sound__click="event: click; sound: #confirmSound; volume: 0.1"\n raycaster-target="bindToggle: playlistMenuOpen; width: 1.2; height: 0.19"\n render-order__nonrecursive="menubutton">\n <a-entity\n class="playlistTitle"\n mixin="font"\n bind-item__text-uppercase="value: item.title"\n text="align: left; width: 1.3; color: #CCC"\n animation__mouseenter="property: components.text.material.uniforms.color.value; from: #CCC; to: #FFF; type: color; startEvents: mouseenter; pauseEvents: mouseleave; easing: easeOutCubic; dur: 150"\n animation__mouseleave="property: components.text.material.uniforms.color.value; from: #FFF; to: #CCC; type: color; startEvents: mouseleave; pauseEvents: mouseenter; easing: easeOutCubic; dur: 150"\n render-order="menutext"\n position="0.11 -0.01 0.001"></a-entity>\n\n <a-entity\n class="playlistAuthor"\n mixin="font"\n bind-item__text="value: item.author"\n bind__text="color: colorPrimary"\n text="align: left; width: 1.1"\n render-order="menutext"\n position="0.01 -0.08 0.001"></a-entity>\n </a-entity>\n </a-entity>\n </template>\n</a-entity>\n\x3c!-- </require> --\x3e</require>\n</a-entity>\n\n\x3c!-- Search. --\x3e\n<a-entity id="keyboard"\n bind__super-keyboard="hand: activeHand === \'left\' && \'#leftHand\' || \'#rightHand\'; show: isSearching"\n super-keyboard="label: Search on beatsaver.com; inputColor: #fff; labelColor: #f0f0f0; width: 1.5; hand: #rightHand; imagePath: assets/img/keyboard; font: assets/fonts/Viga-Regular.json; align: center; model: superkeyboard; keyColor: #fff; injectToRaycasterObjects: false; filters: allupper; keyHoverColor: #fff"\n position="0.58 1.2 -1.95" keyboard-raycastable="condition: isSearching" search\n proxy-event__dismiss="event: superkeyboarddismiss; to: a-scene; as: keyboardclose"\n proxy-event__accept="event: superkeyboardinput; to: a-scene; as: keyboardclose" render-order="menubutton"\n render-order-recursive>\n</a-entity>\n\n<a-entity id="backButton" mixin="bigMenuTopButton"\n bind__visible-raycastable="genreMenuOpen || isSearching || difficultyFilterMenuOpen || playlistMenuOpen || optionsMenuOpen"\n position="0 2.32 -1.96" play-sound__hover="event: mouseenter; sound: #hoverSound; volume: 0.1"\n proxy-event="event: click; to: a-scene; as: menuback">\n <a-entity mixin="font" text="align: center; color: #FFF; wrapCount: 20; value: BACK" position="0 -0.07 0.01">\n </a-entity>\n</a-entity>\n\n\x3c!-- Top menu buttons. --\x3e\n<a-mixin id="bigMenuTopButton" mixin="bigMenuButton" geometry="height: 0.17; width: 0.7"></a-mixin>\n<a-mixin id="bigMenuTopButtonFont" mixin="font" text="width: 0.75" position="0 -0.05 0.01"></a-mixin>\n<a-entity id="menuTopButtons"\n animation__position="property: object3D.position.z; to: -1.98; dur: 1500; easing: easeInOutCubic; delay: 300; startEvents: startgame"\n layout="type: line; margin: 0.65" position="-0.95 2.30 -1.96"\n proxy-event="event: startgame; to: #searchButton, #difficultyButton, #genreButton, #playlistButton, #optionButton">\n\n \x3c!-- Playlist menu toggle. --\x3e\n <a-entity id="playlistButtons">\n <a-entity id="playlistButton"\n mixin="bigMenuTopButton"\n bind__menu-playlist-button="isFavorited: menuSelectedChallenge.isFavorited; selectedChallenge: menuSelectedChallenge.id"\n bind__visible-raycastable="mainMenuActive && !playlist"\n material="opacity: 0"\n animation__opacity="property: components.material.material.uniforms.opacity.value; from: 0; to: 1; dur: 1000; delay: 300; startEvents: startgame"\n play-sound__hover="event: mouseenter; sound: #hoverSound; volume: 0.1"\n proxy-event="event: click; to: a-scene; as: playlistmenuopen">\n <a-entity mixin="bigMenuTopButtonFont" text="align: center; color: #FFF; wrapCount: 20; value: PLAYLISTS" bind__visible="!isMenuOpening"></a-entity>\n </a-entity>\n\n <a-entity id="clearPlaylistButton"\n mixin="bigMenuTopButton"\n bind__visible-raycastable="menuActive && !!playlist"\n play-sound__hover="event: mouseenter; sound: #hoverSound; volume: 0.1"\n play-sound__click="event: click; sound: #clearSound"\n proxy-event="event: click; to: a-scene; as: playlistclear">\n <a-entity mixin="bigMenuTopButtonFont" text="align: center; color: #FFF; wrapCount: 20; value: CLEAR PLAYLIST"></a-entity>\n </a-entity>\n\n <a-entity\n id="playlistText"\n mixin="font"\n bind__text="color: colorPrimary"\n bind__text-uppercase="value: playlistTitle"\n bind__visible="mainMenuActive && !!playlist"\n text="align: center; baseline: bottom; wrapCount: 30; width: 0.7"\n position="0 0.1 0.035"\n render-order="menutext"></a-entity>\n </a-entity>\n\n \x3c!-- Search toggle. --\x3e\n <a-entity id="searchButtons">\n <a-entity\n id="searchButton"\n mixin="bigMenuTopButton"\n bind__visible-raycastable="mainMenuActive && !search.query"\n material="opacity: 0"\n animation__opacity="property: components.material.material.uniforms.opacity.value; from: 0; to: 1; dur: 1000; delay: 300; startEvents: startgame"\n play-sound__hover="event: mouseenter; sound: #hoverSound; volume: 0.1"\n proxy-event="event: click; to: a-scene; as: keyboardopen">\n <a-entity mixin="bigMenuTopButtonFont" text="align: center; color: #FFF; wrapCount: 20; value: SEARCH" bind__visible="!isMenuOpening"></a-entity>\n </a-entity>\n\n <a-entity id="searchClearButton"\n mixin="bigMenuTopButton"\n bind__visible-raycastable="mainMenuActive && !!search.query"\n play-sound__hover="event: mouseenter; sound: #hoverSound; volume: 0.1"\n play-sound__click="event: click; sound: #clearSound"\n proxy-event="event: click; to: a-scene; as: searchclear">\n <a-entity mixin="bigMenuTopButtonFont" text="align: center; color: #FFF; wrapCount: 20; value: CLEAR SEARCH"></a-entity>\n </a-entity>\n\n <a-entity\n id="searchText"\n mixin="font"\n bind__text="color: colorPrimary"\n bind__text-uppercase="value: search.queryText"\n bind__visible="mainMenuActive && !!search.query"\n text="align: center; wrapCount: 20"\n position="0 0.1 0.035"\n render-order="menutext"></a-entity>\n </a-entity>\n\n \x3c!-- Difficulty menu toggle. --\x3e\n \x3c!-- <a-entity id="difficultyFilter">\n <a-entity id="difficultyButton"\n mixin="bigMenuTopButton"\n material="opacity: 0"\n bind__visible-raycastable="mainMenuActive"\n animation__opacity="property: components.material.material.uniforms.opacity.value; from: 0; to: 1; dur: 1000; delay: 300; startEvents: startgame"\n play-sound__hover="event: mouseenter; sound: #hoverSound; volume: 0.1"\n proxy-event="event: click; to: a-scene; as: difficultyfiltermenuopen">\n <a-entity mixin="bigMenuTopButtonFont" text="align: center; color: #FFF; wrapCount: 20; value: DIFFICULTY" bind__visible="!isMenuOpening"></a-entity>\n </a-entity>\n\n <a-entity\n id="difficultyFilterText"\n mixin="font"\n bind__difficulty-text="difficulty: difficultyFilter"\n bind__text="color: colorPrimary"\n bind__visible="mainMenuActive && difficultyFilter !== \'All\'"\n text="align: center; wrapCount: 20"\n position="0 0.1 0.035"\n render-order="menutext"></a-entity>\n </a-entity> --\x3e\n\n \x3c!-- Genre menu toggle. --\x3e\n <a-entity id="genreButtons">\n <a-entity id="genreButton"\n mixin="bigMenuTopButton"\n bind__visible-raycastable="mainMenuActive && !genre"\n material="opacity: 0"\n animation__opacity="property: components.material.material.uniforms.opacity.value; from: 0; to: 1; dur: 1000; delay: 300; startEvents: startgame"\n play-sound__hover="event: mouseenter; sound: #hoverSound; volume: 0.1"\n proxy-event="event: click; to: a-scene; as: genremenuopen">\n <a-entity mixin="bigMenuTopButtonFont" text="align: center; color: #FFF; wrapCount: 20; value: GENRES" bind__visible="!isMenuOpening"></a-entity>\n </a-entity>\n\n <a-entity id="clearGenreButton"\n mixin="bigMenuTopButton"\n bind__visible-raycastable="mainMenuActive && !!genre"\n play-sound__hover="event: mouseenter; sound: #hoverSound; volume: 0.1"\n play-sound__click="event: click; sound: #clearSound"\n proxy-event="event: click; to: a-scene; as: genreclear">\n <a-entity mixin="bigMenuTopButtonFont" text="align: center; color: #FFF; wrapCount: 20; value: CLEAR GENRE"></a-entity>\n </a-entity>\n\n <a-entity\n id="genreText"\n mixin="font"\n bind__text="color: colorPrimary"\n bind__text-uppercase="value: genre"\n bind__visible="mainMenuActive && !!genre"\n text="align: center; wrapCount: 20"\n position="0 0.1 0.035"\n render-order="menutext"></a-entity>\n </a-entity>\n</a-entity>\n\n\x3c!-- Options menu toggle. --\x3e\n<a-entity id="optionsButtons" position="0 0.45 -1.96">\n <a-entity id="optionButton" mixin="bigMenuButton" bind__visible-raycastable="mainMenuActive" material="opacity: 0"\n animation__opacity="property: components.material.material.uniforms.opacity.value; from: 0; to: 1; dur: 1000; delay: 300; startEvents: startgame"\n play-sound__hover="event: mouseenter; sound: #hoverSound; volume: 0.1"\n proxy-event="event: click; to: a-scene; as: optionsmenuopen">\n <a-entity mixin="bigMenuTopButtonFont" text="align: center; color: #FFF; wrapCount: 20; value: THEMES"\n bind__visible="!isMenuOpening"></a-entity>\n </a-entity>\n</a-entity>\x3c!-- </require> --\x3e</require>\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/modes.html"> --\x3e\n<a-mixin\n id="modeAnimations"\n animation__select="property: object3D.position.z; to: 0.06; dur: 200; easing: easeOutQuad; startEvents: select"\n animation__deselect="property: object3D.position.z; to: 0; dur: 200; easing: easeOutQuad; startEvents: deselect"></a-mixin>\n\n<a-mixin\n id="modeThumbAnimations"\n animation__select="property: components.material.material.color; type: color; to: #FFF; dur: 200; easing: easeOutQuad; startEvents: select"\n animation__deselect="property: components.material.material.color; type: color; to: #888; dur: 200; easing: easeOutQuad; startEvents: deselect"></a-mixin>\n\n<a-mixin\n id="modeBackgroundHover"\n animation__mouseenter="property: components.material.material.uniforms.borderWidth.value; from: 0.002; to: 0.01; startEvents: mouseenter; pauseEvents: mouseleave; easing: linear; dur: 150"\n animation__mouseleave="property: components.material.material.uniforms.borderWidth.value; from: 0.01; to: 0.002; startEvents: mouseleave; pauseEvents: mouseenter; easing: linear; dur: 150"\n play-sound__hover="event: mouseenter; sound: #hoverSound; volume: 0.3"\n play-sound__click="event: click; sound: #confirmSound; volume: 0.1"\n\n ></a-mixin>\n\n<a-mixin\n id="modeBackgroundSelect"\n animation__select="property: components.material.material.uniforms.brightness.value; to: 0.5; startEvents: select; easing: easeOutQuad; dur: 200"\n animation__deselect="property: components.material.material.uniforms.brightness.value; to: 0.1; startEvents: deselect; easing: easeOutQuad; dur: 200"\n animation__select2="property: components.material.material.uniforms.borderWidth.value; to: 0.015; startEvents: select; easing: linear; dur: 200"\n animation__deselect2="property: components.material.material.uniforms.borderWidth.value; to: 0.002; startEvents: deselect; easing: linear; dur: 200"></a-mixin>\n\n\n\n<a-entity\n id="modes"\n bind__menu-mode="colorScheme: colorScheme; hasVR: hasVR"\n bind__position="hasVR && \'-2.56 1.3 -0.7\' || \'-2.56 1 -0.7\'"\n bind__visible="menuActive && !isMenuOpening"\n rotation="0 60 0"\n render-order="menuitem">\n\n <a-entity id="modeIcon"\n geometry="primitive: cylinder; height: 0.01; segmentsHeight: 1; radius: 0.1; segmentsRadial: 3"\n rotation="0 90 90"\n position="-1.275 0.32 0.1"\n materials="name: merkaba"\n animation="property: object3D.position.x; from: -1.275; to: -1.3; dir: alternate; easing: easeOutQuad; loop: true; dur: 900"></a-entity>\n\n <a-entity id="mode2d" bind__visible="!hasVR">\n \n\n<a-entity\n id="moderide2d"\n class="modeItem"\n data-mode="ride"\n data-name="ride2d"\n position="0 0.75 0"\n mixin="modeAnimations">\n <a-entity\n class="modeBackground"\n bind-toggle__raycastable="menuActive && !hasVR"\n position="0 0 -0.01"\n geometry="primitive: plane; width: 3; height: 0.8"\n material="shader: panelShader; brightness: 0.1; ratio: 4; borderWidth: 0.002"\n mixin="modeBackgroundHover modeBackgroundSelect"></a-entity>\n <a-entity\n class="modeTitle"\n mixin="font"\n text="align: left; value: RIDE\nMODE; lineHeight: 45; width: 2.6"\n render-order="menutext"\n position="0.14 0.05 0"></a-entity>\n <a-entity\n class="modeThumb"\n mixin="modeThumbAnimations"\n geometry="primitive: plane; width: 0.7; height: 0.5"\n material="src: #modeRideImg; shader: flat"\n position="-0.20 0 0"></a-entity>\n <a-entity\n class="modeInstructions"\n mixin="font"\n render-order="menutext"\n bind__text="color: colorPrimary"\n text="value: Relax and enjoy the ride.; width: 1.6; lineHeight: 47"\n position="1.1 -0.05 0"></a-entity>\n</a-entity>\n\n \n\n<a-entity\n id="modeviewer2d"\n class="modeItem"\n data-mode="classic"\n data-name="viewer2d"\n position="0 0 0"\n mixin="modeAnimations">\n <a-entity\n class="modeBackground"\n bind-toggle__raycastable="menuActive && !hasVR"\n position="0 0 -0.01"\n geometry="primitive: plane; width: 3; height: 0.8"\n material="shader: panelShader; brightness: 0.1; ratio: 4; borderWidth: 0.002"\n mixin="modeBackgroundHover modeBackgroundSelect"></a-entity>\n <a-entity\n class="modeTitle"\n mixin="font"\n text="align: left; value: VIEWER\nMODE; lineHeight: 45; width: 2.6"\n render-order="menutext"\n position="0.14 0.05 0"></a-entity>\n <a-entity\n class="modeThumb"\n mixin="modeThumbAnimations"\n geometry="primitive: plane; width: 0.7; height: 0.5"\n material="src: #modeViewerImg; shader: flat"\n position="-0.20 0 0"></a-entity>\n <a-entity\n class="modeInstructions"\n mixin="font"\n render-order="menutext"\n bind__text="color: colorPrimary"\n text="value: View the beat map.\n\nConnect a VR headset\nwith controllers\nto experience\nmore modes!; width: 1.6; lineHeight: 47"\n position="1.1 -0.05 0"></a-entity>\n</a-entity>\n\n </a-entity>\n\n <a-entity id="modeVR" bind__visible="hasVR">\n \n\n<a-entity\n id="modepunchvr"\n class="modeItem"\n data-mode="punch"\n data-name="punchvr"\n position="0 0.75 0"\n mixin="modeAnimations">\n <a-entity\n class="modeBackground"\n bind-toggle__raycastable="menuActive && hasVR"\n position="0 0 -0.01"\n geometry="primitive: plane; width: 3; height: 0.8"\n material="shader: panelShader; brightness: 0.1; ratio: 4; borderWidth: 0.002"\n mixin="modeBackgroundHover modeBackgroundSelect"></a-entity>\n <a-entity\n class="modeTitle"\n mixin="font"\n text="align: left; value: PUNCH\nMODE; lineHeight: 45; width: 2.6"\n render-order="menutext"\n position="0.14 0.05 0"></a-entity>\n <a-entity\n class="modeThumb"\n mixin="modeThumbAnimations"\n geometry="primitive: plane; width: 0.7; height: 0.5"\n material="src: #modePunchImg; shader: flat"\n position="-0.20 0 0"></a-entity>\n <a-entity\n class="modeInstructions"\n mixin="font"\n render-order="menutext"\n bind__text="color: colorPrimary"\n text="value: Punch the beats, mind\ncolor.\n\nAvoid all things yellow.\n\nPunch harder\n for better score.; width: 1.6; lineHeight: 47"\n position="1.1 -0.05 0"></a-entity>\n</a-entity>\n\n \n\n<a-entity\n id="moderidevr"\n class="modeItem"\n data-mode="ride"\n data-name="ridevr"\n position="0 0 0"\n mixin="modeAnimations">\n <a-entity\n class="modeBackground"\n bind-toggle__raycastable="menuActive && hasVR"\n position="0 0 -0.01"\n geometry="primitive: plane; width: 3; height: 0.8"\n material="shader: panelShader; brightness: 0.1; ratio: 4; borderWidth: 0.002"\n mixin="modeBackgroundHover modeBackgroundSelect"></a-entity>\n <a-entity\n class="modeTitle"\n mixin="font"\n text="align: left; value: RIDE\nMODE; lineHeight: 45; width: 2.6"\n render-order="menutext"\n position="0.14 0.05 0"></a-entity>\n <a-entity\n class="modeThumb"\n mixin="modeThumbAnimations"\n geometry="primitive: plane; width: 0.7; height: 0.5"\n material="src: #modeRideImg; shader: flat"\n position="-0.20 0 0"></a-entity>\n <a-entity\n class="modeInstructions"\n mixin="font"\n render-order="menutext"\n bind__text="color: colorPrimary"\n text="value: Relax and enjoy the ride.\n\nTake a quick breather.\n\nNo score!; width: 1.6; lineHeight: 47"\n position="1.1 -0.05 0"></a-entity>\n</a-entity>\n\n \n\n<a-entity\n id="modeclassicvr"\n class="modeItem"\n data-mode="classic"\n data-name="classicvr"\n position="0 -0.75 0"\n mixin="modeAnimations">\n <a-entity\n class="modeBackground"\n bind-toggle__raycastable="menuActive && hasVR"\n position="0 0 -0.01"\n geometry="primitive: plane; width: 3; height: 0.8"\n material="shader: panelShader; brightness: 0.1; ratio: 4; borderWidth: 0.002"\n mixin="modeBackgroundHover modeBackgroundSelect"></a-entity>\n <a-entity\n class="modeTitle"\n mixin="font"\n text="align: left; value: CLASSIC\nMODE; lineHeight: 45; width: 2.6"\n render-order="menutext"\n position="0.14 0.05 0"></a-entity>\n <a-entity\n class="modeThumb"\n mixin="modeThumbAnimations"\n geometry="primitive: plane; width: 0.7; height: 0.5"\n material="src: #modeClassicImg; shader: flat"\n position="-0.20 0 0"></a-entity>\n <a-entity\n class="modeInstructions"\n mixin="font"\n render-order="menutext"\n bind__text="color: colorPrimary"\n text="value: Cut the beats, mind\ncolor and direction.\n\nAvoid all things yellow.\n\nSwing fast and accurate\nfor better score.; width: 1.6; lineHeight: 47"\n position="1.1 -0.05 0"></a-entity>\n</a-entity>\n\n\n <a-entity\n id="modeMultiplayer"\n class="modeItem"\n multiplayer-button\n position="0 -1.50 0">\n <a-entity\n bind-toggle__raycastable="menuActive && hasVR"\n position="0 0 -0.01"\n geometry="primitive: plane; width: 3; height: 0.55"\n material="shader: panelShader; brightness: 0.1; ratio: 5.5; borderWidth: 0.002"\n mixin="modeBackgroundHover modeBackgroundSelect"></a-entity>\n <a-entity\n mixin="font"\n text="align: left; value: MULTIPLAYER; lineHeight: 45; width: 2.6; color: #FFF"\n render-order="menutext"\n position="-1.0 0.00 0"></a-entity>\n <a-entity\n mixin="font"\n bind__text="color: colorPrimary"\n text="value: Race a friend in real time.\nCreate a room or join with a code.; width: 1.6; lineHeight: 47"\n render-order="menutext"\n position="0.50 0.00 0"></a-entity>\n </a-entity>\n </a-entity>\n\n <a-entity\n id="loadingTipsContainer"\n bind__visible="menuActive"\n position="0 -1.3 0.1"\n rotation="0 0 0">\n\n <a-entity\n id="loadingTipsBackground"\n bind-toggle__raycastable="menuActive"\n render-order="menu"\n geometry="primitive: plane; width: 1.5; height: 0.3"\n material="shader: panelShader; ratio: 1.15; borderRadius: 0.4"\n render-order="menubutton"\n position="0 0 -0.03"></a-entity>\n\n <a-entity\n id="loadingTipsText"\n mixin="font"\n bind__text="color: colorPrimary"\n text="align: center; wrapCount: 30; width: 1; value: Press down on thumbstick center to open menu while playing."\n render-order="menutext"\n position="0 -0.02 0.001"></a-entity>\n </a-entity>\n</a-entity>\n\x3c!-- </require> --\x3e</require>\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/victory.html"> --\x3e\n\x3c!-- Victory. --\x3e\n<a-entity\n id="victoryInfoContainer"\n position="0 1.5 -2"\n bind__visible="isVictory">\n\n <a-entity\n id="victoryAccuracyRing"\n bind__material="color: colorPrimary"k\n bind__victory-accuracy-ring="accuracy: score.finalAccuracy"\n animation="property: components.material.material.uniforms.progress.value; from: 0; easing: easeOutQuad; delay: 500; dur: 2500; autoplay: false"\n geometry="primitive: plane; width: 0.7; height: 0.7"\n material="shader: ring; transparent: true; radiusInner: 0.8; blending: additive; depthWrite: false"\n position="0 0.18 0"\n render-order="victory"></a-entity>\n\n <a-entity\n id="victoryInfoRank"\n class="accuracyTextCounterSubscribe"\n bind__animation="enabled: isVictory"\n bind__victory-rank="isVictory: isVictory; rank: score.rank"\n bind-toggle__raycastable="isVictory"\n scale="0 0 0"\n position="0 -0.034 0"\n animation__rotation="property: object3D.rotation.y; from: 0; to: -360; loop: true; easing: linear; dur: 5000; startEvents: textcounterdone"\n animation__scale="property: scale; from: 0 0 0; to: 1 1 1; loop: false; easing: easeOutQuad; dur: 300; startEvents: textcounterdone"\n play-sound="sound: #victorySound; event: textcounterdone"\n render-order="menuitemtext"\n text-geometry="font: #VigaRegularThree; bevelEnabled: true; bevelSize: 0.01; bevelThickness: 0.01; curveSegments: 7; height: 0.15; size: 0.4"></a-entity>\n\n <a-entity\n id="victoryInfoAccuracy"\n class="accuracyTextCounterSubscribe"\n mixin="font"\n bind__text="color: colorSecondary; opacity: isVictory && 0 || 0; value: score.score + \' POINTS\'"\n animation="property: components.text.material.uniforms.opacity.value; from: 0; to: 1; startEvents: textcounterdone"\n text="align: left; wrapCount: 22; baseline: top; width: 0.81"\n position="0.85 0.2 0"\n render-order="menuitemtext"></a-entity>\n\n <a-entity\n id="victoryInfoBeatsHit"\n class="accuracyTextCounterSubscribe"\n mixin="font"\n bind__text="color: colorSecondary; opacity: isVictory && 0 || 0; value: score.beatsText"\n animation="property: components.text.material.uniforms.opacity.value; from: 0; to: 1; startEvents: textcounterdone"\n text="align: left; wrapCount: 22; baseline: top; width: 0.81"\n position="0.85 0.1 0"\n render-order="menuitemtext"></a-entity>\n\n <a-entity\n id="victoryInfoAccuracy"\n mixin="font"\n bind__text="color: colorTertiary"\n text="value: 0; align: center; wrapCount: 15; baseline: top; width: 2.25"\n bind__text-counter="enabled: isVictory; value: score.finalAccuracy"\n text-counter="suffix: %"\n position="0 -0.47 0"\n render-order="menuitemtext"></a-entity>\n\n <a-entity\n id="victoryInfoMaxCombo"\n mixin="font"\n bind__text="color: colorSecondary"\n bind__text-counter="enabled: isVictory; value: score.maxCombo"\n text="align: center; wrapCount: 22; baseline: top; width: 1"\n text-counter="prefix: MAX STREAK: ; emit: true"\n proxy-event="event: textcounterdone; to: .accuracyTextCounterSubscribe"\n position="0 -0.58 0"\n render-order="menuitemtext"></a-entity>\n\n <a-entity\n id="victoryButtons"\n play-sound="event: mouseenter; sound: #hoverSound; volume: 0.03"\n play-sound__click="event: click; sound: #confirmSound; volume: 0.25"\n render-order="menubutton">\n <a-entity\n id="victoryRestartButton"\n class="accuracyTextCounterSubscribe"\n mixin="gameMenuButton"\n bind-toggle__raycastable="isVictory"\n bind__material="opacity: isVictory && 0 || 0"\n animation="property: components.material.material.uniforms.opacity.value; from: 0; to: 1; startEvents: textcounterdone"\n position="-0.56 -0.79 0.05"\n proxy-event="event: click; to: a-scene; as: gamemenurestart">\n <a-entity\n class="accuracyTextCounterSubscribe"\n mixin="gameMenuButtonText"\n bind__text="opacity: isVictory && 0 || 0"\n animation="property: components.text.material.uniforms.opacity.value; from: 0; to: 1; startEvents: textcounterdone"\n render-order="menuitemtext"\n text="opacity: 0; value: PLAY AGAIN"></a-entity>\n </a-entity>\n\n <a-entity\n id="victoryExitButton"\n class="accuracyTextCounterSubscribe"\n mixin="gameMenuButton"\n bind-toggle__raycastable="isVictory"\n bind__material="opacity: isVictory && 0 || 0"\n animation="property: components.material.material.uniforms.opacity.value; from: 0; to: 1; startEvents: textcounterdone"\n position="0.56 -0.79 0.05"\n proxy-event="event: click; to: a-scene; as: gamemenuexit">\n <a-entity\n class="accuracyTextCounterSubscribe"\n mixin="gameMenuButtonText"\n bind__text="opacity: isVictory && 0 || 0"\n animation="property: components.text.material.uniforms.opacity.value; from: 0; to: 1; startEvents: textcounterdone"\n render-order="menuitemtext"\n text="opacity: 0; value: BACK TO MENU"></a-entity>\n </a-entity>\n </a-entity>\n</a-entity>\n\x3c!-- </require> --\x3e</require>\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/leaderboard.html"> --\x3e\n<a-entity\n id="leaderboard"\n class="accuracyTextCounterSubscribe"\n bind__animation="enabled: isVictory"\n bind__scale="isVictory && \'0 0 0\' || \'1 1 1\'"\n bind__visible="(!!menuSelectedChallenge.id || !!challenge.id) && (menuActive || isPaused || isVictory || isLoading) && !genreMenuOpen && gameMode !== \'ride\'"\n position="2.36 1.5 -1.19"\n rotation="0 -60 0"\n animation="property: scale; from: 0 0 0; to: 1 1 1; easing: easeOutBack; startEvents: textcounterdone"\n render-order="menuitem">\n\n <a-entity\n bind-toggle__raycastable="leaderboardActive"\n id="leaderboardBackground" position="0 0 0"\n geometry="primitive: plane; width: 2; height: 2"\n material="shader: panelShader; ratio: 1.16; brightness: 0.2"></a-entity>\n\n <a-entity\n id="leaderboardChallengeImage"\n bind__menu-selected-challenge-image="coverURL: menuSelectedChallenge.coverURL"\n bind__visible="!isVictory"\n geometry="primitive: plane; height: 0.12; width: 0.12"\n material="shader: flat"\n position="-0.44 0.63 0.001"></a-entity>\n\n <a-entity\n id="leaderboardTitle"\n mixin="font"\n text="align: center; width: 2.5; value: LEADERBOARD"\n position="0.05 0.55 0.001"\n bind__visible="!leaderboardQualified"></a-entity>\n\n <a-entity\n id="leaderboardNames"\n mixin="font"\n bind__text="color: colorSecondary; value: leaderboardNames"\n bind__visible="!leaderboardQualified && !leaderboardEmpty"\n text="baseline: top; width: 1.2; anchor: left; wrapCount: 28; lineHeight: 53;"\n position="-0.7 0.3 0.001"></a-entity>\n\n <a-entity\n id="leaderboardScores"\n mixin="font"\n bind__text="value: leaderboardScores"\n bind__visible="!leaderboardQualified && !leaderboardEmpty"\n text="baseline: top; align: right; width: 1.2; anchor: right; color: #fff; wrapCount: 28; lineHeight: 53;"\n position="0.7 0.3 0.001"></a-entity>\n\n <a-entity\n id="leaderboardEmpty"\n mixin="font"\n bind__visible="leaderboard.length === 0 && !leaderboardQualified && !leaderboardLoading"\n text="align: center; color: #999; baseline: center; width: 2; value: No high scores. Be the first!"\n position="0 0 0.001"></a-entity>\n\n <a-entity\n id="leaderboardKeyboard"\n bind__super-keyboard="hand: activeHand === \'left\' && \'#leftHand\' || \'#rightHand\'; show: leaderboardQualified"\n super-keyboard="inputColor: #fff; hand: #rightHand; imagePath: assets/img/keyboard; font: assets/fonts/Viga-Regular.json; align: center; model: superkeyboard; keyColor: #fff; injectToRaycasterObjects: false; filters: allupper; keyHoverColor: #fff; maxLength: 15; width: 1.5; label: NEW HIGH SCORE!\nENTER THE LEADERBOARD; labelColor: #FAFAFA"\n position="0 -0.08 0.02"\n proxy-event__change="event: superkeyboardchange; to: a-scene; as: leaderboardusername"\n keyboard-raycastable="condition: leaderboardQualified"\n render-order="menutext"\n render-order-recursive>\n </a-entity>\n\n <a-entity id="leaderboardSubmit"\n position="0 -0.67 0.002"\n mixin="bigMenuButton"\n bind__visible-raycastable="leaderboardQualified"\n proxy-event="event: click; to: a-scene; as: leaderboardsubmit">\n <a-entity mixin="font" text="align: center; color: #FFF; wrapCount: 26; value: SUBMIT HIGH SCORE" position="0 -0.055 0.01"></a-entity>\n \x3c!--slice9="width: 1.5; height: 0.24"--\x3e\n </a-entity>\n</a-entity>\n\x3c!-- </require> --\x3e</require>\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/multiplayerLobby.html"> --\x3e\n\x3c!--\n Multiplayer lobby panel + in-game HUD + victory results overlay.\n All conditional colors / opacities / labels are precomputed in state to\n avoid ternary expressions in bind__ attributes (aframe-state-component\n evaluates simple property paths reliably; complex JS is fragile).\n--\x3e\n\n\n\n<a-entity\n id="multiplayerLobby"\n bind__visible="mpLobbyVisible"\n position="0 1.55 -1.4"\n render-order="menu">\n\n \x3c!-- Background --\x3e\n <a-entity\n bind-toggle__raycastable="mpLobbyVisible"\n geometry="primitive: plane; width: 1.7; height: 1.35"\n material="shader: panelShader; brightness: 0.18; ratio: 1.26; borderWidth: 0.005; borderRadius: 0.04"\n render-order="menu"\n position="0 0 -0.02"></a-entity>\n\n \x3c!-- Title --\x3e\n <a-entity\n mixin="font"\n text="align: center; value: MULTIPLAYER; width: 1.5; lineHeight: 50; color: #FFF"\n render-order="menutext"\n position="0 0.60 0"></a-entity>\n\n \x3c!-- Room code --\x3e\n <a-entity\n mixin="font"\n bind__text="value: mpRoomCodeText; color: colorSecondaryBright"\n text="align: center; width: 1.5; lineHeight: 80"\n render-order="menutext"\n position="0 0.46 0"></a-entity>\n\n \x3c!-- Status / instructions --\x3e\n <a-entity\n mixin="font"\n bind__text="value: mpStatusText; color: colorPrimary"\n text="align: center; width: 1.5; wrapCount: 38; lineHeight: 50"\n render-order="menutext"\n position="0 0.34 0"></a-entity>\n\n \x3c!-- Player rows --\x3e\n <a-entity position="0 0.13 0">\n \n<a-entity position="0 0 0" bind__visible="multiplayer.row0Visible">\n <a-entity\n geometry="primitive: plane; width: 1.45; height: 0.115"\n bind__material="opacity: multiplayer.row0BgOpacity"\n material="shader: flat; color: #ffffff; transparent: true"\n position="0 0 -0.005"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.row0Name; color: multiplayer.row0NameColor"\n text="align: left; width: 1.4; lineHeight: 55"\n render-order="menutext"\n position="-0.62 0 0"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.row0Score; color: multiplayer.row0ScoreColor"\n text="align: right; width: 1.4; lineHeight: 55"\n render-order="menutext"\n position="0.62 0 0"></a-entity>\n</a-entity>\n\n \n<a-entity position="0 -0.13 0" bind__visible="multiplayer.row1Visible">\n <a-entity\n geometry="primitive: plane; width: 1.45; height: 0.115"\n bind__material="opacity: multiplayer.row1BgOpacity"\n material="shader: flat; color: #ffffff; transparent: true"\n position="0 0 -0.005"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.row1Name; color: multiplayer.row1NameColor"\n text="align: left; width: 1.4; lineHeight: 55"\n render-order="menutext"\n position="-0.62 0 0"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.row1Score; color: multiplayer.row1ScoreColor"\n text="align: right; width: 1.4; lineHeight: 55"\n render-order="menutext"\n position="0.62 0 0"></a-entity>\n</a-entity>\n\n \n<a-entity position="0 -0.26 0" bind__visible="multiplayer.row2Visible">\n <a-entity\n geometry="primitive: plane; width: 1.45; height: 0.115"\n bind__material="opacity: multiplayer.row2BgOpacity"\n material="shader: flat; color: #ffffff; transparent: true"\n position="0 0 -0.005"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.row2Name; color: multiplayer.row2NameColor"\n text="align: left; width: 1.4; lineHeight: 55"\n render-order="menutext"\n position="-0.62 0 0"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.row2Score; color: multiplayer.row2ScoreColor"\n text="align: right; width: 1.4; lineHeight: 55"\n render-order="menutext"\n position="0.62 0 0"></a-entity>\n</a-entity>\n\n \n<a-entity position="0 -0.39 0" bind__visible="multiplayer.row3Visible">\n <a-entity\n geometry="primitive: plane; width: 1.45; height: 0.115"\n bind__material="opacity: multiplayer.row3BgOpacity"\n material="shader: flat; color: #ffffff; transparent: true"\n position="0 0 -0.005"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.row3Name; color: multiplayer.row3NameColor"\n text="align: left; width: 1.4; lineHeight: 55"\n render-order="menutext"\n position="-0.62 0 0"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.row3Score; color: multiplayer.row3ScoreColor"\n text="align: right; width: 1.4; lineHeight: 55"\n render-order="menutext"\n position="0.62 0 0"></a-entity>\n</a-entity>\n\n </a-entity>\n\n \x3c!-- Action button row 1: idle (no room) --\x3e\n <a-entity position="0 -0.42 0">\n <a-entity\n bind__visible="!mpInRoom"\n bind-toggle__raycastable="mpLobbyVisible && !mpInRoom"\n position="-0.40 0 0"\n mixin="modeBackgroundHover"\n geometry="primitive: plane; width: 0.65; height: 0.16"\n material="shader: panelShader; brightness: 0.30; ratio: 4.0; borderWidth: 0.004"\n proxy-event="event: click; as: mpcreate; to: a-scene"\n play-sound__click="event: click; sound: #confirmSound; volume: 0.1">\n <a-entity\n mixin="font"\n text="align: center; value: CREATE ROOM; width: 0.6; lineHeight: 60; color: #FFF"\n position="0 0 0.001"></a-entity>\n </a-entity>\n\n <a-entity\n bind__visible="!mpInRoom"\n bind-toggle__raycastable="mpLobbyVisible && !mpInRoom"\n position="0.40 0 0"\n mixin="modeBackgroundHover"\n geometry="primitive: plane; width: 0.65; height: 0.16"\n material="shader: panelShader; brightness: 0.30; ratio: 4.0; borderWidth: 0.004"\n multiplayer-join-button\n play-sound__click="event: click; sound: #confirmSound; volume: 0.1">\n <a-entity\n mixin="font"\n bind__text="value: mpJoinButtonText"\n text="align: center; width: 0.6; lineHeight: 60; color: #FFF"\n position="0 0 0.001"></a-entity>\n </a-entity>\n\n \x3c!-- READY (in lobby phase) --\x3e\n <a-entity\n bind__visible="mpInLobbyPhase"\n bind-toggle__raycastable="mpInLobbyPhase"\n position="-0.55 0 0"\n mixin="modeBackgroundHover"\n geometry="primitive: plane; width: 0.50; height: 0.16"\n bind__material="brightness: mpReadyButtonBrightness"\n material="shader: panelShader; ratio: 3.1; borderWidth: 0.004"\n multiplayer-ready-button\n play-sound__click="event: click; sound: #confirmSound; volume: 0.1">\n <a-entity\n mixin="font"\n bind__text="value: mpReadyButtonText; color: mpReadyButtonColor"\n text="align: center; width: 0.5; lineHeight: 60"\n position="0 0 0.001"></a-entity>\n </a-entity>\n\n \x3c!-- Share link (in room) --\x3e\n <a-entity\n bind__visible="mpInRoom"\n bind-toggle__raycastable="mpInRoom"\n position="0 0 0"\n mixin="modeBackgroundHover"\n geometry="primitive: plane; width: 0.55; height: 0.16"\n material="shader: panelShader; brightness: 0.20; ratio: 3.4; borderWidth: 0.004"\n proxy-event="event: click; as: mpsharelink; to: a-scene"\n play-sound__click="event: click; sound: #confirmSound; volume: 0.1">\n <a-entity\n mixin="font"\n bind__text="value: mpShareButtonText; color: mpShareButtonColor"\n text="align: center; width: 0.55; lineHeight: 65"\n position="0 0 0.001"></a-entity>\n </a-entity>\n\n \x3c!-- Name editor (in room) --\x3e\n <a-entity\n bind__visible="mpInRoom"\n bind-toggle__raycastable="mpInRoom"\n position="0.55 0 0"\n mixin="modeBackgroundHover"\n geometry="primitive: plane; width: 0.50; height: 0.16"\n material="shader: panelShader; brightness: 0.20; ratio: 3.1; borderWidth: 0.004"\n multiplayer-name-button\n play-sound__click="event: click; sound: #confirmSound; volume: 0.1">\n <a-entity\n mixin="font"\n text="align: center; value: SET NAME; width: 0.5; lineHeight: 60; color: #FFF"\n position="0 0 0.001"></a-entity>\n </a-entity>\n </a-entity>\n\n \x3c!-- Action button row 2: leave + back --\x3e\n <a-entity position="0 -0.59 0">\n <a-entity\n bind__visible="mpInRoom"\n bind-toggle__raycastable="mpInRoom"\n position="0 0 0"\n geometry="primitive: plane; width: 0.55; height: 0.13"\n material="shader: panelShader; brightness: 0.10; ratio: 4.2; borderWidth: 0.003"\n proxy-event="event: click; as: mpleave; to: a-scene">\n <a-entity\n mixin="font"\n text="align: center; value: LEAVE ROOM; width: 0.55; lineHeight: 70; color: #888"\n position="0 0 0.001"></a-entity>\n </a-entity>\n <a-entity\n bind__visible="!mpInRoom"\n bind-toggle__raycastable="mpLobbyVisible && !mpInRoom"\n position="0 0 0"\n proxy-event="event: click; as: mpclose; to: a-scene">\n <a-entity\n mixin="font"\n text="align: center; value: < back to modes; width: 1.2; lineHeight: 60; color: #555"\n render-order="menutext"></a-entity>\n </a-entity>\n </a-entity>\n</a-entity>\n\n\n\x3c!-- ===================== IN-GAME COUNTDOWN OVERLAY ===================== --\x3e\n<a-entity\n id="mpCountdown"\n bind__visible="mpCountdownVisible"\n position="0 1.7 -2"\n render-order="menu">\n <a-entity\n geometry="primitive: plane; width: 1.4; height: 0.4"\n material="shader: panelShader; brightness: 0.30; ratio: 3.5; borderWidth: 0.005"\n position="0 0 -0.01"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.countdownText; color: colorSecondaryBright"\n text="align: center; width: 1.3; lineHeight: 30"\n render-order="menutext"></a-entity>\n</a-entity>\n\n\n\x3c!-- ===================== IN-GAME OPPONENT HUD ===================== --\x3e\n<a-entity\n id="mpHud"\n bind__visible="mpHudVisible"\n position="-1.45 1.65 -1.0"\n rotation="0 35 0"\n render-order="menu">\n <a-entity\n geometry="primitive: plane; width: 0.85; height: 0.55"\n material="shader: panelShader; brightness: 0.10; ratio: 1.55; borderWidth: 0.002"\n position="0 0 -0.01"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: mpRankHudText; color: colorSecondaryBright"\n text="align: left; width: 0.75; lineHeight: 60"\n position="-0.34 0.22 0"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.scoreDeltaText; color: mpDeltaColor"\n text="align: right; width: 0.75; lineHeight: 65"\n position="0.34 0.22 0"></a-entity>\n <a-entity\n mixin="font"\n text="align: left; value: OPPONENTS; width: 0.75; lineHeight: 80; color: #888"\n position="-0.34 0.10 0"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.opponentText; color: colorPrimary"\n text="align: left; width: 0.75; lineHeight: 60"\n position="-0.34 -0.02 0"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.opponentScores"\n text="align: right; width: 0.75; lineHeight: 60; color: #FFF"\n position="0.34 -0.02 0"></a-entity>\n</a-entity>\n\n\n\x3c!-- ===================== VICTORY RESULTS ===================== --\x3e\n<a-entity\n id="mpResults"\n bind__visible="mpResultsVisible"\n position="0 1.05 -1.6"\n render-order="menu">\n <a-entity\n geometry="primitive: plane; width: 1.6; height: 0.7"\n material="shader: panelShader; brightness: 0.20; ratio: 2.3; borderWidth: 0.004"\n position="0 0 -0.02"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: mpWinnerBanner; color: colorSecondaryBright"\n text="align: center; width: 1.5; lineHeight: 30"\n position="0 0.27 0"></a-entity>\n <a-entity\n mixin="font"\n text="align: center; value: ROOM RESULTS; width: 1.4; lineHeight: 70; color: #888"\n position="0 0.13 0"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.resultsText"\n text="align: left; width: 1.4; lineHeight: 50; color: #FFF"\n position="-0.65 -0.02 0"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.resultsScores"\n text="align: right; width: 1.4; lineHeight: 50; color: #FFF"\n position="0.65 -0.02 0"></a-entity>\n <a-entity\n bind__visible="multiplayer.isHost"\n bind-toggle__raycastable="multiplayer.isHost && mpResultsVisible"\n position="0 -0.27 0"\n mixin="modeBackgroundHover"\n geometry="primitive: plane; width: 0.7; height: 0.13"\n material="shader: panelShader; brightness: 0.30; ratio: 5.4; borderWidth: 0.003"\n proxy-event="event: click; as: mprematch; to: a-scene">\n <a-entity\n mixin="font"\n text="align: center; value: REMATCH; width: 0.7; lineHeight: 65; color: #FFF"\n position="0 0 0.001"></a-entity>\n </a-entity>\n</a-entity>\n\n\n\x3c!-- ===================== ROOM-CODE KEYBOARD (in-VR) ===================== --\x3e\n<a-entity\n id="mpKeyboard"\n bind__super-keyboard="hand: activeHand === \'left\' && \'#leftHand\' || \'#rightHand\'; show: mpKeyboardOpen"\n super-keyboard="hand: #rightHand; imagePath: assets/img/keyboard; font: assets/fonts/Viga-Regular.json; align: center; model: superkeyboard; keyColor: #fff; injectToRaycasterObjects: false; filters: allupper; keyHoverColor: #fff; maxLength: 4; width: 1.3; label: ENTER ROOM CODE; labelColor: #FAFAFA; inputColor: #fff"\n position="0 1.3 -1.3"\n render-order="menutext"\n multiplayer-keyboard-bridge\n proxy-event__change="event: superkeyboardchange; to: a-scene; as: mpcodeinput"\n proxy-event__submit="event: superkeyboarddismiss; to: a-scene; as: mpkeyboardsubmit"\n bind-toggle__raycastable="mpKeyboardOpen"\n render-order-recursive>\n</a-entity>\n\n\n\x3c!-- ===================== NAME KEYBOARD (in-VR) ===================== --\x3e\n<a-entity\n id="mpNameKeyboard"\n bind__super-keyboard="hand: activeHand === \'left\' && \'#leftHand\' || \'#rightHand\'; show: mpNameKeyboardOpen"\n super-keyboard="hand: #rightHand; imagePath: assets/img/keyboard; font: assets/fonts/Viga-Regular.json; align: center; model: superkeyboard; keyColor: #fff; injectToRaycasterObjects: false; filters: allupper; keyHoverColor: #fff; maxLength: 14; width: 1.3; label: ENTER YOUR NAME; labelColor: #FAFAFA; inputColor: #fff"\n position="0 1.3 -1.3"\n render-order="menutext"\n proxy-event__change="event: superkeyboardchange; to: a-scene; as: mpnameinput"\n proxy-event__submit="event: superkeyboarddismiss; to: a-scene; as: mpnamekeyboardsubmit"\n bind-toggle__raycastable="mpNameKeyboardOpen"\n render-order-recursive>\n</a-entity>\n\x3c!-- </require> --\x3e</require>\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/news.html"> --\x3e\n\n\n\n\n\n<a-entity\n id="news"\n bind__visible="menuActive && !menuSelectedChallenge.id && !isMenuOpening"\n position="2.365374194652176 1.6 -1.1952715561051024"\n rotation="0 -60 0"\n render-order="menuitem">\n\n <a-entity\n id="newsBackground"\n bind-toggle__raycastable="menuActive && !menuSelectedChallenge.id && !isMenuOpening"\n geometry="primitive: plane; width: 2.1; height: 1.9"\n material="shader: panelShader; ratio: 1.14; brightness: 0.2"></a-entity>\n\n <a-entity\n id="newsText"\n mixin="font"\n text="align: left; color: #FAFAFA; baseline: center; width: 1.6; wrapCount: 50; value: three.ws\n\nGive your AI a body. three.ws is an open-source, browser-native 3D AI agent platform.\n\nDrop a GLB file, add an LLM brain, register on-chain, and embed anywhere — no plugins, no installs.\n\nVisit three.ws to build your agent."\n position="0 -0.04 0.001"></a-entity>\n</a-entity>\n\n<a-entity\n id="support"\n bind__visible="menuActive && !menuSelectedChallenge.id && !isMenuOpening && inVR"\n position="2.365374194652176 0.25 -1.1952715561051024"\n rotation="-15 -60 0"\n render-order="menuitem">\n\n <a-entity\n id="supportBackground"\n bind-toggle__raycastable="menuActive && !menuSelectedChallenge.id && !isMenuOpening"\n geometry="primitive: plane; width: 2.1; height: 0.9"\n material="shader: panelShader; ratio: 1.14; brightness: 0.2"></a-entity>\n\n <a-entity\n id="supportImage"\n geometry="primitive: plane; width: 0.6; height: 0.5"\n material="shader: flat; src: assets/img/banner.jpg"\n position="-0.5 0 0.001"></a-entity>\n\n <a-entity\n id="supportText"\n mixin="font"\n text="align: left; color: #FAFAFA; baseline: center; width: 1; wrapCount: 30; value: Support three.ws development.\n\nVisit three.ws for more."\n position="0.35 -0.04 0.001"></a-entity>\n</a-entity>\n\x3c!-- </require> --\x3e</require>\n\n <a-mixin\n id="cursorMesh"\n material="shader: flat; transparent: true; src: #cursorMeshImg; depthTest: false"\n sub-object="from: #cursorLaser; name: glow"></a-mixin>\n\n <a-entity\n id="curve"\n material="shader: supercurve"\n supercurve\n supercurve-color\n render-order="curve"></a-entity>\n\n <a-entity\n id="tunnelsContainer"\n render-order="curve"\n bind__visible="isPlaying || isPaused"></a-entity>\n\n <a-entity\n id="beatContainer"\n beat-hit-sound\n bind__visible="isPlaying"></a-entity>\n\n <a-entity\n id="wallContainer"\n bind__visible="isPlaying"></a-entity>\n\n <a-entity id="curveFollowRig"\n bind__curve-follow-rig-reset="isVictory: isVictory"\n bind__supercurve-follow="enabled: isPlaying; speed: speed"\n supercurve-follow="target: #curve">\n\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/stageFollow.html"> --\x3e\n<a-entity\n id="tube"\n bind__visible="isPlaying"\n rotation="90 180 0"\n position="0 0 -5"\n geometry="primitive: cylinder; radius: 3; openEnded: true; height: 20"\n materials="name: tube"\n animation="property: components.materials.material.uniforms.opacity.value; from: 1; to: 0; easing: easeInOutCubic; startEvents: pulse"></a-entity>\n\n<a-entity\n id="platformShadow"\n obj-model="obj: #homeShadowObj"\n position="0 0.02 0"\n material="src: #homeShadowImg; shader: flat; blending: multiply; transparent: true;"\n raycastable-game\n render-order="curveshadow"\n stepback></a-entity>\n\n<a-entity\n id="platform"\n obj-model="obj: #homeObj"\n materials="name: home"\n bind__materials="animate: isPlaying"></a-entity>\n\n<a-entity\n id="sideGlows"\n bind__visible="isPlaying || isPaused">\n <a-entity\n id="leftSideGlow"\n geometry="primitive: plane; width: 8; height: 2"\n materials="name: leftsideglow"\n position="-2.1 .5 -3"\n rotation="20 -90 0"\n render-order="sideglow">\n </a-entity>\n <a-entity\n id="rightSideGlow"\n geometry="primitive: plane; width: 8; height: 2"\n materials="name: rightsideglow"\n position="2.1 .5 -3"\n rotation="-20 -90 0"\n render-order="sideglow">\n </a-entity>\n</a-entity>\n\n<a-entity\n id="light"\n light="type: hemisphere; color: #666"\n position="0 10 20"></a-entity>\n\n\n\x3c!-- </require> --\x3e</require>\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/score.html"> --\x3e\n<a-mixin\n id="scoreText"\n mixin="font"\n text="lineHeight: 40; color: #FAFAFA; letterSpacing: -2; align: center; opacity: 0.7"></a-mixin>\n\n<a-entity\n id="scoreContainer"\n bind__score-texts="isLoading: isLoading"\n bind__visible="score.active"\n render-order="score">\n\n <a-entity\n id="songProgressRing"\n bind__material="color: colorSecondary"\n bind__song-progress-info="enabled: isPlaying || isPaused && challenge.isBeatsPreloaded"\n geometry="primitive: plane; width: 0.57; height: 0.03"\n material="shader: flat"\n position="1.525 0.1 -3.94"\n rotation="-30 0 0">\n </a-entity>\n\n <a-entity id="scoreNumberContainer" position="1.5 0.13 -4">\n <a-entity\n id="combo"\n mixin="scoreText"\n bind__text="color: colorPrimary; value: \'STREAK \' + score.combo"\n text="width: 3.5; align: left; anchor: left"\n rotation="-20 0 0"\n position="-0.025 0.175 0"></a-entity>\n\n <a-entity\n id="accuracy"\n mixin="scoreText"\n bind__text="color: colorSecondary; value: score.accuracyInt + \'%\' + \' / \' + score.score"\n text="width: 3.5; align: left; anchor: left"\n rotation="-20 0 0"></a-entity>\n </a-entity>\n</a-entity>\n\x3c!-- </require> --\x3e</require>\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/gameMenu.html"> --\x3e\n<a-mixin\n id="gameMenuButton"\n mixin="bigMenuButton"\n animation__mouseenter="property: components.material.material.uniforms.activePanel.value; from: 0; to: 1; startEvents: mouseenter; pauseEvents: mouseleave; dur: 70"\n animation__mouseleave="property: components.material.material.uniforms.activePanel.value; from: 1; to: 0; startEvents: mouseleave; pauseEvents: mouseenter; dur: 70"\n geometry="height: 0.28"></a-mixin>\n\n<a-mixin\n id="gameMenuButtonText"\n mixin="font"\n position="0 -0.08 0.01"\n render-order="menutext"\n text="align: center; wrapCount: 17"></a-mixin>\n\n\x3c!-- Titles. --\x3e\n<a-entity id="inGameMenuTitles" position="0 2.2 -2.3">\n <a-entity mixin="gameMenuButtonText" text="value: GAME OVER; color: #f01978; width: 3.5" bind__visible="isGameOver"></a-entity>\n <a-entity mixin="gameMenuButtonText" text="value: SONG CLEARED; color: #FFF; width: 3.5" bind__visible="isVictory" position="0 0.1 0"></a-entity>\n <a-entity mixin="gameMenuButtonText" bind__text="color: colorPrimary" text="value: PAUSED; width: 3.5" bind__visible="isPaused"></a-entity>\n</a-entity>\n\n<a-entity\n id="gameMenu"\n bind__visible="isPaused || isVictory"\n position="0 1.5 -2"\n play-sound="event: mouseenter; sound: #hoverSound; volume: 0.1"\n play-sound__click="event: click; sound: #confirmSound; volume: 0.25">\n\n \x3c!-- Actions. --\x3e\n <a-entity\n id="resumeButton"\n mixin="gameMenuButton"\n bind-toggle__raycastable="isPaused"\n bind__visible="isPaused"\n position="0 0.35 0"\n proxy-event="event: click; to: a-scene; as: gamemenuresume">\n <a-entity mixin="gameMenuButtonText" text="value: RESUME"></a-entity>\n </a-entity>\n\n <a-entity\n id="restartButton"\n mixin="gameMenuButton"\n bind__visible="!isVictory"\n bind-toggle__raycastable="isPaused || isGameOver"\n proxy-event="event: click; to: a-scene; as: gamemenurestart">\n <a-entity mixin="gameMenuButtonText" text="value: RESTART SONG"></a-entity>\n </a-entity>\n\n <a-entity\n id="exitButton"\n mixin="gameMenuButton"\n bind__visible="!isVictory"\n bind-toggle__raycastable="isPaused || isGameOver"\n position="0 -0.35 0"\n proxy-event="event: click; to: a-scene; as: gamemenuexit">\n <a-entity mixin="gameMenuButtonText" text="value: EXIT TO MENU"></a-entity>\n </a-entity>\n\n \x3c!-- Song info. --\x3e\n <a-entity id="gameMenuSongInfoContainer"\n position="0 -1 0.15473"\n rotation="-20 0 0"\n song-info-positioner\n bind__song-info-positioner="victory: isVictory">\n <a-entity id="gameMenuSongBackground"\n bind-toggle__raycastable="isPaused || isVictory"\n render-order="menu"\n geometry="primitive: plane; width: 2.5; height: 0.3"\n material="shader: panelShader; transparent: true; ratio: 4; borderRadius: 0.5; borderWidth: 0.02"\n position="0 0 -0.03"></a-entity>\n\n <a-entity id="gameMenuSongImage"\n copy-texture="from: #menuSelectedChallengeImage"\n geometry="primitive: plane; buffer: false; skipCache: true; height: 0.3; width: 0.3"\n material="shader: flat"\n position="-1 0 0"></a-entity>\n\n <a-entity id="gameMenuSongInfo">\n <a-entity\n id="gameMenuSongName"\n position="0 0.01 0"\n mixin="font" text="align: center; color: #fff; wrapCount: 30; baseline: top; lineHeight: 36; width: 1.2"\n bind__text="value: challenge.metadata.songName"></a-entity>\n <a-entity\n id="gameMenuSongSubName"\n mixin="font"\n position="0 -0.09 0"\n bind__text="color: colorSecondary"\n bind__text-truncate="value: challenge.metadata.songSubName + \' - \' + challenge.metadata.songAuthorName"\n text-truncate="length: 80"\n text="wrapCount: 80; align: center; width: 2.4" bind__text="value: menuSelectedChallenge.songSubName"></a-entity>\n </a-entity>\n </a-entity>\n</a-entity>\n\x3c!-- </require> --\x3e</require>\n\n \x3c!-- Beat pieces, explosions, fx, and weapon trail. --\x3e\n <a-entity id="rigContainer"></a-entity>\n\n \x3c!-- Supercut FX rings. --\x3e\n \n <a-entity class="superCutFx" mixin="superCut"></a-entity>\n \n <a-entity class="superCutFx" mixin="superCut"></a-entity>\n \n <a-entity class="superCutFx" mixin="superCut"></a-entity>\n \n <a-entity class="superCutFx" mixin="superCut"></a-entity>\n \n\n \x3c!-- Player. --\x3e\n <a-entity id="cameraRig">\n <a-entity\n id="camera"\n bind__wasd-controls="enabled: !inVr"\n position="0 1.6 0.5"\n camera="far: 10000"\n look-controls\n player-height\n wasd-controls="acceleration: 15"></a-entity>\n \x3c!-- Agent companion seated next to player. The GLB has its origin at\n the feet, so we drop it ~0.45m below camera height; rider has no\n visible floor at the player position, so the lower legs fade out\n and only the seated upper body is visible. --\x3e\n <a-entity\n id="agentCompanion"\n gltf-model="#agentGlb"\n agent-dance="initial: idle"\n position="0.7 0.45 0.5"\n rotation="0 165 0"\n scale="0.9 0.9 0.9"></a-entity>\n <a-entity\n id="cameraWallCollider"\n bind__raycaster__wall="enabled: isPlaying && gameMode !== \'ride\'"\n proxy-event__wallhitstart="event: raycaster-intersection; to: a-scene; as: wallhitstart"\n proxy-event__wallhitend="event: raycaster-intersection-cleared; to: a-scene; as: wallhitend"\n follow-position="target: #camera"\n raycaster__wall="objects: [data-wall-active]; interval: 150; direction: 0 -1 0; far: 5"\n visible="false"></a-entity>\n </a-entity>\n\n <a-entity\n id="controllerRig"\n proxy-event="event: recentered; to: #cameraRig; captureBubbles: true; as: recenter">\n \n\n \n <a-entity id="leftHand"\n class="weapon"\n bind__hand-swapper="enabled: rightRaycasterActive"\n bind__haptics-wall="enabled: isPlaying && gameMode === \'classic\'"\n bind__headfist="isPlaying: isPlaying"\n bind__menu-controls="enabled: mainMenuActive"\n bind__pauser="enabled: isPlaying"\n bind__punch="enabled: isPlaying && gameMode === \'punch\'"\n bind__raycaster="enabled: leftRaycasterActive"\n bind__raycaster__game="enabled: isPlaying && (gameMode === \'classic\' || gameMode === \'punch\')"\n bind__blade="enabled: isPlaying && gameMode === \'classic\'"\n bind__weapon-particles="enabled: isPlaying; gameMode: gameMode"\n bind__trail="colorScheme: colorScheme; enabled: isPlaying && gameMode === \'classic\'"\n controller="hand: left"\n desktop-input="hand: left"\n data-hand="left"\n haptics="events: mouseenter; dur: 35; force: 0.075"\n haptics__beat="events: beathaptic; dur: 90; force: 0.55"\n haptics__draw="events: drawblade; dur: 750; force: 0.025"\n haptics__plume="events: plumepulse; dur: 35; force: 0.1"\n headfist="hand: left"\n raycaster="objects: [raycastable]; far: 5; showLine: false"\n raycaster__game="objects: [raycastable-game]; far: 1; interval: 71; direction: 0 1 -1"\n weapon="hand: left"\n weapon-particles="hand: left"\n thumb-controls\n thumb-controls-debug="enabled: false; hand: left; controllerType: vive-controls"\n render-order="weapon"\n trail="color: primary; hand: left">\n <a-entity bind__position="has3DOFVR && \'0 0 -0.5\' || \'0 0 0\'">\n <a-entity\n id="leftLaser"\n class="laser"\n bind__material="color: colorPrimary"\n bind__cursor-laser="enabled: activeHand === \'left\' && !isPlaying"\n geometry="primitive: cylinder; height: 1; radius: 0.005"\n material="shader: flat; opacity: 0.25; transparent: true"\n rotation="-90 0 0"></a-entity>\n </a-entity>\n\n \x3c!-- Blade. --\x3e\n <a-entity bind__position="has3DOFVR && \'0 0 -0.5\' || \'0 0 0\'"\n bind__rotation="controllerType.indexOf(\'oculus\') !== -1 && \'135 0 0\' || \'90 0 0\'">\n <a-entity\n class="bladeContainer"\n bind__visible="isPlaying && gameMode === \'classic\'"\n animation="property: scale; from: 0 0 0; to: 1 1 1; dur: 750; easing: linear; startEvents: drawblade"\n scale="0.001 0.001 0.001">\n <a-entity\n class="blade bladeleft"\n obj-model="obj: #weaponObj"\n materials="name: leftWeapon"\n render-order="weapon"\n position="0 -0.43 0">\n <a-entity class="bladeTipHelper" position="0 -0.45 0"></a-entity>\n </a-entity>\n </a-entity>\n\n <a-entity\n class="bladeHandle"\n bind__visible="!isPlaying || gameMode === \'classic\'"\n obj-model="obj: #weaponHandleObj"\n materials="name: leftWeaponHandle">\n <a-entity class="bladeHandleHelper"></a-entity>\n </a-entity>\n </a-entity>\n\n \x3c!-- Punch. --\x3e\n <a-entity\n id="leftpunch"\n class="punch"\n render-order="weapon"\n bind__visible="isPlaying && gameMode === \'punch\'"\n bind__position="has3DOFVR && \'0 0 -0.75\' || \'0 0 0\'"\n rotation="0 0 0">\n <a-entity\n class="punchFist"\n obj-model="obj: #leftFistObj"\n materials="name: leftFist"></a-entity>\n <a-entity\n class="punchBbox"\n geometry="primitive: box; width: 0.2; height: 0.23; depth: 0.15"\n material="shader: flat; opacity: 0.5"\n position="0 0.05 0.1"\n rotation="30 0 0"\n visible="false"></a-entity>\n <a-entity\n obj-model="obj: #leftFistWeaponObj"\n materials="name: leftFistWeapon"></a-entity>\n </a-entity>\n\n \x3c!-- Ride. --\x3e\n <a-entity\n id="leftstar"\n class="handStar"\n render-order="weapon"\n bind__visible="isPlaying && gameMode === \'ride\'">\n <a-entity\n class="handStar"\n bind__material="colorPrimary: colorPrimary; colorSecondary: colorSecondary; colorTertiary: colorTertiary"\n geometry="primitive: sphere; radius: 0.1"\n material="shader: handStar"\n animation__pulse="property: components.material.material.uniforms.pulse.value; from: 2; to: 0; dur: 300; startEvents: plumepulse; easing: easeInOutQuad"\n animation__scale="property: scale; from: 2 2 2; to: 1 1 1; dur: 1200; startEvents: plumepulse; easing: easeInOutQuad"></a-entity>\n </a-entity>\n </a-entity>\n\n <a-entity\n id="leftCursorMesh"\n mixin="cursorMesh"\n bind__cursor-mesh="active: leftRaycasterActive && !isPlaying"\n bind__material="color: colorPrimary"\n cursor-mesh="cursorEl: #leftHand"\n material\n render-order="cursor"\n scale="1.3 1.3 1.3"></a-entity>\n \n \n <a-entity id="rightHand"\n class="weapon"\n bind__hand-swapper="enabled: leftRaycasterActive"\n bind__haptics-wall="enabled: isPlaying && gameMode === \'classic\'"\n bind__headfist="isPlaying: isPlaying"\n bind__menu-controls="enabled: mainMenuActive"\n bind__pauser="enabled: isPlaying"\n bind__punch="enabled: isPlaying && gameMode === \'punch\'"\n bind__raycaster="enabled: rightRaycasterActive"\n bind__raycaster__game="enabled: isPlaying && (gameMode === \'classic\' || gameMode === \'punch\')"\n bind__blade="enabled: isPlaying && gameMode === \'classic\'"\n bind__weapon-particles="enabled: isPlaying; gameMode: gameMode"\n bind__trail="colorScheme: colorScheme; enabled: isPlaying && gameMode === \'classic\'"\n controller="hand: right"\n desktop-input="hand: right"\n data-hand="right"\n haptics="events: mouseenter; dur: 35; force: 0.075"\n haptics__beat="events: beathaptic; dur: 90; force: 0.55"\n haptics__draw="events: drawblade; dur: 750; force: 0.025"\n haptics__plume="events: plumepulse; dur: 35; force: 0.1"\n headfist="hand: right"\n raycaster="objects: [raycastable]; far: 5; showLine: false"\n raycaster__game="objects: [raycastable-game]; far: 1; interval: 70; direction: 0 1 -1"\n weapon="hand: right"\n weapon-particles="hand: right"\n thumb-controls\n thumb-controls-debug="enabled: false; hand: right; controllerType: vive-controls"\n render-order="weapon"\n trail="color: secondary; hand: right">\n <a-entity bind__position="has3DOFVR && \'0 0 -0.5\' || \'0 0 0\'">\n <a-entity\n id="rightLaser"\n class="laser"\n bind__material="color: colorSecondary"\n bind__cursor-laser="enabled: activeHand === \'right\' && !isPlaying"\n geometry="primitive: cylinder; height: 1; radius: 0.005"\n material="shader: flat; opacity: 0.25; transparent: true"\n rotation="-90 0 0"></a-entity>\n </a-entity>\n\n \x3c!-- Blade. --\x3e\n <a-entity bind__position="has3DOFVR && \'0 0 -0.5\' || \'0 0 0\'"\n bind__rotation="controllerType.indexOf(\'oculus\') !== -1 && \'135 0 0\' || \'90 0 0\'">\n <a-entity\n class="bladeContainer"\n bind__visible="isPlaying && gameMode === \'classic\'"\n animation="property: scale; from: 0 0 0; to: 1 1 1; dur: 750; easing: linear; startEvents: drawblade"\n scale="0.001 0.001 0.001">\n <a-entity\n class="blade bladeright"\n obj-model="obj: #weaponObj"\n materials="name: rightWeapon"\n render-order="weapon"\n position="0 -0.43 0">\n <a-entity class="bladeTipHelper" position="0 -0.45 0"></a-entity>\n </a-entity>\n </a-entity>\n\n <a-entity\n class="bladeHandle"\n bind__visible="!isPlaying || gameMode === \'classic\'"\n obj-model="obj: #weaponHandleObj"\n materials="name: rightWeaponHandle">\n <a-entity class="bladeHandleHelper"></a-entity>\n </a-entity>\n </a-entity>\n\n \x3c!-- Punch. --\x3e\n <a-entity\n id="rightpunch"\n class="punch"\n render-order="weapon"\n bind__visible="isPlaying && gameMode === \'punch\'"\n bind__position="has3DOFVR && \'0 0 -0.75\' || \'0 0 0\'"\n rotation="0 0 0">\n <a-entity\n class="punchFist"\n obj-model="obj: #rightFistObj"\n materials="name: rightFist"></a-entity>\n <a-entity\n class="punchBbox"\n geometry="primitive: box; width: 0.2; height: 0.23; depth: 0.15"\n material="shader: flat; opacity: 0.5"\n position="0 0.05 0.1"\n rotation="30 0 0"\n visible="false"></a-entity>\n <a-entity\n obj-model="obj: #rightFistWeaponObj"\n materials="name: rightFistWeapon"></a-entity>\n </a-entity>\n\n \x3c!-- Ride. --\x3e\n <a-entity\n id="rightstar"\n class="handStar"\n render-order="weapon"\n bind__visible="isPlaying && gameMode === \'ride\'">\n <a-entity\n class="handStar"\n bind__material="colorPrimary: colorPrimary; colorSecondary: colorSecondary; colorTertiary: colorTertiary"\n geometry="primitive: sphere; radius: 0.1"\n material="shader: handStar"\n animation__pulse="property: components.material.material.uniforms.pulse.value; from: 2; to: 0; dur: 300; startEvents: plumepulse; easing: easeInOutQuad"\n animation__scale="property: scale; from: 2 2 2; to: 1 1 1; dur: 1200; startEvents: plumepulse; easing: easeInOutQuad"></a-entity>\n </a-entity>\n </a-entity>\n\n <a-entity\n id="rightCursorMesh"\n mixin="cursorMesh"\n bind__cursor-mesh="active: rightRaycasterActive && !isPlaying"\n bind__material="color: colorSecondary"\n cursor-mesh="cursorEl: #rightHand"\n material\n render-order="cursor"\n scale="1.3 1.3 1.3"></a-entity>\n \n </a-entity>\n\n <a-entity\n id="stepback"\n position="0 1.6 -1.55"\n geometry="primitive: plane; width: 0.25; height: 0.25;"\n material="shader: flat; src: #stepbackImg; transparent: true; opacity: 0"\n render-order="stepback"></a-entity>\n </a-entity>\n\n <a-entity\n id="mouseCursor"\n bind__raycaster="enabled: !inVR"\n cursor="rayOrigin: mouse"\n raycaster="objects: [raycastable]"></a-entity>\n <a-entity\n id="mouseCursorMesh"\n mixin="cursorMesh"\n cursor-mesh="cursorEl: #mouseCursor"\n bind__cursor-mesh="active: menuActive"\n render-order="cursor"></a-entity>\n\n <a-entity\n tail="target: #leftstar"\n render-order="weapon"\n bind__visible="isPlaying && gameMode === \'ride\'"></a-entity>\n <a-entity\n tail="target: #rightstar"\n render-order="weapon"\n bind__visible="isPlaying && gameMode === \'ride\'"></a-entity>\n</a-scene>\n';document.addEventListener("DOMContentLoaded",(function(){let e=document.getElementById("app");e||(e=document.createElement("div"),e.id="app",document.body.appendChild(e));e.innerHTML=r}));{const t=n(240).DiffDOM;if(e.hot.accept(),e.hot.data&&e.hot.data.oldHtml){const n=e.hot.data.oldHtml,i=new t,o=document.createElement("div");o.innerHTML=n;const a=document.createElement("div");a.innerHTML=r;const s=i.diff(o.querySelector("a-scene"),a.querySelector("a-scene"));i.apply(document.querySelector("a-scene"),s)}e.hot.dispose(e=>{e.oldHtml=r})}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function r(e,t,n){let i;return"#text"===e.nodeName?i=n.document.createTextNode(e.data):"#comment"===e.nodeName?i=n.document.createComment(e.data):("svg"===e.nodeName||t?(i=n.document.createElementNS("http://www.w3.org/2000/svg",e.nodeName),t=!0):i=n.document.createElement(e.nodeName),e.attributes&&Object.entries(e.attributes).forEach(([e,t])=>i.setAttribute(e,t)),e.childNodes&&e.childNodes.forEach(e=>i.appendChild(r(e,t,n))),n.valueDiffing&&(e.value&&(i.value=e.value),e.checked&&(i.checked=e.checked),e.selected&&(i.selected=e.selected))),i}function i(e,t){for(t=t.slice();t.length>0;){if(!e.childNodes)return!1;const n=t.splice(0,1)[0];e=e.childNodes[n]}return e}function o(e,t,n){let o,a,s,c,l,u=i(e,t[n._const.route]);const h={diff:t,node:u};if(n.preDiffApply(h))return!0;switch(t[n._const.action]){case n._const.addAttribute:if(!u||!u.setAttribute)return!1;u.setAttribute(t[n._const.name],t[n._const.value]);break;case n._const.modifyAttribute:if(!u||!u.setAttribute)return!1;u.setAttribute(t[n._const.name],t[n._const.newValue]),"INPUT"===u.nodeName&&"value"===t[n._const.name]&&(u.value=t[n._const.oldValue]);break;case n._const.removeAttribute:if(!u||!u.removeAttribute)return!1;u.removeAttribute(t[n._const.name]);break;case n._const.modifyTextElement:if(!u||3!==u.nodeType)return!1;n.textDiff(u,u.data,t[n._const.oldValue],t[n._const.newValue]);break;case n._const.modifyValue:if(!u||void 0===u.value)return!1;u.value=t[n._const.newValue];break;case n._const.modifyComment:if(!u||void 0===u.data)return!1;n.textDiff(u,u.data,t[n._const.oldValue],t[n._const.newValue]);break;case n._const.modifyChecked:if(!u||void 0===u.checked)return!1;u.checked=t[n._const.newValue];break;case n._const.modifySelected:if(!u||void 0===u.selected)return!1;u.selected=t[n._const.newValue];break;case n._const.replaceElement:u.parentNode.replaceChild(r(t[n._const.newValue],"http://www.w3.org/2000/svg"===u.namespaceURI,n),u);break;case n._const.relocateGroup:c=Array(...new Array(t.groupLength)).map(()=>u.removeChild(u.childNodes[t[n._const.from]])),c.forEach((e,r)=>{0===r&&(a=u.childNodes[t[n._const.to]]),u.insertBefore(e,a||null)});break;case n._const.removeElement:u.parentNode.removeChild(u);break;case n._const.addElement:s=t[n._const.route].slice(),l=s.splice(s.length-1,1)[0],u=i(e,s),u.insertBefore(r(t[n._const.element],"http://www.w3.org/2000/svg"===u.namespaceURI,n),u.childNodes[l]||null);break;case n._const.removeTextElement:if(!u||3!==u.nodeType)return!1;u.parentNode.removeChild(u);break;case n._const.addTextElement:if(s=t[n._const.route].slice(),l=s.splice(s.length-1,1)[0],o=n.document.createTextNode(t[n._const.value]),u=i(e,s),!u||!u.childNodes)return!1;u.insertBefore(o,u.childNodes[l]||null);break;default:console.log("unknown action")}return h.newNode=o,n.postDiffApply(h),!0}function a(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function s(e,t,n){t.length||(t=[t]),(t=t.slice()).reverse(),t.forEach(t=>{!function(e,t,n){switch(t[n._const.action]){case n._const.addAttribute:t[n._const.action]=n._const.removeAttribute,o(e,t,n);break;case n._const.modifyAttribute:a(t,n._const.oldValue,n._const.newValue),o(e,t,n);break;case n._const.removeAttribute:t[n._const.action]=n._const.addAttribute,o(e,t,n);break;case n._const.modifyTextElement:case n._const.modifyValue:case n._const.modifyComment:case n._const.modifyChecked:case n._const.modifySelected:case n._const.replaceElement:a(t,n._const.oldValue,n._const.newValue),o(e,t,n);break;case n._const.relocateGroup:a(t,n._const.from,n._const.to),o(e,t,n);break;case n._const.removeElement:t[n._const.action]=n._const.addElement,o(e,t,n);break;case n._const.addElement:t[n._const.action]=n._const.removeElement,o(e,t,n);break;case n._const.removeTextElement:t[n._const.action]=n._const.addTextElement,o(e,t,n);break;case n._const.addTextElement:t[n._const.action]=n._const.removeTextElement,o(e,t,n);break;default:console.log("unknown action")}}(e,t,n)})}n.r(t),n.d(t,"DiffDOM",(function(){return x})),n.d(t,"TraceLogger",(function(){return S}));class c{constructor(e={}){Object.entries(e).forEach(([e,t])=>this[e]=t)}toString(){return JSON.stringify(this)}setValue(e,t){return this[e]=t,this}}function l(e){const t=[];return"#text"!==e.nodeName&&"#comment"!==e.nodeName&&(t.push(e.nodeName),e.attributes&&(e.attributes.class&&t.push(`${e.nodeName}.${e.attributes.class.replace(/ /g,".")}`),e.attributes.id&&t.push(`${e.nodeName}#${e.attributes.id}`))),t}function u(e){const t={},n={};return e.forEach(e=>{l(e).forEach(e=>{const r=e in t;r||e in n?r&&(delete t[e],n[e]=!0):t[e]=!0})}),t}function h(e,t){const n=u(e),r=u(t),i={};return Object.keys(n).forEach(e=>{r[e]&&(i[e]=!0)}),i}function d(e){return delete e.outerDone,delete e.innerDone,delete e.valueDone,!e.childNodes||e.childNodes.every(d)}function p(e,t){if(!["nodeName","value","checked","selected","data"].every(n=>e[n]===t[n]))return!1;if(Boolean(e.attributes)!==Boolean(t.attributes))return!1;if(Boolean(e.childNodes)!==Boolean(t.childNodes))return!1;if(e.attributes){const n=Object.keys(e.attributes),r=Object.keys(t.attributes);if(n.length!==r.length)return!1;if(!n.every(n=>e.attributes[n]===t.attributes[n]))return!1}if(e.childNodes){if(e.childNodes.length!==t.childNodes.length)return!1;if(!e.childNodes.every((e,n)=>p(e,t.childNodes[n])))return!1}return!0}function f(e,t,n,r,i){if(!e||!t)return!1;if(e.nodeName!==t.nodeName)return!1;if("#text"===e.nodeName)return!!i||e.data===t.data;if(e.nodeName in n)return!0;if(e.attributes&&t.attributes){if(e.attributes.id){if(e.attributes.id!==t.attributes.id)return!1;if(`${e.nodeName}#${e.attributes.id}`in n)return!0}if(e.attributes.class&&e.attributes.class===t.attributes.class){if(`${e.nodeName}.${e.attributes.class.replace(/ /g,".")}`in n)return!0}}if(r)return!0;const o=e.childNodes?e.childNodes.slice().reverse():[],a=t.childNodes?t.childNodes.slice().reverse():[];if(o.length!==a.length)return!1;if(i)return o.every((e,t)=>e.nodeName===a[t].nodeName);{const e=h(o,a);return o.every((t,n)=>f(t,a[n],e,!0,!0))}}function m(e){return JSON.parse(JSON.stringify(e))}function g(e,t,n,r){let i=0,o=[];const a=e.length,s=t.length,c=Array(...new Array(a+1)).map(()=>[]),u=h(e,t);let d=a===s;d&&e.some((e,n)=>{const r=l(e),i=l(t[n]);return r.length!==i.length?(d=!1,!0):(r.some((e,t)=>{if(e!==i[t])return d=!1,!0}),!d||void 0)});for(let l=0;l<a;l++){const a=e[l];for(let e=0;e<s;e++){const s=t[e];n[l]||r[e]||!f(a,s,u,d)?c[l+1][e+1]=0:(c[l+1][e+1]=c[l][e]?c[l][e]+1:1,c[l+1][e+1]>=i&&(i=c[l+1][e+1],o=[l+1,e+1]))}}return 0!==i&&{oldValue:o[0]-i,newValue:o[1]-i,length:i}}function y(e,t){return Array(...new Array(e)).map(()=>t)}class v{constructor(){this.list=[]}add(e){this.list.push(...e)}forEach(e){this.list.forEach(t=>e(t))}}function b(e,t){let n,r,i=e;for(t=t.slice();t.length>0;){if(!i.childNodes)return!1;r=t.splice(0,1)[0],n=i,i=i.childNodes[r]}return{node:i,parentNode:n,nodeIndex:r}}function _(e,t,n){return t.forEach(t=>{!function(e,t,n){const r=b(e,t[n._const.route]);let i=r.node;const o=r.parentNode,a=r.nodeIndex,s=[],c={diff:t,node:i};if(n.preDiffApply(c))return!0;let l,u,h,d;switch(t[n._const.action]){case n._const.addAttribute:i.attributes||(i.attributes={}),i.attributes[t[n._const.name]]=t[n._const.value],"checked"===t[n._const.name]?i.checked=!0:"selected"===t[n._const.name]?i.selected=!0:"INPUT"===i.nodeName&&"value"===t[n._const.name]&&(i.value=t[n._const.value]);break;case n._const.modifyAttribute:i.attributes[t[n._const.name]]=t[n._const.newValue];break;case n._const.removeAttribute:delete i.attributes[t[n._const.name]],0===Object.keys(i.attributes).length&&delete i.attributes,"checked"===t[n._const.name]?i.checked=!1:"selected"===t[n._const.name]?delete i.selected:"INPUT"===i.nodeName&&"value"===t[n._const.name]&&delete i.value;break;case n._const.modifyTextElement:i.data=t[n._const.newValue];break;case n._const.modifyValue:i.value=t[n._const.newValue];break;case n._const.modifyComment:i.data=t[n._const.newValue];break;case n._const.modifyChecked:i.checked=t[n._const.newValue];break;case n._const.modifySelected:i.selected=t[n._const.newValue];break;case n._const.replaceElement:l=m(t[n._const.newValue]),l.outerDone=!0,l.innerDone=!0,l.valueDone=!0,o.childNodes[a]=l;break;case n._const.relocateGroup:u=i.childNodes.splice(t[n._const.from],t.groupLength).reverse(),u.forEach(e=>i.childNodes.splice(t[n._const.to],0,e)),i.subsets&&i.subsets.forEach(e=>{if(t[n._const.from]<t[n._const.to]&&e.oldValue<=t[n._const.to]&&e.oldValue>t[n._const.from]){e.oldValue-=t.groupLength;const r=e.oldValue+e.length-t[n._const.to];r>0&&(s.push({oldValue:t[n._const.to]+t.groupLength,newValue:e.newValue+e.length-r,length:r}),e.length-=r)}else if(t[n._const.from]>t[n._const.to]&&e.oldValue>t[n._const.to]&&e.oldValue<t[n._const.from]){e.oldValue+=t.groupLength;const r=e.oldValue+e.length-t[n._const.to];r>0&&(s.push({oldValue:t[n._const.to]+t.groupLength,newValue:e.newValue+e.length-r,length:r}),e.length-=r)}else e.oldValue===t[n._const.from]&&(e.oldValue=t[n._const.to])});break;case n._const.removeElement:o.childNodes.splice(a,1),o.subsets&&o.subsets.forEach(e=>{e.oldValue>a?e.oldValue-=1:e.oldValue===a?e.delete=!0:e.oldValue<a&&e.oldValue+e.length>a&&(e.oldValue+e.length-1===a?e.length--:(s.push({newValue:e.newValue+a-e.oldValue,oldValue:a,length:e.length-a+e.oldValue-1}),e.length=a-e.oldValue))}),i=o;break;case n._const.addElement:h=t[n._const.route].slice(),d=h.splice(h.length-1,1)[0],i=b(e,h).node,l=m(t[n._const.element]),l.outerDone=!0,l.innerDone=!0,l.valueDone=!0,i.childNodes||(i.childNodes=[]),d>=i.childNodes.length?i.childNodes.push(l):i.childNodes.splice(d,0,l),i.subsets&&i.subsets.forEach(e=>{if(e.oldValue>=d)e.oldValue+=1;else if(e.oldValue<d&&e.oldValue+e.length>d){const t=e.oldValue+e.length-d;s.push({newValue:e.newValue+e.length-t,oldValue:d+1,length:t}),e.length-=t}});break;case n._const.removeTextElement:o.childNodes.splice(a,1),"TEXTAREA"===o.nodeName&&delete o.value,o.subsets&&o.subsets.forEach(e=>{e.oldValue>a?e.oldValue-=1:e.oldValue===a?e.delete=!0:e.oldValue<a&&e.oldValue+e.length>a&&(e.oldValue+e.length-1===a?e.length--:(s.push({newValue:e.newValue+a-e.oldValue,oldValue:a,length:e.length-a+e.oldValue-1}),e.length=a-e.oldValue))}),i=o;break;case n._const.addTextElement:h=t[n._const.route].slice(),d=h.splice(h.length-1,1)[0],l={},l.nodeName="#text",l.data=t[n._const.value],i=b(e,h).node,i.childNodes||(i.childNodes=[]),d>=i.childNodes.length?i.childNodes.push(l):i.childNodes.splice(d,0,l),"TEXTAREA"===i.nodeName&&(i.value=t[n._const.newValue]),i.subsets&&i.subsets.forEach(e=>{if(e.oldValue>=d&&(e.oldValue+=1),e.oldValue<d&&e.oldValue+e.length>d){const t=e.oldValue+e.length-d;s.push({newValue:e.newValue+e.length-t,oldValue:d+1,length:t}),e.length-=t}});break;default:console.log("unknown action")}i.subsets&&(i.subsets=i.subsets.filter(e=>!e.delete&&e.oldValue!==e.newValue),s.length&&(i.subsets=i.subsets.concat(s))),c.newNode=l,n.postDiffApply(c)}(e,t,n)}),!0}function w(e,t){const n={};if(n.nodeName=e.nodeName,"#text"===n.nodeName||"#comment"===n.nodeName)n.data=e.data;else{if(e.attributes&&e.attributes.length>0){n.attributes={};Array.prototype.slice.call(e.attributes).forEach(e=>n.attributes[e.name]=e.value)}if("TEXTAREA"===n.nodeName)n.value=e.value;else if(e.childNodes&&e.childNodes.length>0){n.childNodes=[];Array.prototype.slice.call(e.childNodes).forEach(e=>n.childNodes.push(w(e,t)))}t.valueDiffing&&(void 0!==e.checked&&e.type&&["radio","checkbox"].includes(e.type.toLowerCase())?n.checked=e.checked:void 0!==e.value&&(n.value=e.value),void 0!==e.selected&&(n.selected=e.selected))}return n}class E{constructor(e,t,n){this.options=n,this.t1=w(e,this.options),this.t2=w(t,this.options),this.diffcount=0,this.foundAll=!1,this.debug&&(this.t1Orig=w(e,this.options),this.t2Orig=w(t,this.options)),this.tracker=new v}init(){return this.findDiffs(this.t1,this.t2)}findDiffs(e,t){let n;do{if(this.options.debug&&(this.diffcount+=1,this.diffcount>this.options.diffcap))throw window.diffError=[this.t1Orig,this.t2Orig],new Error(`surpassed diffcap:${JSON.stringify(this.t1Orig)} -> ${JSON.stringify(this.t2Orig)}`);n=this.findNextDiff(e,t,[]),0===n.length&&(p(e,t)||(this.foundAll?(console.error("Could not find remaining diffs!"),console.log({t1:e,t2:t})):(this.foundAll=!0,d(e),n=this.findNextDiff(e,t,[])))),n.length>0&&(this.foundAll=!1,this.tracker.add(n),_(e,n,this.options))}while(n.length>0);return this.tracker.list}findNextDiff(e,t,n){let r,i;if(this.options.maxDepth&&n.length>this.options.maxDepth)return[];if(!e.outerDone){if(r=this.findOuterDiff(e,t,n),this.filterOuterDiff&&(i=this.filterOuterDiff(e,t,r),i&&(r=i)),r.length>0)return e.outerDone=!0,r;e.outerDone=!0}if(!e.innerDone){if(r=this.findInnerDiff(e,t,n),r.length>0)return r;e.innerDone=!0}if(this.options.valueDiffing&&!e.valueDone){if(r=this.findValueDiff(e,t,n),r.length>0)return e.valueDone=!0,r;e.valueDone=!0}return[]}findOuterDiff(e,t,n){const r=[];let i,o,a,s,l,u;if(e.nodeName!==t.nodeName)return[(new c).setValue(this.options._const.action,this.options._const.replaceElement).setValue(this.options._const.oldValue,m(e)).setValue(this.options._const.newValue,m(t)).setValue(this.options._const.route,n)];if(n.length&&this.options.maxChildCount&&e.childNodes&&t.childNodes&&e.childNodes.length>this.options.maxChildCount&&t.childNodes.length>this.options.maxChildCount){const r=e.childNodes.length<t.childNodes.length?e.childNodes.length:t.childNodes.length;let i=0,o=0;for(;i<this.options.maxChildDiffCount&&o<r;)p(e.childNodes[o],t.childNodes[o])||i++,o++;if(i===this.options.maxChildDiffCount)return[(new c).setValue(this.options._const.action,this.options._const.replaceElement).setValue(this.options._const.oldValue,m(e)).setValue(this.options._const.newValue,m(t)).setValue(this.options._const.route,n)]}if(e.data!==t.data)return"#text"===e.nodeName?[(new c).setValue(this.options._const.action,this.options._const.modifyTextElement).setValue(this.options._const.route,n).setValue(this.options._const.oldValue,e.data).setValue(this.options._const.newValue,t.data)]:[(new c).setValue(this.options._const.action,this.options._const.modifyComment).setValue(this.options._const.route,n).setValue(this.options._const.oldValue,e.data).setValue(this.options._const.newValue,t.data)];for(o=e.attributes?Object.keys(e.attributes).sort():[],a=t.attributes?Object.keys(t.attributes).sort():[],s=o.length,u=0;u<s;u++)i=o[u],l=a.indexOf(i),-1===l?r.push((new c).setValue(this.options._const.action,this.options._const.removeAttribute).setValue(this.options._const.route,n).setValue(this.options._const.name,i).setValue(this.options._const.value,e.attributes[i])):(a.splice(l,1),e.attributes[i]!==t.attributes[i]&&r.push((new c).setValue(this.options._const.action,this.options._const.modifyAttribute).setValue(this.options._const.route,n).setValue(this.options._const.name,i).setValue(this.options._const.oldValue,e.attributes[i]).setValue(this.options._const.newValue,t.attributes[i])));for(s=a.length,u=0;u<s;u++)i=a[u],r.push((new c).setValue(this.options._const.action,this.options._const.addAttribute).setValue(this.options._const.route,n).setValue(this.options._const.name,i).setValue(this.options._const.value,t.attributes[i]));return r}findInnerDiff(e,t,n){const r=e.subsets&&e.subsetsAge--?e.subsets:e.childNodes&&t.childNodes?function(e,t){const n=e.childNodes?e.childNodes:[],r=t.childNodes?t.childNodes:[],i=y(n.length,!1),o=y(r.length,!1),a=[];let s=!0;const c=function(){return arguments[1]},l=e=>{i[s.oldValue+e]=!0,o[s.newValue+e]=!0};for(;s;)if(s=g(n,r,i,o),s){a.push(s);Array(...new Array(s.length)).map(c).forEach(e=>l(e))}return e.subsets=a,e.subsetsAge=100,a}(e,t):[],i=e.childNodes?e.childNodes:[],o=t.childNodes?t.childNodes:[];let a,s=[],l=0;if(r.length>0&&(s=this.attemptGroupRelocation(e,t,r,n),s.length>0))return s;const u=Math.max(i.length,o.length);i.length!==o.length&&(a=!0);for(let e=0;e<u;e+=1){const t=i[e],r=o[e];a&&(t&&!r?"#text"===t.nodeName?(s.push((new c).setValue(this.options._const.action,this.options._const.removeTextElement).setValue(this.options._const.route,n.concat(l)).setValue(this.options._const.value,t.data)),l-=1):(s.push((new c).setValue(this.options._const.action,this.options._const.removeElement).setValue(this.options._const.route,n.concat(l)).setValue(this.options._const.element,m(t))),l-=1):r&&!t&&("#text"===r.nodeName?s.push((new c).setValue(this.options._const.action,this.options._const.addTextElement).setValue(this.options._const.route,n.concat(l)).setValue(this.options._const.value,r.data)):s.push((new c).setValue(this.options._const.action,this.options._const.addElement).setValue(this.options._const.route,n.concat(l)).setValue(this.options._const.element,m(r))))),t&&r&&(s=s.concat(this.findNextDiff(t,r,n.concat(l)))),l+=1}return e.innerDone=!0,s}attemptGroupRelocation(e,t,n,r){const i=function(e,t,n){const r=e.childNodes?y(e.childNodes.length,!0):[],i=t.childNodes?y(t.childNodes.length,!0):[];let o=0;return n.forEach(e=>{const t=e.oldValue+e.length,n=e.newValue+e.length;for(let n=e.oldValue;n<t;n+=1)r[n]=o;for(let t=e.newValue;t<n;t+=1)i[t]=o;o+=1}),{gaps1:r,gaps2:i}}(e,t,n),o=i.gaps1,a=i.gaps2;let s,l,u,h,d,p,g=Math.min(o.length,a.length);const v=[];for(let i=0,y=0;i<g;y+=1,i+=1)if(!0===o[i])if(h=e.childNodes[y],"#text"===h.nodeName){if("#text"===t.childNodes[i].nodeName&&h.data!==t.childNodes[i].data){for(p=y;e.childNodes.length>p+1&&"#text"===e.childNodes[p+1].nodeName;)if(p+=1,t.childNodes[i].data===e.childNodes[p].data){d=!0;break}if(!d)return v.push((new c).setValue(this.options._const.action,this.options._const.modifyTextElement).setValue(this.options._const.route,r.concat(i)).setValue(this.options._const.oldValue,h.data).setValue(this.options._const.newValue,t.childNodes[i].data)),v}v.push((new c).setValue(this.options._const.action,this.options._const.removeTextElement).setValue(this.options._const.route,r.concat(i)).setValue(this.options._const.value,h.data)),o.splice(i,1),g=Math.min(o.length,a.length),i-=1}else v.push((new c).setValue(this.options._const.action,this.options._const.removeElement).setValue(this.options._const.route,r.concat(i)).setValue(this.options._const.element,m(h))),o.splice(i,1),g=Math.min(o.length,a.length),i-=1;else if(!0===a[i])h=t.childNodes[i],"#text"===h.nodeName?(v.push((new c).setValue(this.options._const.action,this.options._const.addTextElement).setValue(this.options._const.route,r.concat(i)).setValue(this.options._const.value,h.data)),o.splice(i,0,!0),g=Math.min(o.length,a.length),y-=1):(v.push((new c).setValue(this.options._const.action,this.options._const.addElement).setValue(this.options._const.route,r.concat(i)).setValue(this.options._const.element,m(h))),o.splice(i,0,!0),g=Math.min(o.length,a.length),y-=1);else if(o[i]!==a[i]){if(v.length>0)return v;if(u=n[o[i]],l=Math.min(u.newValue,e.childNodes.length-u.length),l!==u.oldValue){s=!1;for(let t=0;t<u.length;t+=1)f(e.childNodes[l+t],e.childNodes[u.oldValue+t],[],!1,!0)||(s=!0);if(s)return[(new c).setValue(this.options._const.action,this.options._const.relocateGroup).setValue("groupLength",u.length).setValue(this.options._const.from,u.oldValue).setValue(this.options._const.to,l).setValue(this.options._const.route,r)]}}return v}findValueDiff(e,t,n){const r=[];return e.selected!==t.selected&&r.push((new c).setValue(this.options._const.action,this.options._const.modifySelected).setValue(this.options._const.oldValue,e.selected).setValue(this.options._const.newValue,t.selected).setValue(this.options._const.route,n)),(e.value||t.value)&&e.value!==t.value&&"OPTION"!==e.nodeName&&r.push((new c).setValue(this.options._const.action,this.options._const.modifyValue).setValue(this.options._const.oldValue,e.value||"").setValue(this.options._const.newValue,t.value||"").setValue(this.options._const.route,n)),e.checked!==t.checked&&r.push((new c).setValue(this.options._const.action,this.options._const.modifyChecked).setValue(this.options._const.oldValue,e.checked).setValue(this.options._const.newValue,t.checked).setValue(this.options._const.route,n)),r}}const A={debug:!1,diffcap:10,maxDepth:!1,maxChildCount:50,maxChildDiffCount:3,valueDiffing:!0,textDiff(e,t,n,r){e.data=r},preVirtualDiffApply(){},postVirtualDiffApply(){},preDiffApply(){},postDiffApply(){},filterOuterDiff:null,compress:!1,_const:!1,document:!(!window||!window.document)&&window.document};class x{constructor(e={}){if(this.options=e,Object.entries(A).forEach(([e,t])=>{Object.prototype.hasOwnProperty.call(this.options,e)||(this.options[e]=t)}),!this.options._const){const e=["addAttribute","modifyAttribute","removeAttribute","modifyTextElement","relocateGroup","removeElement","addElement","removeTextElement","addTextElement","replaceElement","modifyValue","modifyChecked","modifySelected","modifyComment","action","route","oldValue","newValue","element","group","from","to","name","value","data","attributes","nodeName","childNodes","checked","selected"];this.options._const={},this.options.compress?e.forEach((e,t)=>this.options._const[e]=t):e.forEach(e=>this.options._const[e]=e)}this.DiffFinder=E}apply(e,t){return function(e,t,n){return t.every(t=>o(e,t,n))}(e,t,this.options)}undo(e,t){return s(e,t,this.options)}diff(e,t){return new this.DiffFinder(e,t,this.options).init()}}class S{constructor(e={}){this.pad="│ ",this.padding="",this.tick=1,this.messages=[];const t=(e,t)=>{const n=e[t];e[t]=(...r)=>{this.fin(t,Array.prototype.slice.call(r));const i=n.apply(e,r);return this.fout(t,i),i}};for(let n in e)"function"==typeof e[n]&&t(e,n);this.log("┌ TRACELOG START")}fin(e,t){this.padding+=this.pad,this.log("├─> entering "+e,t)}fout(e,t){this.log("│<──┘ generated return value",t),this.padding=this.padding.substring(0,this.padding.length-this.pad.length)}format(e,t){return`${function(e){for(e=""+e;e.length<4;)e="0"+e;return e}(t)}> ${this.padding}${e}`}log(){let e=Array.prototype.slice.call(arguments);const t=function(e){return e?"string"==typeof e?e:e instanceof HTMLElement?e.outerHTML||"<empty>":e instanceof Array?`[${e.map(t).join(",")}]`:e.toString()||e.valueOf()||"<unknown>":"<falsey>"};e=e.map(t).join(", "),this.messages.push(this.format(e,this.tick++))}toString(){let e="└───";for(;e.length<=this.padding.length+this.pad.length;)e+="× ";let t=this.padding;return this.padding="",e=this.format(e,this.tick),this.padding=t,`${this.messages.join("\n")}\n${e}`}}},function(e,t,n){"use strict";n.r(t);var r=THREE.ExtrudeGeometry;class i extends r{constructor(e,t={}){const n=t.font;if(void 0===n)super();else{const r=n.generateShapes(e,t.size);t.depth=void 0!==t.height?t.height:50,void 0===t.bevelThickness&&(t.bevelThickness=10),void 0===t.bevelSize&&(t.bevelSize=8),void 0===t.bevelEnabled&&(t.bevelEnabled=!1),super(r,t)}this.type="TextGeometry"}}function o(){}void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}),void 0===Math.sign&&(Math.sign=function(e){return e<0?-1:e>0?1:+e}),"name"in Function.prototype==!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t}),Object.assign(o.prototype,{addEventListener:function(e,t){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)},hasEventListener:function(e,t){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)},removeEventListener:function(e,t){if(void 0!==this._listeners){var n=this._listeners[e];if(void 0!==n){var r=n.indexOf(t);-1!==r&&n.splice(r,1)}}},dispatchEvent:function(e){if(void 0!==this._listeners){var t=this._listeners[e.type];if(void 0!==t){e.target=this;for(var n=t.slice(0),r=0,i=n.length;r<i;r++)n[r].call(this,e)}}}});var a,s,c,l,u,h,d,p,f,m={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var e=[],t=0;t<256;t++)e[t]=(t<16?"0":"")+t.toString(16).toUpperCase();return function(){var t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return e[255&t]+e[t>>8&255]+e[t>>16&255]+e[t>>24&255]+"-"+e[255&n]+e[n>>8&255]+"-"+e[n>>16&15|64]+e[n>>24&255]+"-"+e[63&r|128]+e[r>>8&255]+"-"+e[r>>16&255]+e[r>>24&255]+e[255&i]+e[i>>8&255]+e[i>>16&255]+e[i>>24&255]}}(),clamp:function(e,t,n){return Math.max(t,Math.min(n,e))},euclideanModulo:function(e,t){return(e%t+t)%t},mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},lerp:function(e,t,n){return(1-n)*e+n*t},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},degToRad:function(e){return e*m.DEG2RAD},radToDeg:function(e){return e*m.RAD2DEG},isPowerOfTwo:function(e){return 0==(e&e-1)&&0!==e},ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}};function g(e,t){this.x=e||0,this.y=t||0}function y(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function v(e,t,n,r){this._x=e||0,this._y=t||0,this._z=n||0,this._w=void 0!==r?r:1}function b(e,t,n){this.x=e||0,this.y=t||0,this.z=n||0}function _(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}Object.defineProperties(g.prototype,{width:{get:function(){return this.x},set:function(e){this.x=e}},height:{get:function(){return this.y},set:function(e){this.y=e}}}),Object.assign(g.prototype,{isVector2:!0,set:function(e,t){return this.x=e,this.y=t,this},setScalar:function(e){return this.x=e,this.y=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(e){return this.x=e.x,this.y=e.y,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)},addScalar:function(e){return this.x+=e,this.y+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)},subScalar:function(e){return this.x-=e,this.y-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this},multiply:function(e){return this.x*=e.x,this.y*=e.y,this},multiplyScalar:function(e){return this.x*=e,this.y*=e,this},divide:function(e){return this.x/=e.x,this.y/=e.y,this},divideScalar:function(e){return this.multiplyScalar(1/e)},applyMatrix3:function(e){var t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this},clampScalar:(a=new g,s=new g,function(e,t){return a.set(e,e),s.set(t,t),this.clamp(a,s)}),clampLength:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this},negate:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(e){return this.x*e.x+this.y*e.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var e=Math.atan2(this.y,this.x);return e<0&&(e+=2*Math.PI),e},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},manhattanDistanceTo:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this},lerpVectors:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},equals:function(e){return e.x===this.x&&e.y===this.y},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e},fromBufferAttribute:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this},rotateAround:function(e,t){var n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,o=this.y-e.y;return this.x=i*n-o*r+e.x,this.y=i*r+o*n+e.y,this}}),Object.assign(y.prototype,{isMatrix4:!0,set:function(e,t,n,r,i,o,a,s,c,l,u,h,d,p,f,m){var g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=o,g[9]=a,g[13]=s,g[2]=c,g[6]=l,g[10]=u,g[14]=h,g[3]=d,g[7]=p,g[11]=f,g[15]=m,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return(new y).fromArray(this.elements)},copy:function(e){var t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this},copyPosition:function(e){var t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this},extractBasis:function(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this},extractRotation:(p=new b,function(e){var t=this.elements,n=e.elements,r=1/p.setFromMatrixColumn(e,0).length(),i=1/p.setFromMatrixColumn(e,1).length(),o=1/p.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[8]=n[8]*o,t[9]=n[9]*o,t[10]=n[10]*o,this}),makeRotationFromEuler:function(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var t=this.elements,n=e.x,r=e.y,i=e.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),c=Math.sin(r),l=Math.cos(i),u=Math.sin(i);if("XYZ"===e.order){var h=o*l,d=o*u,p=a*l,f=a*u;t[0]=s*l,t[4]=-s*u,t[8]=c,t[1]=d+p*c,t[5]=h-f*c,t[9]=-a*s,t[2]=f-h*c,t[6]=p+d*c,t[10]=o*s}else if("YXZ"===e.order){var m=s*l,g=s*u,y=c*l,v=c*u;t[0]=m+v*a,t[4]=y*a-g,t[8]=o*c,t[1]=o*u,t[5]=o*l,t[9]=-a,t[2]=g*a-y,t[6]=v+m*a,t[10]=o*s}else if("ZXY"===e.order){m=s*l,g=s*u,y=c*l,v=c*u;t[0]=m-v*a,t[4]=-o*u,t[8]=y+g*a,t[1]=g+y*a,t[5]=o*l,t[9]=v-m*a,t[2]=-o*c,t[6]=a,t[10]=o*s}else if("ZYX"===e.order){h=o*l,d=o*u,p=a*l,f=a*u;t[0]=s*l,t[4]=p*c-d,t[8]=h*c+f,t[1]=s*u,t[5]=f*c+h,t[9]=d*c-p,t[2]=-c,t[6]=a*s,t[10]=o*s}else if("YZX"===e.order){var b=o*s,_=o*c,w=a*s,E=a*c;t[0]=s*l,t[4]=E-b*u,t[8]=w*u+_,t[1]=u,t[5]=o*l,t[9]=-a*l,t[2]=-c*l,t[6]=_*u+w,t[10]=b-E*u}else if("XZY"===e.order){b=o*s,_=o*c,w=a*s,E=a*c;t[0]=s*l,t[4]=-u,t[8]=c*l,t[1]=b*u+E,t[5]=o*l,t[9]=_*u-w,t[2]=w*u-_,t[6]=a*l,t[10]=E*u+b}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},makeRotationFromQuaternion:function(e){var t=this.elements,n=e._x,r=e._y,i=e._z,o=e._w,a=n+n,s=r+r,c=i+i,l=n*a,u=n*s,h=n*c,d=r*s,p=r*c,f=i*c,m=o*a,g=o*s,y=o*c;return t[0]=1-(d+f),t[4]=u-y,t[8]=h+g,t[1]=u+y,t[5]=1-(l+f),t[9]=p-m,t[2]=h-g,t[6]=p+m,t[10]=1-(l+d),t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},lookAt:(u=new b,h=new b,d=new b,function(e,t,n){var r=this.elements;return d.subVectors(e,t),0===d.lengthSq()&&(d.z=1),d.normalize(),u.crossVectors(n,d),0===u.lengthSq()&&(1===Math.abs(n.z)?d.x+=1e-4:d.z+=1e-4,d.normalize(),u.crossVectors(n,d)),u.normalize(),h.crossVectors(d,u),r[0]=u.x,r[4]=h.x,r[8]=d.x,r[1]=u.y,r[5]=h.y,r[9]=d.y,r[2]=u.z,r[6]=h.z,r[10]=d.z,this}),multiply:function(e,t){return void 0!==t?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)},premultiply:function(e){return this.multiplyMatrices(e,this)},multiplyMatrices:function(e,t){var n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[4],s=n[8],c=n[12],l=n[1],u=n[5],h=n[9],d=n[13],p=n[2],f=n[6],m=n[10],g=n[14],y=n[3],v=n[7],b=n[11],_=n[15],w=r[0],E=r[4],A=r[8],x=r[12],S=r[1],T=r[5],M=r[9],R=r[13],C=r[2],k=r[6],I=r[10],P=r[14],O=r[3],N=r[7],D=r[11],L=r[15];return i[0]=o*w+a*S+s*C+c*O,i[4]=o*E+a*T+s*k+c*N,i[8]=o*A+a*M+s*I+c*D,i[12]=o*x+a*R+s*P+c*L,i[1]=l*w+u*S+h*C+d*O,i[5]=l*E+u*T+h*k+d*N,i[9]=l*A+u*M+h*I+d*D,i[13]=l*x+u*R+h*P+d*L,i[2]=p*w+f*S+m*C+g*O,i[6]=p*E+f*T+m*k+g*N,i[10]=p*A+f*M+m*I+g*D,i[14]=p*x+f*R+m*P+g*L,i[3]=y*w+v*S+b*C+_*O,i[7]=y*E+v*T+b*k+_*N,i[11]=y*A+v*M+b*I+_*D,i[15]=y*x+v*R+b*P+_*L,this},multiplyScalar:function(e){var t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this},applyToBufferAttribute:function(){var e=new b;return function(t){for(var n=0,r=t.count;n<r;n++)e.x=t.getX(n),e.y=t.getY(n),e.z=t.getZ(n),e.applyMatrix4(this),t.setXYZ(n,e.x,e.y,e.z);return t}}(),determinant:function(){var e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],o=e[1],a=e[5],s=e[9],c=e[13],l=e[2],u=e[6],h=e[10],d=e[14];return e[3]*(+i*s*u-r*c*u-i*a*h+n*c*h+r*a*d-n*s*d)+e[7]*(+t*s*d-t*c*h+i*o*h-r*o*d+r*c*l-i*s*l)+e[11]*(+t*c*u-t*a*d-i*o*u+n*o*d+i*a*l-n*c*l)+e[15]*(-r*a*l-t*s*u+t*a*h+r*o*u-n*o*h+n*s*l)},transpose:function(){var e,t=this.elements;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this},setPosition:function(e){var t=this.elements;return t[12]=e.x,t[13]=e.y,t[14]=e.z,this},getInverse:function(e,t){var n=this.elements,r=e.elements,i=r[0],o=r[1],a=r[2],s=r[3],c=r[4],l=r[5],u=r[6],h=r[7],d=r[8],p=r[9],f=r[10],m=r[11],g=r[12],y=r[13],v=r[14],b=r[15],_=p*v*h-y*f*h+y*u*m-l*v*m-p*u*b+l*f*b,w=g*f*h-d*v*h-g*u*m+c*v*m+d*u*b-c*f*b,E=d*y*h-g*p*h+g*l*m-c*y*m-d*l*b+c*p*b,A=g*p*u-d*y*u-g*l*f+c*y*f+d*l*v-c*p*v,x=i*_+o*w+a*E+s*A;if(0===x){var S="THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0";if(!0===t)throw new Error(S);return console.warn(S),this.identity()}var T=1/x;return n[0]=_*T,n[1]=(y*f*s-p*v*s-y*a*m+o*v*m+p*a*b-o*f*b)*T,n[2]=(l*v*s-y*u*s+y*a*h-o*v*h-l*a*b+o*u*b)*T,n[3]=(p*u*s-l*f*s-p*a*h+o*f*h+l*a*m-o*u*m)*T,n[4]=w*T,n[5]=(d*v*s-g*f*s+g*a*m-i*v*m-d*a*b+i*f*b)*T,n[6]=(g*u*s-c*v*s-g*a*h+i*v*h+c*a*b-i*u*b)*T,n[7]=(c*f*s-d*u*s+d*a*h-i*f*h-c*a*m+i*u*m)*T,n[8]=E*T,n[9]=(g*p*s-d*y*s-g*o*m+i*y*m+d*o*b-i*p*b)*T,n[10]=(c*y*s-g*l*s+g*o*h-i*y*h-c*o*b+i*l*b)*T,n[11]=(d*l*s-c*p*s-d*o*h+i*p*h+c*o*m-i*l*m)*T,n[12]=A*T,n[13]=(d*y*a-g*p*a+g*o*f-i*y*f-d*o*v+i*p*v)*T,n[14]=(g*l*a-c*y*a-g*o*u+i*y*u+c*o*v-i*l*v)*T,n[15]=(c*p*a-d*l*a+d*o*u-i*p*u-c*o*f+i*l*f)*T,this},scale:function(e){var t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this},getMaxScaleOnAxis:function(){var e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))},makeTranslation:function(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this},makeRotationX:function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this},makeRotationY:function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this},makeRotationZ:function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(e,t){var n=Math.cos(t),r=Math.sin(t),i=1-n,o=e.x,a=e.y,s=e.z,c=i*o,l=i*a;return this.set(c*o+n,c*a-r*s,c*s+r*a,0,c*a+r*s,l*a+n,l*s-r*o,0,c*s-r*a,l*s+r*o,i*s*s+n,0,0,0,0,1),this},makeScale:function(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(e,t,n){return this.set(1,t,n,0,e,1,n,0,e,t,1,0,0,0,0,1),this},compose:function(e,t,n){return this.makeRotationFromQuaternion(t),this.scale(n),this.setPosition(e),this},decompose:(c=new b,l=new y,function(e,t,n){var r=this.elements,i=c.set(r[0],r[1],r[2]).length(),o=c.set(r[4],r[5],r[6]).length(),a=c.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],l.copy(this);var s=1/i,u=1/o,h=1/a;return l.elements[0]*=s,l.elements[1]*=s,l.elements[2]*=s,l.elements[4]*=u,l.elements[5]*=u,l.elements[6]*=u,l.elements[8]*=h,l.elements[9]*=h,l.elements[10]*=h,t.setFromRotationMatrix(l),n.x=i,n.y=o,n.z=a,this}),makePerspective:function(e,t,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var a=this.elements,s=2*i/(t-e),c=2*i/(n-r),l=(t+e)/(t-e),u=(n+r)/(n-r),h=-(o+i)/(o-i),d=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=l,a[12]=0,a[1]=0,a[5]=c,a[9]=u,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=d,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makeOrthographic:function(e,t,n,r,i,o){var a=this.elements,s=1/(t-e),c=1/(n-r),l=1/(o-i),u=(t+e)*s,h=(n+r)*c,d=(o+i)*l;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-u,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*l,a[14]=-d,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(e){for(var t=this.elements,n=e.elements,r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0},fromArray:function(e,t){void 0===t&&(t=0);for(var n=0;n<16;n++)this.elements[n]=e[n+t];return this},toArray:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}),Object.assign(v,{slerp:function(e,t,n,r){return n.copy(e).slerp(t,r)},slerpFlat:function(e,t,n,r,i,o,a){var s=n[r+0],c=n[r+1],l=n[r+2],u=n[r+3],h=i[o+0],d=i[o+1],p=i[o+2],f=i[o+3];if(u!==f||s!==h||c!==d||l!==p){var m=1-a,g=s*h+c*d+l*p+u*f,y=g>=0?1:-1,v=1-g*g;if(v>Number.EPSILON){var b=Math.sqrt(v),_=Math.atan2(b,g*y);m=Math.sin(m*_)/b,a=Math.sin(a*_)/b}var w=a*y;if(s=s*m+h*w,c=c*m+d*w,l=l*m+p*w,u=u*m+f*w,m===1-a){var E=1/Math.sqrt(s*s+c*c+l*l+u*u);s*=E,c*=E,l*=E,u*=E}}e[t]=s,e[t+1]=c,e[t+2]=l,e[t+3]=u}}),Object.defineProperties(v.prototype,{x:{get:function(){return this._x},set:function(e){this._x=e,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(e){this._y=e,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(e){this._z=e,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(e){this._w=e,this.onChangeCallback()}}}),Object.assign(v.prototype,{set:function(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this.onChangeCallback(),this},setFromEuler:function(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=e._x,r=e._y,i=e._z,o=e.order,a=Math.cos,s=Math.sin,c=a(n/2),l=a(r/2),u=a(i/2),h=s(n/2),d=s(r/2),p=s(i/2);return"XYZ"===o?(this._x=h*l*u+c*d*p,this._y=c*d*u-h*l*p,this._z=c*l*p+h*d*u,this._w=c*l*u-h*d*p):"YXZ"===o?(this._x=h*l*u+c*d*p,this._y=c*d*u-h*l*p,this._z=c*l*p-h*d*u,this._w=c*l*u+h*d*p):"ZXY"===o?(this._x=h*l*u-c*d*p,this._y=c*d*u+h*l*p,this._z=c*l*p+h*d*u,this._w=c*l*u-h*d*p):"ZYX"===o?(this._x=h*l*u-c*d*p,this._y=c*d*u+h*l*p,this._z=c*l*p-h*d*u,this._w=c*l*u+h*d*p):"YZX"===o?(this._x=h*l*u+c*d*p,this._y=c*d*u+h*l*p,this._z=c*l*p-h*d*u,this._w=c*l*u-h*d*p):"XZY"===o&&(this._x=h*l*u-c*d*p,this._y=c*d*u-h*l*p,this._z=c*l*p+h*d*u,this._w=c*l*u+h*d*p),!1!==t&&this.onChangeCallback(),this},setFromAxisAngle:function(e,t){var n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this.onChangeCallback(),this},setFromRotationMatrix:function(e){var t,n=e.elements,r=n[0],i=n[4],o=n[8],a=n[1],s=n[5],c=n[9],l=n[2],u=n[6],h=n[10],d=r+s+h;return d>0?(t=.5/Math.sqrt(d+1),this._w=.25/t,this._x=(u-c)*t,this._y=(o-l)*t,this._z=(a-i)*t):r>s&&r>h?(t=2*Math.sqrt(1+r-s-h),this._w=(u-c)/t,this._x=.25*t,this._y=(i+a)/t,this._z=(o+l)/t):s>h?(t=2*Math.sqrt(1+s-r-h),this._w=(o-l)/t,this._x=(i+a)/t,this._y=.25*t,this._z=(c+u)/t):(t=2*Math.sqrt(1+h-r-s),this._w=(a-i)/t,this._x=(o+l)/t,this._y=(c+u)/t,this._z=.25*t),this.onChangeCallback(),this},setFromUnitVectors:function(){var e,t=new b;return function(n,r){return void 0===t&&(t=new b),(e=n.dot(r)+1)<1e-6?(e=0,Math.abs(n.x)>Math.abs(n.z)?t.set(-n.y,n.x,0):t.set(0,-n.z,n.y)):t.crossVectors(n,r),this._x=t.x,this._y=t.y,this._z=t.z,this._w=e,this.normalize()}}(),inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this.onChangeCallback(),this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)},premultiply:function(e){return this.multiplyQuaternions(e,this)},multiplyQuaternions:function(e,t){var n=e._x,r=e._y,i=e._z,o=e._w,a=t._x,s=t._y,c=t._z,l=t._w;return this._x=n*l+o*a+r*c-i*s,this._y=r*l+o*s+i*a-n*c,this._z=i*l+o*c+n*s-r*a,this._w=o*l-n*a-r*s-i*c,this.onChangeCallback(),this},slerp:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var n=this._x,r=this._y,i=this._z,o=this._w,a=o*e._w+n*e._x+r*e._y+i*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;var s=Math.sqrt(1-a*a);if(Math.abs(s)<.001)return this._w=.5*(o+this._w),this._x=.5*(n+this._x),this._y=.5*(r+this._y),this._z=.5*(i+this._z),this;var c=Math.atan2(s,a),l=Math.sin((1-t)*c)/s,u=Math.sin(t*c)/s;return this._w=o*l+this._w*u,this._x=n*l+this._x*u,this._y=r*l+this._y*u,this._z=i*l+this._z*u,this.onChangeCallback(),this},equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w},fromArray:function(e,t){return void 0===t&&(t=0),this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this.onChangeCallback(),this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e},onChange:function(e){return this.onChangeCallback=e,this},onChangeCallback:function(){}}),Object.assign(b.prototype,{isVector3:!0,set:function(e,t,n){return this.x=e,this.y=t,this.z=n,this},setScalar:function(e){return this.x=e,this.y=e,this.z=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)},multiplyScalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this},multiplyVectors:function(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this},applyEuler:(f=new v,function(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(f.setFromEuler(e))}),applyAxisAngle:function(){var e=new v;return function(t,n){return this.applyQuaternion(e.setFromAxisAngle(t,n))}}(),applyMatrix3:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this},applyMatrix4:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements,o=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*o,this},applyQuaternion:function(e){var t=this.x,n=this.y,r=this.z,i=e.x,o=e.y,a=e.z,s=e.w,c=s*t+o*r-a*n,l=s*n+a*t-i*r,u=s*r+i*n-o*t,h=-i*t-o*n-a*r;return this.x=c*s+h*-i+l*-a-u*-o,this.y=l*s+h*-o+u*-i-c*-a,this.z=u*s+h*-a+c*-o-l*-i,this},project:function(){var e=new y;return function(t){return e.multiplyMatrices(t.projectionMatrix,e.getInverse(t.matrixWorld)),this.applyMatrix4(e)}}(),unproject:function(){var e=new y;return function(t){return e.multiplyMatrices(t.matrixWorld,e.getInverse(t.projectionMatrix)),this.applyMatrix4(e)}}(),transformDirection:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()},divide:function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this},divideScalar:function(e){return this.multiplyScalar(1/e)},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this},clampScalar:function(){var e=new b,t=new b;return function(n,r){return e.set(n,n,n),t.set(r,r,r),this.clamp(e,t)}}(),clampLength:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this},lerpVectors:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},cross:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)},crossVectors:function(e,t){var n=e.x,r=e.y,i=e.z,o=t.x,a=t.y,s=t.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this},projectOnVector:function(e){var t=e.dot(this)/e.lengthSq();return this.copy(e).multiplyScalar(t)},projectOnPlane:function(){var e=new b;return function(t){return e.copy(this).projectOnVector(t),this.sub(e)}}(),reflect:function(){var e=new b;return function(t){return this.sub(e.copy(t).multiplyScalar(2*this.dot(t)))}}(),angleTo:function(e){var t=this.dot(e)/Math.sqrt(this.lengthSq()*e.lengthSq());return Math.acos(m.clamp(t,-1,1))},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r},manhattanDistanceTo:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)},setFromSpherical:function(e){var t=Math.sin(e.phi)*e.radius;return this.x=t*Math.sin(e.theta),this.y=Math.cos(e.phi)*e.radius,this.z=t*Math.cos(e.theta),this},setFromCylindrical:function(e){return this.x=e.radius*Math.sin(e.theta),this.y=e.y,this.z=e.radius*Math.cos(e.theta),this},setFromMatrixPosition:function(e){var t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this},setFromMatrixScale:function(e){var t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this},setFromMatrixColumn:function(e,t){return this.fromArray(e.elements,4*t)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e},fromBufferAttribute:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}}),Object.assign(_.prototype,{isMatrix3:!0,set:function(e,t,n,r,i,o,a,s,c){var l=this.elements;return l[0]=e,l[1]=r,l[2]=a,l[3]=t,l[4]=i,l[5]=s,l[6]=n,l[7]=o,l[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(e){var t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this},setFromMatrix4:function(e){var t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this},applyToBufferAttribute:function(){var e=new b;return function(t){for(var n=0,r=t.count;n<r;n++)e.x=t.getX(n),e.y=t.getY(n),e.z=t.getZ(n),e.applyMatrix3(this),t.setXYZ(n,e.x,e.y,e.z);return t}}(),multiply:function(e){return this.multiplyMatrices(this,e)},premultiply:function(e){return this.multiplyMatrices(e,this)},multiplyMatrices:function(e,t){var n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[3],s=n[6],c=n[1],l=n[4],u=n[7],h=n[2],d=n[5],p=n[8],f=r[0],m=r[3],g=r[6],y=r[1],v=r[4],b=r[7],_=r[2],w=r[5],E=r[8];return i[0]=o*f+a*y+s*_,i[3]=o*m+a*v+s*w,i[6]=o*g+a*b+s*E,i[1]=c*f+l*y+u*_,i[4]=c*m+l*v+u*w,i[7]=c*g+l*b+u*E,i[2]=h*f+d*y+p*_,i[5]=h*m+d*v+p*w,i[8]=h*g+d*b+p*E,this},multiplyScalar:function(e){var t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this},determinant:function(){var e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],c=e[7],l=e[8];return t*o*l-t*a*c-n*i*l+n*a*s+r*i*c-r*o*s},getInverse:function(e,t){e&&e.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var n=e.elements,r=this.elements,i=n[0],o=n[1],a=n[2],s=n[3],c=n[4],l=n[5],u=n[6],h=n[7],d=n[8],p=d*c-l*h,f=l*u-d*s,m=h*s-c*u,g=i*p+o*f+a*m;if(0===g){var y="THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0";if(!0===t)throw new Error(y);return console.warn(y),this.identity()}var v=1/g;return r[0]=p*v,r[1]=(a*h-d*o)*v,r[2]=(l*o-a*c)*v,r[3]=f*v,r[4]=(d*i-a*u)*v,r[5]=(a*s-l*i)*v,r[6]=m*v,r[7]=(o*u-h*i)*v,r[8]=(c*i-o*s)*v,this},transpose:function(){var e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this},getNormalMatrix:function(e){return this.setFromMatrix4(e).getInverse(this).transpose()},transposeIntoArray:function(e){var t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this},setUvTransform:function(e,t,n,r,i,o,a){var s=Math.cos(i),c=Math.sin(i);this.set(n*s,n*c,-n*(s*o+c*a)+o+e,-r*c,r*s,-r*(-c*o+s*a)+a+t,0,0,1)},scale:function(e,t){var n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=t,n[4]*=t,n[7]*=t,this},rotate:function(e){var t=Math.cos(e),n=Math.sin(e),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],c=r[4],l=r[7];return r[0]=t*i+n*s,r[3]=t*o+n*c,r[6]=t*a+n*l,r[1]=-n*i+t*s,r[4]=-n*o+t*c,r[7]=-n*a+t*l,this},translate:function(e,t){var n=this.elements;return n[0]+=e*n[2],n[3]+=e*n[5],n[6]+=e*n[8],n[1]+=t*n[2],n[4]+=t*n[5],n[7]+=t*n[8],this},equals:function(e){for(var t=this.elements,n=e.elements,r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0},fromArray:function(e,t){void 0===t&&(t=0);for(var n=0;n<9;n++)this.elements[n]=e[n+t];return this},toArray:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}});var w=0;function E(e,t,n,r,i,o,a,s,c,l){Object.defineProperty(this,"id",{value:w++}),this.uuid=m.generateUUID(),this.name="",this.image=void 0!==e?e:E.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==t?t:E.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:1001,this.wrapT=void 0!==r?r:1001,this.magFilter=void 0!==i?i:1006,this.minFilter=void 0!==o?o:1008,this.anisotropy=void 0!==c?c:1,this.format=void 0!==a?a:1023,this.type=void 0!==s?s:1009,this.offset=new g(0,0),this.repeat=new g(1,1),this.center=new g(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new _,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==l?l:3e3,this.version=0,this.onUpdate=null}function A(e,t,n,r){this.x=e||0,this.y=t||0,this.z=n||0,this.w=void 0!==r?r:1}function x(e,t,n){this.uuid=m.generateUUID(),this.width=e,this.height=t,this.scissor=new A(0,0,e,t),this.scissorTest=!1,this.viewport=new A(0,0,e,t),void 0===(n=n||{}).minFilter&&(n.minFilter=1006),this.texture=new E(void 0,void 0,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0===n.stencilBuffer||n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}function S(e,t,n){x.call(this,e,t,n),this.activeCubeFace=0,this.activeMipMapLevel=0}function T(e,t,n,r,i,o,a,s,c,l,u,h){E.call(this,null,o,a,s,c,l,r,i,u,h),this.image={data:e,width:t,height:n},this.magFilter=void 0!==c?c:1003,this.minFilter=void 0!==l?l:1003,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function M(e,t,n,r,i,o,a,s,c,l){e=void 0!==e?e:[],t=void 0!==t?t:301,E.call(this,e,t,n,r,i,o,a,s,c,l),this.flipY=!1}E.DEFAULT_IMAGE=void 0,E.DEFAULT_MAPPING=300,E.prototype=Object.assign(Object.create(o.prototype),{constructor:E,isTexture:!0,clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.name=e.name,this.image=e.image,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this},toJSON:function(e){var t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var r=this.image;void 0===r.uuid&&(r.uuid=m.generateUUID()),t||void 0!==e.images[r.uuid]||(e.images[r.uuid]={uuid:r.uuid,url:function(e){var t;if(e instanceof HTMLCanvasElement)t=e;else{(t=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")).width=e.width,t.height=e.height;var n=t.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height)}return t.width>2048||t.height>2048?t.toDataURL("image/jpeg",.6):t.toDataURL("image/png")}(r)}),n.image=r.uuid}return t||(e.textures[this.uuid]=n),n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(e){if(300===this.mapping){if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case 1e3:e.x=e.x-Math.floor(e.x);break;case 1001:e.x=e.x<0?0:1;break;case 1002:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case 1e3:e.y=e.y-Math.floor(e.y);break;case 1001:e.y=e.y<0?0:1;break;case 1002:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}this.flipY&&(e.y=1-e.y)}}}),Object.defineProperty(E.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(A.prototype,{isVector4:!0,set:function(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this},setScalar:function(e){return this.x=e,this.y=e,this.z=e,this.w=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setW:function(e){return this.w=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this},multiplyScalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},applyMatrix4:function(e){var t=this.x,n=this.y,r=this.z,i=this.w,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*t+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*t+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*t+o[7]*n+o[11]*r+o[15]*i,this},divideScalar:function(e){return this.multiplyScalar(1/e)},setAxisAngleFromQuaternion:function(e){this.w=2*Math.acos(e.w);var t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this},setAxisAngleFromRotationMatrix:function(e){var t,n,r,i,o=e.elements,a=o[0],s=o[4],c=o[8],l=o[1],u=o[5],h=o[9],d=o[2],p=o[6],f=o[10];if(Math.abs(s-l)<.01&&Math.abs(c-d)<.01&&Math.abs(h-p)<.01){if(Math.abs(s+l)<.1&&Math.abs(c+d)<.1&&Math.abs(h+p)<.1&&Math.abs(a+u+f-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;var m=(a+1)/2,g=(u+1)/2,y=(f+1)/2,v=(s+l)/4,b=(c+d)/4,_=(h+p)/4;return m>g&&m>y?m<.01?(n=0,r=.707106781,i=.707106781):(r=v/(n=Math.sqrt(m)),i=b/n):g>y?g<.01?(n=.707106781,r=0,i=.707106781):(n=v/(r=Math.sqrt(g)),i=_/r):y<.01?(n=.707106781,r=.707106781,i=0):(n=b/(i=Math.sqrt(y)),r=_/i),this.set(n,r,i,t),this}var w=Math.sqrt((p-h)*(p-h)+(c-d)*(c-d)+(l-s)*(l-s));return Math.abs(w)<.001&&(w=1),this.x=(p-h)/w,this.y=(c-d)/w,this.z=(l-s)/w,this.w=Math.acos((a+u+f-1)/2),this},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this},clampScalar:function(){var e,t;return function(n,r){return void 0===e&&(e=new A,t=new A),e.set(n,n,n,n),t.set(r,r,r,r),this.clamp(e,t)}}(),clampLength:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this},lerpVectors:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e},fromBufferAttribute:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}}),x.prototype=Object.assign(Object.create(o.prototype),{constructor:x,isWebGLRenderTarget:!0,setSize:function(e,t){this.width===e&&this.height===t||(this.width=e,this.height=t,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.width=e.width,this.height=e.height,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),S.prototype=Object.create(x.prototype),S.prototype.constructor=S,S.prototype.isWebGLRenderTargetCube=!0,T.prototype=Object.create(E.prototype),T.prototype.constructor=T,T.prototype.isDataTexture=!0,M.prototype=Object.create(E.prototype),M.prototype.constructor=M,M.prototype.isCubeTexture=!0,Object.defineProperty(M.prototype,"images",{get:function(){return this.image},set:function(e){this.image=e}});var R=new E,C=new M;function k(){this.seq=[],this.map={}}var I=[],P=[],O=new Float32Array(16),N=new Float32Array(9);function D(e,t,n){var r=e[0];if(r<=0||r>0)return e;var i=t*n,o=I[i];if(void 0===o&&(o=new Float32Array(i),I[i]=o),0!==t){r.toArray(o,0);for(var a=1,s=0;a!==t;++a)s+=n,e[a].toArray(o,s)}return o}function L(e,t){var n=P[t];void 0===n&&(n=new Int32Array(t),P[t]=n);for(var r=0;r!==t;++r)n[r]=e.allocTextureUnit();return n}function F(e,t){e.uniform1f(this.addr,t)}function j(e,t){e.uniform1i(this.addr,t)}function U(e,t){void 0===t.x?e.uniform2fv(this.addr,t):e.uniform2f(this.addr,t.x,t.y)}function B(e,t){void 0!==t.x?e.uniform3f(this.addr,t.x,t.y,t.z):void 0!==t.r?e.uniform3f(this.addr,t.r,t.g,t.b):e.uniform3fv(this.addr,t)}function V(e,t){void 0===t.x?e.uniform4fv(this.addr,t):e.uniform4f(this.addr,t.x,t.y,t.z,t.w)}function H(e,t){e.uniformMatrix2fv(this.addr,!1,t.elements||t)}function z(e,t){void 0===t.elements?e.uniformMatrix3fv(this.addr,!1,t):(N.set(t.elements),e.uniformMatrix3fv(this.addr,!1,N))}function q(e,t){void 0===t.elements?e.uniformMatrix4fv(this.addr,!1,t):(O.set(t.elements),e.uniformMatrix4fv(this.addr,!1,O))}function G(e,t,n){var r=n.allocTextureUnit();e.uniform1i(this.addr,r),n.setTexture2D(t||R,r)}function W(e,t,n){var r=n.allocTextureUnit();e.uniform1i(this.addr,r),n.setTextureCube(t||C,r)}function J(e,t){e.uniform2iv(this.addr,t)}function Z(e,t){e.uniform3iv(this.addr,t)}function Y(e,t){e.uniform4iv(this.addr,t)}function X(e,t){e.uniform1fv(this.addr,t)}function Q(e,t){e.uniform1iv(this.addr,t)}function K(e,t){e.uniform2fv(this.addr,D(t,this.size,2))}function $(e,t){e.uniform3fv(this.addr,D(t,this.size,3))}function ee(e,t){e.uniform4fv(this.addr,D(t,this.size,4))}function te(e,t){e.uniformMatrix2fv(this.addr,!1,D(t,this.size,4))}function ne(e,t){e.uniformMatrix3fv(this.addr,!1,D(t,this.size,9))}function re(e,t){e.uniformMatrix4fv(this.addr,!1,D(t,this.size,16))}function ie(e,t,n){var r=t.length,i=L(n,r);e.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTexture2D(t[o]||R,i[o])}function oe(e,t,n){var r=t.length,i=L(n,r);e.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTextureCube(t[o]||C,i[o])}function ae(e,t,n){this.id=e,this.addr=n,this.setValue=function(e){switch(e){case 5126:return F;case 35664:return U;case 35665:return B;case 35666:return V;case 35674:return H;case 35675:return z;case 35676:return q;case 35678:case 36198:return G;case 35680:return W;case 5124:case 35670:return j;case 35667:case 35671:return J;case 35668:case 35672:return Z;case 35669:case 35673:return Y}}(t.type)}function se(e,t,n){this.id=e,this.addr=n,this.size=t.size,this.setValue=function(e){switch(e){case 5126:return X;case 35664:return K;case 35665:return $;case 35666:return ee;case 35674:return te;case 35675:return ne;case 35676:return re;case 35678:return ie;case 35680:return oe;case 5124:case 35670:return Q;case 35667:case 35671:return J;case 35668:case 35672:return Z;case 35669:case 35673:return Y}}(t.type)}function ce(e){this.id=e,k.call(this)}ce.prototype.setValue=function(e,t){for(var n=this.seq,r=0,i=n.length;r!==i;++r){var o=n[r];o.setValue(e,t[o.id])}};var le=/([\w\d_]+)(\])?(\[|\.)?/g;function ue(e,t){e.seq.push(t),e.map[t.id]=t}function he(e,t,n){var r=e.name,i=r.length;for(le.lastIndex=0;;){var o=le.exec(r),a=le.lastIndex,s=o[1],c="]"===o[2],l=o[3];if(c&&(s|=0),void 0===l||"["===l&&a+2===i){ue(n,void 0===l?new ae(s,e,t):new se(s,e,t));break}var u=n.map[s];void 0===u&&ue(n,u=new ce(s)),n=u}}function de(e,t,n){k.call(this),this.renderer=n;for(var r=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),i=0;i<r;++i){var o=e.getActiveUniform(t,i),a=o.name;he(o,e.getUniformLocation(t,a),this)}}de.prototype.setValue=function(e,t,n){var r=this.map[t];void 0!==r&&r.setValue(e,n,this.renderer)},de.prototype.setOptional=function(e,t,n){var r=t[n];void 0!==r&&this.setValue(e,n,r)},de.upload=function(e,t,n,r){for(var i=0,o=t.length;i!==o;++i){var a=t[i],s=n[a.id];!1!==s.needsUpdate&&a.setValue(e,s.value,r)}},de.seqWithValue=function(e,t){for(var n=[],r=0,i=e.length;r!==i;++r){var o=e[r];o.id in t&&n.push(o)}return n};var pe={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function fe(e,t,n){return void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}Object.assign(fe.prototype,{isColor:!0,r:1,g:1,b:1,set:function(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this},setScalar:function(e){return this.r=e,this.g=e,this.b=e,this},setHex:function(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this},setRGB:function(e,t,n){return this.r=e,this.g=t,this.b=n,this},setHSL:function(){function e(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}return function(t,n,r){if(t=m.euclideanModulo(t,1),n=m.clamp(n,0,1),r=m.clamp(r,0,1),0===n)this.r=this.g=this.b=r;else{var i=r<=.5?r*(1+n):r+n-r*n,o=2*r-i;this.r=e(o,i,t+1/3),this.g=e(o,i,t),this.b=e(o,i,t-1/3)}return this}}(),setStyle:function(e){function t(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(e)){var r,i=n[1],o=n[2];switch(i){case"rgb":case"rgba":if(r=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,t(r[5]),this;if(r=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,t(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o)){var a=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,c=parseInt(r[3],10)/100;return t(r[5]),this.setHSL(a,s,c)}}}else if(n=/^\#([A-Fa-f0-9]+)$/.exec(e)){var l,u=(l=n[1]).length;if(3===u)return this.r=parseInt(l.charAt(0)+l.charAt(0),16)/255,this.g=parseInt(l.charAt(1)+l.charAt(1),16)/255,this.b=parseInt(l.charAt(2)+l.charAt(2),16)/255,this;if(6===u)return this.r=parseInt(l.charAt(0)+l.charAt(1),16)/255,this.g=parseInt(l.charAt(2)+l.charAt(3),16)/255,this.b=parseInt(l.charAt(4)+l.charAt(5),16)/255,this}e&&e.length>0&&(void 0!==(l=pe[e])?this.setHex(l):console.warn("THREE.Color: Unknown color "+e));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(e){return this.r=e.r,this.g=e.g,this.b=e.b,this},copyGammaToLinear:function(e,t){return void 0===t&&(t=2),this.r=Math.pow(e.r,t),this.g=Math.pow(e.g,t),this.b=Math.pow(e.b,t),this},copyLinearToGamma:function(e,t){void 0===t&&(t=2);var n=t>0?1/t:1;return this.r=Math.pow(e.r,n),this.g=Math.pow(e.g,n),this.b=Math.pow(e.b,n),this},convertGammaToLinear:function(){var e=this.r,t=this.g,n=this.b;return this.r=e*e,this.g=t*t,this.b=n*n,this},convertLinearToGamma:function(){return this.r=Math.sqrt(this.r),this.g=Math.sqrt(this.g),this.b=Math.sqrt(this.b),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(e){var t,n,r=e||{h:0,s:0,l:0},i=this.r,o=this.g,a=this.b,s=Math.max(i,o,a),c=Math.min(i,o,a),l=(c+s)/2;if(c===s)t=0,n=0;else{var u=s-c;switch(n=l<=.5?u/(s+c):u/(2-s-c),s){case i:t=(o-a)/u+(o<a?6:0);break;case o:t=(a-i)/u+2;break;case a:t=(i-o)/u+4}t/=6}return r.h=t,r.s=n,r.l=l,r},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(e,t,n){var r=this.getHSL();return r.h+=e,r.s+=t,r.l+=n,this.setHSL(r.h,r.s,r.l),this},add:function(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this},addColors:function(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this},addScalar:function(e){return this.r+=e,this.g+=e,this.b+=e,this},sub:function(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this},multiply:function(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this},multiplyScalar:function(e){return this.r*=e,this.g*=e,this.b*=e,this},lerp:function(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this},equals:function(e){return e.r===this.r&&e.g===this.g&&e.b===this.b},fromArray:function(e,t){return void 0===t&&(t=0),this.r=e[t],this.g=e[t+1],this.b=e[t+2],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e},toJSON:function(){return this.getHex()}});var me={common:{diffuse:{value:new fe(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new _},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new g(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new fe(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new fe(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new _}}},ge={merge:function(e){for(var t={},n=0;n<e.length;n++){var r=this.clone(e[n]);for(var i in r)t[i]=r[i]}return t},clone:function(e){var t={};for(var n in e)for(var r in t[n]={},e[n]){var i=e[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?t[n][r]=i.clone():Array.isArray(i)?t[n][r]=i.slice():t[n][r]=i}return t}},ye={alphamap_fragment:"#ifdef USE_ALPHAMAP\r\n\r\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\r\n\r\n#endif\r\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\r\n\r\n\tuniform sampler2D alphaMap;\r\n\r\n#endif\r\n",alphatest_fragment:"#ifdef ALPHATEST\r\n\r\n\tif ( diffuseColor.a < ALPHATEST ) discard;\r\n\r\n#endif\r\n",aomap_fragment:"#ifdef USE_AOMAP\r\n\r\n\t// reads channel R, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\r\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\r\n\r\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\r\n\r\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\r\n\r\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\r\n\r\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\r\n\r\n\t#endif\r\n\r\n#endif\r\n",aomap_pars_fragment:"#ifdef USE_AOMAP\r\n\r\n\tuniform sampler2D aoMap;\r\n\tuniform float aoMapIntensity;\r\n\r\n#endif",begin_vertex:"\r\nvec3 transformed = vec3( position );\r\n",beginnormal_vertex:"\r\nvec3 objectNormal = vec3( normal );\r\n",bsdfs:'float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\r\n\r\n\tif( decayExponent > 0.0 ) {\r\n\r\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\r\n\r\n\t\t// based upon Frostbite 3 Moving to Physically-based Rendering\r\n\t\t// page 32, equation 26: E[window1]\r\n\t\t// https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\r\n\t\t// this is intended to be used on spot and point lights who are represented as luminous intensity\r\n\t\t// but who must be converted to luminous irradiance for surface lighting calculation\r\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\r\n\t\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\r\n\t\treturn distanceFalloff * maxDistanceCutoffFactor;\r\n\r\n#else\r\n\r\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\r\n\r\n#endif\r\n\r\n\t}\r\n\r\n\treturn 1.0;\r\n\r\n}\r\n\r\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\r\n\r\n\treturn RECIPROCAL_PI * diffuseColor;\r\n\r\n} // validated\r\n\r\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\r\n\r\n\t// Original approximation by Christophe Schlick \'94\r\n\t// float fresnel = pow( 1.0 - dotLH, 5.0 );\r\n\r\n\t// Optimized variant (presented by Epic at SIGGRAPH \'13)\r\n\t// https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf\r\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\r\n\r\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\r\n\r\n} // validated\r\n\r\n// Microfacet Models for Refraction through Rough Surfaces - equation (34)\r\n// http://graphicrants.blogspot.com/2013/08/specular-brdf-reference.html\r\n// alpha is "roughness squared" in Disney’s reparameterization\r\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\r\n\r\n\t// geometry term (normalized) = G(l)⋅G(v) / 4(n⋅l)(n⋅v)\r\n\t// also see #12151\r\n\r\n\tfloat a2 = pow2( alpha );\r\n\r\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\r\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\r\n\r\n\treturn 1.0 / ( gl * gv );\r\n\r\n} // validated\r\n\r\n// Moving Frostbite to Physically Based Rendering 3.0 - page 12, listing 2\r\n// https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\r\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\r\n\r\n\tfloat a2 = pow2( alpha );\r\n\r\n\t// dotNL and dotNV are explicitly swapped. This is not a mistake.\r\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\r\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\r\n\r\n\treturn 0.5 / max( gv + gl, EPSILON );\r\n\r\n}\r\n\r\n// Microfacet Models for Refraction through Rough Surfaces - equation (33)\r\n// http://graphicrants.blogspot.com/2013/08/specular-brdf-reference.html\r\n// alpha is "roughness squared" in Disney’s reparameterization\r\nfloat D_GGX( const in float alpha, const in float dotNH ) {\r\n\r\n\tfloat a2 = pow2( alpha );\r\n\r\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; // avoid alpha = 0 with dotNH = 1\r\n\r\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\r\n\r\n}\r\n\r\n// GGX Distribution, Schlick Fresnel, GGX-Smith Visibility\r\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\r\n\r\n\tfloat alpha = pow2( roughness ); // UE4\'s roughness\r\n\r\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\r\n\r\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\r\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\r\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\r\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\r\n\r\n\tvec3 F = F_Schlick( specularColor, dotLH );\r\n\r\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\r\n\r\n\tfloat D = D_GGX( alpha, dotNH );\r\n\r\n\treturn F * ( G * D );\r\n\r\n} // validated\r\n\r\n// Rect Area Light\r\n\r\n// Real-Time Polygonal-Light Shading with Linearly Transformed Cosines\r\n// by Eric Heitz, Jonathan Dupuy, Stephen Hill and David Neubelt\r\n// code: https://github.com/selfshadow/ltc_code/\r\n\r\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\r\n\r\n\tconst float LUT_SIZE = 64.0;\r\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\r\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\r\n\r\n\tfloat dotNV = saturate( dot( N, V ) );\r\n\r\n\t// texture parameterized by sqrt( GGX alpha ) and sqrt( 1 - cos( theta ) )\r\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\r\n\r\n\tuv = uv * LUT_SCALE + LUT_BIAS;\r\n\r\n\treturn uv;\r\n\r\n}\r\n\r\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\r\n\r\n\t// Real-Time Area Lighting: a Journey from Research to Production (p.102)\r\n\t// An approximation of the form factor of a horizon-clipped rectangle.\r\n\r\n\tfloat l = length( f );\r\n\r\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\r\n\r\n}\r\n\r\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\r\n\r\n\tfloat x = dot( v1, v2 );\r\n\r\n\tfloat y = abs( x );\r\n\r\n\t// rational polynomial approximation to theta / sin( theta ) / 2PI\r\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\r\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\r\n\tfloat v = a / b;\r\n\r\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\r\n\r\n\treturn cross( v1, v2 ) * theta_sintheta;\r\n\r\n}\r\n\r\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\r\n\r\n\t// bail if point is on back side of plane of light\r\n\t// assumes ccw winding order of light vertices\r\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\r\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\r\n\tvec3 lightNormal = cross( v1, v2 );\r\n\r\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\r\n\r\n\t// construct orthonormal basis around N\r\n\tvec3 T1, T2;\r\n\tT1 = normalize( V - N * dot( V, N ) );\r\n\tT2 = - cross( N, T1 ); // negated from paper; possibly due to a different handedness of world coordinate system\r\n\r\n\t// compute transform\r\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\r\n\r\n\t// transform rect\r\n\tvec3 coords[ 4 ];\r\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\r\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\r\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\r\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\r\n\r\n\t// project rect onto sphere\r\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\r\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\r\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\r\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\r\n\r\n\t// calculate vector form factor\r\n\tvec3 vectorFormFactor = vec3( 0.0 );\r\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\r\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\r\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\r\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\r\n\r\n\t// adjust for horizon clipping\r\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\r\n\r\n\r\n\r\n\treturn vec3( result );\r\n\r\n}\r\n\r\n// End Rect Area Light\r\n\r\n// ref: https://www.unrealengine.com/blog/physically-based-shading-on-mobile - environmentBRDF for GGX on mobile\r\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\r\n\r\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\r\n\r\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\r\n\r\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\r\n\r\n\tvec4 r = roughness * c0 + c1;\r\n\r\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\r\n\r\n\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\r\n\r\n\treturn specularColor * AB.x + AB.y;\r\n\r\n} // validated\r\n\r\n\r\nfloat G_BlinnPhong_Implicit( ) {\r\n\r\n\t// geometry term is (n dot l)(n dot v) / 4(n dot l)(n dot v)\r\n\treturn 0.25;\r\n\r\n}\r\n\r\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\r\n\r\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\r\n\r\n}\r\n\r\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\r\n\r\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\r\n\r\n\t//float dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\r\n\t//float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\r\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\r\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\r\n\r\n\tvec3 F = F_Schlick( specularColor, dotLH );\r\n\r\n\tfloat G = G_BlinnPhong_Implicit( );\r\n\r\n\tfloat D = D_BlinnPhong( shininess, dotNH );\r\n\r\n\treturn F * ( G * D );\r\n\r\n} // validated\r\n\r\n// source: http://simonstechblog.blogspot.ca/2011/12/microfacet-brdf.html\r\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\r\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\r\n}\r\n\r\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\r\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\r\n}\r\n',bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\r\n\r\n\tuniform sampler2D bumpMap;\r\n\tuniform float bumpScale;\r\n\r\n\t// Derivative maps - bump mapping unparametrized surfaces by Morten Mikkelsen\r\n\t// http://mmikkelsen3d.blogspot.sk/2011/07/derivative-maps.html\r\n\r\n\t// Evaluate the derivative of the height w.r.t. screen-space using forward differencing (listing 2)\r\n\r\n\tvec2 dHdxy_fwd() {\r\n\r\n\t\tvec2 dSTdx = dFdx( vUv );\r\n\t\tvec2 dSTdy = dFdy( vUv );\r\n\r\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\r\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\r\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\r\n\r\n\t\treturn vec2( dBx, dBy );\r\n\r\n\t}\r\n\r\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\r\n\r\n\t\t// Workaround for Adreno 3XX dFd*( vec3 ) bug. See #9988\r\n\r\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\r\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\r\n\t\tvec3 vN = surf_norm;\t\t// normalized\r\n\r\n\t\tvec3 R1 = cross( vSigmaY, vN );\r\n\t\tvec3 R2 = cross( vN, vSigmaX );\r\n\r\n\t\tfloat fDet = dot( vSigmaX, R1 );\r\n\r\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\r\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\r\n\r\n\t}\r\n\r\n#endif\r\n",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\r\n\r\n\tvec4 plane;\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\r\n\r\n\t\tplane = clippingPlanes[ i ];\r\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\r\n\r\n\t}\r\n\r\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\r\n\r\n\t\tbool clipped = true;\r\n\r\n\t\t#pragma unroll_loop\r\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\r\n\r\n\t\t\tplane = clippingPlanes[ i ];\r\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\r\n\r\n\t\t}\r\n\r\n\t\tif ( clipped ) discard;\r\n\r\n\t#endif\r\n\r\n#endif\r\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\r\n\r\n\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\r\n\t\tvarying vec3 vViewPosition;\r\n\t#endif\r\n\r\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\r\n\r\n#endif\r\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\r\n\tvarying vec3 vViewPosition;\r\n#endif\r\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\r\n\tvViewPosition = - mvPosition.xyz;\r\n#endif\r\n\r\n",color_fragment:"#ifdef USE_COLOR\r\n\r\n\tdiffuseColor.rgb *= vColor;\r\n\r\n#endif",color_pars_fragment:"#ifdef USE_COLOR\r\n\r\n\tvarying vec3 vColor;\r\n\r\n#endif\r\n",color_pars_vertex:"#ifdef USE_COLOR\r\n\r\n\tvarying vec3 vColor;\r\n\r\n#endif",color_vertex:"#ifdef USE_COLOR\r\n\r\n\tvColor.xyz = color.xyz;\r\n\r\n#endif",common:"#define PI 3.14159265359\r\n#define PI2 6.28318530718\r\n#define PI_HALF 1.5707963267949\r\n#define RECIPROCAL_PI 0.31830988618\r\n#define RECIPROCAL_PI2 0.15915494\r\n#define LOG2 1.442695\r\n#define EPSILON 1e-6\r\n\r\n#define saturate(a) clamp( a, 0.0, 1.0 )\r\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\r\n\r\nfloat pow2( const in float x ) { return x*x; }\r\nfloat pow3( const in float x ) { return x*x*x; }\r\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\r\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\r\n// expects values in the range of [0,1]x[0,1], returns values in the [0,1] range.\r\n// do not collapse into a single function per: http://byteblacksmith.com/improvements-to-the-canonical-one-liner-glsl-rand-for-opengl-es-2-0/\r\nhighp float rand( const in vec2 uv ) {\r\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\r\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\r\n\treturn fract(sin(sn) * c);\r\n}\r\n\r\nstruct IncidentLight {\r\n\tvec3 color;\r\n\tvec3 direction;\r\n\tbool visible;\r\n};\r\n\r\nstruct ReflectedLight {\r\n\tvec3 directDiffuse;\r\n\tvec3 directSpecular;\r\n\tvec3 indirectDiffuse;\r\n\tvec3 indirectSpecular;\r\n};\r\n\r\nstruct GeometricContext {\r\n\tvec3 position;\r\n\tvec3 normal;\r\n\tvec3 viewDir;\r\n};\r\n\r\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\r\n\r\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\r\n\r\n}\r\n\r\n// http://en.wikibooks.org/wiki/GLSL_Programming/Applying_Matrix_Transformations\r\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\r\n\r\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\r\n\r\n}\r\n\r\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\r\n\r\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\r\n\r\n\treturn - distance * planeNormal + point;\r\n\r\n}\r\n\r\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\r\n\r\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\r\n\r\n}\r\n\r\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\r\n\r\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\r\n\r\n}\r\n\r\nmat3 transposeMat3( const in mat3 m ) {\r\n\r\n\tmat3 tmp;\r\n\r\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\r\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\r\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\r\n\r\n\treturn tmp;\r\n\r\n}\r\n\r\n// https://en.wikipedia.org/wiki/Relative_luminance\r\nfloat linearToRelativeLuminance( const in vec3 color ) {\r\n\r\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\r\n\r\n\treturn dot( weights, color.rgb );\r\n\r\n}\r\n",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\r\n\r\n#define cubeUV_textureSize (1024.0)\r\n\r\nint getFaceFromDirection(vec3 direction) {\r\n\tvec3 absDirection = abs(direction);\r\n\tint face = -1;\r\n\tif( absDirection.x > absDirection.z ) {\r\n\t\tif(absDirection.x > absDirection.y )\r\n\t\t\tface = direction.x > 0.0 ? 0 : 3;\r\n\t\telse\r\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\r\n\t}\r\n\telse {\r\n\t\tif(absDirection.z > absDirection.y )\r\n\t\t\tface = direction.z > 0.0 ? 2 : 5;\r\n\t\telse\r\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\r\n\t}\r\n\treturn face;\r\n}\r\n#define cubeUV_maxLods1 (log2(cubeUV_textureSize*0.25) - 1.0)\r\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\r\n\r\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\r\n\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\r\n\tfloat dxRoughness = dFdx(roughness);\r\n\tfloat dyRoughness = dFdy(roughness);\r\n\tvec3 dx = dFdx( vec * scale * dxRoughness );\r\n\tvec3 dy = dFdy( vec * scale * dyRoughness );\r\n\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\r\n\t// Clamp the value to the max mip level counts. hard coded to 6 mips\r\n\td = clamp(d, 1.0, cubeUV_rangeClamp);\r\n\tfloat mipLevel = 0.5 * log2(d);\r\n\treturn vec2(floor(mipLevel), fract(mipLevel));\r\n}\r\n\r\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\r\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\r\n\r\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\r\n\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\r\n\tfloat a = 16.0 * cubeUV_rcpTextureSize;\r\n\r\n\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\r\n\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\r\n\t// float powScale = exp2(roughnessLevel + mipLevel);\r\n\tfloat powScale = exp2_packed.x * exp2_packed.y;\r\n\t// float scale = 1.0 / exp2(roughnessLevel + 2.0 + mipLevel);\r\n\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\r\n\t// float mipOffset = 0.75*(1.0 - 1.0/exp2(mipLevel))/exp2(roughnessLevel);\r\n\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\r\n\r\n\tbool bRes = mipLevel == 0.0;\r\n\tscale = bRes && (scale < a) ? a : scale;\r\n\r\n\tvec3 r;\r\n\tvec2 offset;\r\n\tint face = getFaceFromDirection(direction);\r\n\r\n\tfloat rcpPowScale = 1.0 / powScale;\r\n\r\n\tif( face == 0) {\r\n\t\tr = vec3(direction.x, -direction.z, direction.y);\r\n\t\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\r\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\r\n\t}\r\n\telse if( face == 1) {\r\n\t\tr = vec3(direction.y, direction.x, direction.z);\r\n\t\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\r\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\r\n\t}\r\n\telse if( face == 2) {\r\n\t\tr = vec3(direction.z, direction.x, direction.y);\r\n\t\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\r\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\r\n\t}\r\n\telse if( face == 3) {\r\n\t\tr = vec3(direction.x, direction.z, direction.y);\r\n\t\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\r\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\r\n\t}\r\n\telse if( face == 4) {\r\n\t\tr = vec3(direction.y, direction.x, -direction.z);\r\n\t\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\r\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\r\n\t}\r\n\telse {\r\n\t\tr = vec3(direction.z, -direction.x, direction.y);\r\n\t\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\r\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\r\n\t}\r\n\tr = normalize(r);\r\n\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\r\n\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\r\n\tvec2 base = offset + vec2( texelOffset );\r\n\treturn base + s * ( scale - 2.0 * texelOffset );\r\n}\r\n\r\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\r\n\r\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\r\n\tfloat roughnessVal = roughness* cubeUV_maxLods3;\r\n\tfloat r1 = floor(roughnessVal);\r\n\tfloat r2 = r1 + 1.0;\r\n\tfloat t = fract(roughnessVal);\r\n\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\r\n\tfloat s = mipInfo.y;\r\n\tfloat level0 = mipInfo.x;\r\n\tfloat level1 = level0 + 1.0;\r\n\tlevel1 = level1 > 5.0 ? 5.0 : level1;\r\n\r\n\t// round to nearest mipmap if we are not interpolating.\r\n\tlevel0 += min( floor( s + 0.5 ), 5.0 );\r\n\r\n\t// Tri linear interpolation.\r\n\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\r\n\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\r\n\r\n\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\r\n\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\r\n\r\n\tvec4 result = mix(color10, color20, t);\r\n\r\n\treturn vec4(result.rgb, 1.0);\r\n}\r\n\r\n#endif\r\n",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\r\n\r\n#ifdef FLIP_SIDED\r\n\r\n\ttransformedNormal = - transformedNormal;\r\n\r\n#endif\r\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\r\n\r\n\tuniform sampler2D displacementMap;\r\n\tuniform float displacementScale;\r\n\tuniform float displacementBias;\r\n\r\n#endif\r\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\r\n\r\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\r\n\r\n#endif\r\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\r\n\r\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\r\n\r\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\r\n\r\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\r\n\r\n#endif\r\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\r\n\r\n\tuniform sampler2D emissiveMap;\r\n\r\n#endif\r\n",encodings_fragment:" gl_FragColor = linearToOutputTexel( gl_FragColor );\r\n",encodings_pars_fragment:"// For a discussion of what this is, please read this: http://lousodrome.net/blog/light/2013/05/26/gamma-correct-and-hdr-rendering-in-a-32-bits-buffer/\r\n\r\nvec4 LinearToLinear( in vec4 value ) {\r\n\treturn value;\r\n}\r\n\r\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\r\n\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\r\n}\r\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\r\n\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\r\n}\r\n\r\nvec4 sRGBToLinear( in vec4 value ) {\r\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\r\n}\r\nvec4 LinearTosRGB( in vec4 value ) {\r\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\r\n}\r\n\r\nvec4 RGBEToLinear( in vec4 value ) {\r\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\r\n}\r\nvec4 LinearToRGBE( in vec4 value ) {\r\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\r\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\r\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\r\n// return vec4( value.brg, ( 3.0 + 128.0 ) / 256.0 );\r\n}\r\n\r\n// reference: http://iwasbeingirony.blogspot.ca/2010/06/difference-between-rgbm-and-rgbd.html\r\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\r\n\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\r\n}\r\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\r\n\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\r\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\r\n\tM = ceil( M * 255.0 ) / 255.0;\r\n\treturn vec4( value.rgb / ( M * maxRange ), M );\r\n}\r\n\r\n// reference: http://iwasbeingirony.blogspot.ca/2010/06/difference-between-rgbm-and-rgbd.html\r\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\r\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\r\n}\r\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\r\n\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\r\n\tfloat D = max( maxRange / maxRGB, 1.0 );\r\n\tD = min( floor( D ) / 255.0, 1.0 );\r\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\r\n}\r\n\r\n// LogLuv reference: http://graphicrants.blogspot.ca/2009/04/rgbm-color-encoding.html\r\n\r\n// M matrix, for encoding\r\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\r\nvec4 LinearToLogLuv( in vec4 value ) {\r\n\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\r\n\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\r\n\tvec4 vResult;\r\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\r\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\r\n\tvResult.w = fract(Le);\r\n\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\r\n\treturn vResult;\r\n}\r\n\r\n// Inverse M matrix, for decoding\r\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\r\nvec4 LogLuvToLinear( in vec4 value ) {\r\n\tfloat Le = value.z * 255.0 + value.w;\r\n\tvec3 Xp_Y_XYZp;\r\n\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\r\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\r\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\r\n\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\r\n\treturn vec4( max(vRGB, 0.0), 1.0 );\r\n}\r\n",envmap_fragment:"#ifdef USE_ENVMAP\r\n\r\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\r\n\r\n\t\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\r\n\r\n\t\t// Transforming Normal Vectors with the Inverse Transformation\r\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\r\n\r\n\t\t#ifdef ENVMAP_MODE_REFLECTION\r\n\r\n\t\t\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\r\n\r\n\t\t#else\r\n\r\n\t\t\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\r\n\r\n\t\t#endif\r\n\r\n\t#else\r\n\r\n\t\tvec3 reflectVec = vReflect;\r\n\r\n\t#endif\r\n\r\n\t#ifdef ENVMAP_TYPE_CUBE\r\n\r\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\r\n\r\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\r\n\r\n\t\tvec2 sampleUV;\r\n\r\n\t\treflectVec = normalize( reflectVec );\r\n\r\n\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\r\n\r\n\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\r\n\r\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\r\n\r\n\t#elif defined( ENVMAP_TYPE_SPHERE )\r\n\r\n\t\treflectVec = normalize( reflectVec );\r\n\r\n\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\r\n\r\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\r\n\r\n\t#else\r\n\r\n\t\tvec4 envColor = vec4( 0.0 );\r\n\r\n\t#endif\r\n\r\n\tenvColor = envMapTexelToLinear( envColor );\r\n\r\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\r\n\r\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\r\n\r\n\t#elif defined( ENVMAP_BLENDING_MIX )\r\n\r\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\r\n\r\n\t#elif defined( ENVMAP_BLENDING_ADD )\r\n\r\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\r\n\r\n\t#endif\r\n\r\n#endif\r\n",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\r\n\tuniform float reflectivity;\r\n\tuniform float envMapIntensity;\r\n#endif\r\n\r\n#ifdef USE_ENVMAP\r\n\r\n\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\r\n\t\tvarying vec3 vWorldPosition;\r\n\t#endif\r\n\r\n\t#ifdef ENVMAP_TYPE_CUBE\r\n\t\tuniform samplerCube envMap;\r\n\t#else\r\n\t\tuniform sampler2D envMap;\r\n\t#endif\r\n\tuniform float flipEnvMap;\r\n\r\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\r\n\t\tuniform float refractionRatio;\r\n\t#else\r\n\t\tvarying vec3 vReflect;\r\n\t#endif\r\n\r\n#endif\r\n",envmap_pars_vertex:"#ifdef USE_ENVMAP\r\n\r\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\r\n\t\tvarying vec3 vWorldPosition;\r\n\r\n\t#else\r\n\r\n\t\tvarying vec3 vReflect;\r\n\t\tuniform float refractionRatio;\r\n\r\n\t#endif\r\n\r\n#endif\r\n",envmap_vertex:"#ifdef USE_ENVMAP\r\n\r\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\r\n\r\n\t\tvWorldPosition = worldPosition.xyz;\r\n\r\n\t#else\r\n\r\n\t\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\r\n\r\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\r\n\r\n\t\t#ifdef ENVMAP_MODE_REFLECTION\r\n\r\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\r\n\r\n\t\t#else\r\n\r\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\r\n\r\n\t\t#endif\r\n\r\n\t#endif\r\n\r\n#endif\r\n",fog_vertex:"\r\n#ifdef USE_FOG\r\nfogDepth = -mvPosition.z;\r\n#endif",fog_pars_vertex:"#ifdef USE_FOG\r\n\r\n varying float fogDepth;\r\n\r\n#endif\r\n",fog_fragment:"#ifdef USE_FOG\r\n\r\n\t#ifdef FOG_EXP2\r\n\r\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\r\n\r\n\t#else\r\n\r\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\r\n\r\n\t#endif\r\n\r\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\r\n\r\n#endif\r\n",fog_pars_fragment:"#ifdef USE_FOG\r\n\r\n\tuniform vec3 fogColor;\r\n\tvarying float fogDepth;\r\n\r\n\t#ifdef FOG_EXP2\r\n\r\n\t\tuniform float fogDensity;\r\n\r\n\t#else\r\n\r\n\t\tuniform float fogNear;\r\n\t\tuniform float fogFar;\r\n\r\n\t#endif\r\n\r\n#endif\r\n",gradientmap_pars_fragment:"#ifdef TOON\r\n\r\n\tuniform sampler2D gradientMap;\r\n\r\n\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\r\n\r\n\t\t// dotNL will be from -1.0 to 1.0\r\n\t\tfloat dotNL = dot( normal, lightDirection );\r\n\t\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\r\n\r\n\t\t#ifdef USE_GRADIENTMAP\r\n\r\n\t\t\treturn texture2D( gradientMap, coord ).rgb;\r\n\r\n\t\t#else\r\n\r\n\t\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\r\n\r\n\t\t#endif\r\n\r\n\r\n\t}\r\n\r\n#endif\r\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\r\n\r\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity; // factor of PI should not be present; included here to prevent breakage\r\n\r\n#endif\r\n",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\r\n\r\n\tuniform sampler2D lightMap;\r\n\tuniform float lightMapIntensity;\r\n\r\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\r\n\r\nGeometricContext geometry;\r\ngeometry.position = mvPosition.xyz;\r\ngeometry.normal = normalize( transformedNormal );\r\ngeometry.viewDir = normalize( -mvPosition.xyz );\r\n\r\nGeometricContext backGeometry;\r\nbackGeometry.position = geometry.position;\r\nbackGeometry.normal = -geometry.normal;\r\nbackGeometry.viewDir = geometry.viewDir;\r\n\r\nvLightFront = vec3( 0.0 );\r\n\r\n#ifdef DOUBLE_SIDED\r\n\tvLightBack = vec3( 0.0 );\r\n#endif\r\n\r\nIncidentLight directLight;\r\nfloat dotNL;\r\nvec3 directLightColor_Diffuse;\r\n\r\n#if NUM_POINT_LIGHTS > 0\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\r\n\r\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\r\n\r\n\t\tdotNL = dot( geometry.normal, directLight.direction );\r\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\r\n\r\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\r\n\r\n\t\t#ifdef DOUBLE_SIDED\r\n\r\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\r\n\r\n\t\t#endif\r\n\r\n\t}\r\n\r\n#endif\r\n\r\n#if NUM_SPOT_LIGHTS > 0\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\r\n\r\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\r\n\r\n\t\tdotNL = dot( geometry.normal, directLight.direction );\r\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\r\n\r\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\r\n\r\n\t\t#ifdef DOUBLE_SIDED\r\n\r\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\r\n\r\n\t\t#endif\r\n\t}\r\n\r\n#endif\r\n\r\n\r\n\r\n#if NUM_DIR_LIGHTS > 0\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\r\n\r\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\r\n\r\n\t\tdotNL = dot( geometry.normal, directLight.direction );\r\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\r\n\r\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\r\n\r\n\t\t#ifdef DOUBLE_SIDED\r\n\r\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\r\n\r\n\t\t#endif\r\n\r\n\t}\r\n\r\n#endif\r\n\r\n#if NUM_HEMI_LIGHTS > 0\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\r\n\r\n\t\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\r\n\r\n\t\t#ifdef DOUBLE_SIDED\r\n\r\n\t\t\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\r\n\r\n\t\t#endif\r\n\r\n\t}\r\n\r\n#endif\r\n",lights_pars:"uniform vec3 ambientLightColor;\r\n\r\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\r\n\r\n\tvec3 irradiance = ambientLightColor;\r\n\r\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\r\n\r\n\t\tirradiance *= PI;\r\n\r\n\t#endif\r\n\r\n\treturn irradiance;\r\n\r\n}\r\n\r\n#if NUM_DIR_LIGHTS > 0\r\n\r\n\tstruct DirectionalLight {\r\n\t\tvec3 direction;\r\n\t\tvec3 color;\r\n\r\n\t\tint shadow;\r\n\t\tfloat shadowBias;\r\n\t\tfloat shadowRadius;\r\n\t\tvec2 shadowMapSize;\r\n\t};\r\n\r\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\r\n\r\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\r\n\r\n\t\tdirectLight.color = directionalLight.color;\r\n\t\tdirectLight.direction = directionalLight.direction;\r\n\t\tdirectLight.visible = true;\r\n\r\n\t}\r\n\r\n#endif\r\n\r\n\r\n#if NUM_POINT_LIGHTS > 0\r\n\r\n\tstruct PointLight {\r\n\t\tvec3 position;\r\n\t\tvec3 color;\r\n\t\tfloat distance;\r\n\t\tfloat decay;\r\n\r\n\t\tint shadow;\r\n\t\tfloat shadowBias;\r\n\t\tfloat shadowRadius;\r\n\t\tvec2 shadowMapSize;\r\n\t\tfloat shadowCameraNear;\r\n\t\tfloat shadowCameraFar;\r\n\t};\r\n\r\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\r\n\r\n\t// directLight is an out parameter as having it as a return value caused compiler errors on some devices\r\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\r\n\r\n\t\tvec3 lVector = pointLight.position - geometry.position;\r\n\t\tdirectLight.direction = normalize( lVector );\r\n\r\n\t\tfloat lightDistance = length( lVector );\r\n\r\n\t\tdirectLight.color = pointLight.color;\r\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\r\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\r\n\r\n\t}\r\n\r\n#endif\r\n\r\n\r\n#if NUM_SPOT_LIGHTS > 0\r\n\r\n\tstruct SpotLight {\r\n\t\tvec3 position;\r\n\t\tvec3 direction;\r\n\t\tvec3 color;\r\n\t\tfloat distance;\r\n\t\tfloat decay;\r\n\t\tfloat coneCos;\r\n\t\tfloat penumbraCos;\r\n\r\n\t\tint shadow;\r\n\t\tfloat shadowBias;\r\n\t\tfloat shadowRadius;\r\n\t\tvec2 shadowMapSize;\r\n\t};\r\n\r\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\r\n\r\n\t// directLight is an out parameter as having it as a return value caused compiler errors on some devices\r\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\r\n\r\n\t\tvec3 lVector = spotLight.position - geometry.position;\r\n\t\tdirectLight.direction = normalize( lVector );\r\n\r\n\t\tfloat lightDistance = length( lVector );\r\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\r\n\r\n\t\tif ( angleCos > spotLight.coneCos ) {\r\n\r\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\r\n\r\n\t\t\tdirectLight.color = spotLight.color;\r\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\r\n\t\t\tdirectLight.visible = true;\r\n\r\n\t\t} else {\r\n\r\n\t\t\tdirectLight.color = vec3( 0.0 );\r\n\t\t\tdirectLight.visible = false;\r\n\r\n\t\t}\r\n\t}\r\n\r\n#endif\r\n\r\n\r\n#if NUM_RECT_AREA_LIGHTS > 0\r\n\r\n\tstruct RectAreaLight {\r\n\t\tvec3 color;\r\n\t\tvec3 position;\r\n\t\tvec3 halfWidth;\r\n\t\tvec3 halfHeight;\r\n\t};\r\n\r\n\t// Pre-computed values of LinearTransformedCosine approximation of BRDF\r\n\t// BRDF approximation Texture is 64x64\r\n\tuniform sampler2D ltc_1; // RGBA Float\r\n\tuniform sampler2D ltc_2; // RGBA Float\r\n\r\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\r\n\r\n#endif\r\n\r\n\r\n#if NUM_HEMI_LIGHTS > 0\r\n\r\n\tstruct HemisphereLight {\r\n\t\tvec3 direction;\r\n\t\tvec3 skyColor;\r\n\t\tvec3 groundColor;\r\n\t};\r\n\r\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\r\n\r\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\r\n\r\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\r\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\r\n\r\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\r\n\r\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\r\n\r\n\t\t\tirradiance *= PI;\r\n\r\n\t\t#endif\r\n\r\n\t\treturn irradiance;\r\n\r\n\t}\r\n\r\n#endif\r\n\r\n\r\n#if defined( USE_ENVMAP ) && defined( PHYSICAL )\r\n\r\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\r\n\r\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\r\n\r\n\t\t#ifdef ENVMAP_TYPE_CUBE\r\n\r\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\r\n\r\n\t\t\t// TODO: replace with properly filtered cubemaps and access the irradiance LOD level, be it the last LOD level\r\n\t\t\t// of a specular cubemap, or just the default level of a specially created irradiance cubemap.\r\n\r\n\t\t\t#ifdef TEXTURE_LOD_EXT\r\n\r\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\r\n\r\n\t\t\t#else\r\n\r\n\t\t\t\t// force the bias high to get the last LOD level as it is the most blurred.\r\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\r\n\r\n\t\t\t#endif\r\n\r\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\r\n\r\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\r\n\r\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\r\n\t\t\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\r\n\r\n\t\t#else\r\n\r\n\t\t\tvec4 envMapColor = vec4( 0.0 );\r\n\r\n\t\t#endif\r\n\r\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\r\n\r\n\t}\r\n\r\n\t// taken from here: http://casual-effects.blogspot.ca/2011/08/plausible-environment-lighting-in-two.html\r\n\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\r\n\r\n\t\t//float envMapWidth = pow( 2.0, maxMIPLevelScalar );\r\n\t\t//float desiredMIPLevel = log2( envMapWidth * sqrt( 3.0 ) ) - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\r\n\r\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\r\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\r\n\r\n\t\t// clamp to allowable LOD ranges.\r\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\r\n\r\n\t}\r\n\r\n\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\r\n\r\n\t\t#ifdef ENVMAP_MODE_REFLECTION\r\n\r\n\t\t\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\r\n\r\n\t\t#else\r\n\r\n\t\t\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\r\n\r\n\t\t#endif\r\n\r\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\r\n\r\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\r\n\r\n\t\t#ifdef ENVMAP_TYPE_CUBE\r\n\r\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\r\n\r\n\t\t\t#ifdef TEXTURE_LOD_EXT\r\n\r\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\r\n\r\n\t\t\t#else\r\n\r\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\r\n\r\n\t\t\t#endif\r\n\r\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\r\n\r\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\r\n\r\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\r\n\t\t\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\r\n\r\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\r\n\r\n\t\t\tvec2 sampleUV;\r\n\t\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\r\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\r\n\r\n\t\t\t#ifdef TEXTURE_LOD_EXT\r\n\r\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\r\n\r\n\t\t\t#else\r\n\r\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\r\n\r\n\t\t\t#endif\r\n\r\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\r\n\r\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\r\n\r\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\r\n\r\n\t\t\t#ifdef TEXTURE_LOD_EXT\r\n\r\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\r\n\r\n\t\t\t#else\r\n\r\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\r\n\r\n\t\t\t#endif\r\n\r\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\r\n\r\n\t\t#endif\r\n\r\n\t\treturn envMapColor.rgb * envMapIntensity;\r\n\r\n\t}\r\n\r\n#endif\r\n",lights_phong_fragment:"BlinnPhongMaterial material;\r\nmaterial.diffuseColor = diffuseColor.rgb;\r\nmaterial.specularColor = specular;\r\nmaterial.specularShininess = shininess;\r\nmaterial.specularStrength = specularStrength;\r\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\r\n\r\n#ifndef FLAT_SHADED\r\n\r\n\tvarying vec3 vNormal;\r\n\r\n#endif\r\n\r\n\r\nstruct BlinnPhongMaterial {\r\n\r\n\tvec3\tdiffuseColor;\r\n\tvec3\tspecularColor;\r\n\tfloat\tspecularShininess;\r\n\tfloat\tspecularStrength;\r\n\r\n};\r\n\r\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\r\n\r\n\t#ifdef TOON\r\n\r\n\t\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\r\n\r\n\t#else\r\n\r\n\t\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\r\n\t\tvec3 irradiance = dotNL * directLight.color;\r\n\r\n\t#endif\r\n\r\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\r\n\r\n\t\tirradiance *= PI; // punctual light\r\n\r\n\t#endif\r\n\r\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\r\n\r\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\r\n\r\n}\r\n\r\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\r\n\r\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\r\n\r\n}\r\n\r\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\r\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\r\n\r\n#define Material_LightProbeLOD( material )\t(0)\r\n",lights_physical_fragment:"PhysicalMaterial material;\r\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\r\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\r\n#ifdef STANDARD\r\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\r\n#else\r\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\r\n\tmaterial.clearCoat = saturate( clearCoat ); // Burley clearcoat model\r\n\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\r\n#endif\r\n",lights_physical_pars_fragment:"struct PhysicalMaterial {\r\n\r\n\tvec3\tdiffuseColor;\r\n\tfloat\tspecularRoughness;\r\n\tvec3\tspecularColor;\r\n\r\n\t#ifndef STANDARD\r\n\t\tfloat clearCoat;\r\n\t\tfloat clearCoatRoughness;\r\n\t#endif\r\n\r\n};\r\n\r\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\r\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\r\n\r\n// Clear coat directional hemishperical reflectance (this approximation should be improved)\r\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\r\n\r\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\r\n\r\n}\r\n\r\n#if NUM_RECT_AREA_LIGHTS > 0\r\n\r\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\r\n\r\n\t\tvec3 normal = geometry.normal;\r\n\t\tvec3 viewDir = geometry.viewDir;\r\n\t\tvec3 position = geometry.position;\r\n\t\tvec3 lightPos = rectAreaLight.position;\r\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\r\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\r\n\t\tvec3 lightColor = rectAreaLight.color;\r\n\t\tfloat roughness = material.specularRoughness;\r\n\r\n\t\tvec3 rectCoords[ 4 ];\r\n\t\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight; // counterclockwise\r\n\t\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\r\n\t\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\r\n\t\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\r\n\r\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\r\n\r\n\t\tvec4 t1 = texture2D( ltc_1, uv );\r\n\t\tvec4 t2 = texture2D( ltc_2, uv );\r\n\r\n\t\tmat3 mInv = mat3(\r\n\t\t\tvec3( t1.x, 0, t1.y ),\r\n\t\t\tvec3( 0, 1, 0 ),\r\n\t\t\tvec3( t1.z, 0, t1.w )\r\n\t\t);\r\n\r\n\t\t// LTC Fresnel Approximation by Stephen Hill\r\n\t\t// http://blog.selfshadow.com/publications/s2016-advances/s2016_ltc_fresnel.pdf\r\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\r\n\r\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\r\n\r\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\r\n\r\n\t}\r\n\r\n#endif\r\n\r\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\r\n\r\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\r\n\r\n\tvec3 irradiance = dotNL * directLight.color;\r\n\r\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\r\n\r\n\t\tirradiance *= PI; // punctual light\r\n\r\n\t#endif\r\n\r\n\t#ifndef STANDARD\r\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\r\n\t#else\r\n\t\tfloat clearCoatDHR = 0.0;\r\n\t#endif\r\n\r\n\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\r\n\r\n\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\r\n\r\n\t#ifndef STANDARD\r\n\r\n\t\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\r\n\r\n\t#endif\r\n\r\n}\r\n\r\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\r\n\r\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\r\n\r\n}\r\n\r\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\r\n\r\n\t#ifndef STANDARD\r\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\r\n\t\tfloat dotNL = dotNV;\r\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\r\n\t#else\r\n\t\tfloat clearCoatDHR = 0.0;\r\n\t#endif\r\n\r\n\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\r\n\r\n\t#ifndef STANDARD\r\n\r\n\t\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\r\n\r\n\t#endif\r\n\r\n}\r\n\r\n#define RE_Direct\t\t\t\tRE_Direct_Physical\r\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\r\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\r\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\r\n\r\n#define Material_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.specularRoughness )\r\n#define Material_ClearCoat_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\r\n\r\n// ref: https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\r\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\r\n\r\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\r\n\r\n}\r\n",lights_template:"\r\n\r\nGeometricContext geometry;\r\n\r\ngeometry.position = - vViewPosition;\r\ngeometry.normal = normal;\r\ngeometry.viewDir = normalize( vViewPosition );\r\n\r\nIncidentLight directLight;\r\n\r\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\r\n\r\n\tPointLight pointLight;\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\r\n\r\n\t\tpointLight = pointLights[ i ];\r\n\r\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\r\n\r\n\t\t#ifdef USE_SHADOWMAP\r\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\r\n\t\t#endif\r\n\r\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\r\n\r\n\t}\r\n\r\n#endif\r\n\r\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\r\n\r\n\tSpotLight spotLight;\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\r\n\r\n\t\tspotLight = spotLights[ i ];\r\n\r\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\r\n\r\n\t\t#ifdef USE_SHADOWMAP\r\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\r\n\t\t#endif\r\n\r\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\r\n\r\n\t}\r\n\r\n#endif\r\n\r\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\r\n\r\n\tDirectionalLight directionalLight;\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\r\n\r\n\t\tdirectionalLight = directionalLights[ i ];\r\n\r\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\r\n\r\n\t\t#ifdef USE_SHADOWMAP\r\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\r\n\t\t#endif\r\n\r\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\r\n\r\n\t}\r\n\r\n#endif\r\n\r\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\r\n\r\n\tRectAreaLight rectAreaLight;\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\r\n\r\n\t\trectAreaLight = rectAreaLights[ i ];\r\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\r\n\r\n\t}\r\n\r\n#endif\r\n\r\n#if defined( RE_IndirectDiffuse )\r\n\r\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\r\n\r\n\t#ifdef USE_LIGHTMAP\r\n\r\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\r\n\r\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\r\n\r\n\t\t\tlightMapIrradiance *= PI; // factor of PI should not be present; included here to prevent breakage\r\n\r\n\t\t#endif\r\n\r\n\t\tirradiance += lightMapIrradiance;\r\n\r\n\t#endif\r\n\r\n\t#if ( NUM_HEMI_LIGHTS > 0 )\r\n\r\n\t\t#pragma unroll_loop\r\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\r\n\r\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\r\n\r\n\t\t}\r\n\r\n\t#endif\r\n\r\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\r\n\r\n\t\t// TODO, replace 8 with the real maxMIPLevel\r\n\t\tirradiance += getLightProbeIndirectIrradiance( geometry, 8 );\r\n\r\n\t#endif\r\n\r\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\r\n\r\n#endif\r\n\r\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\r\n\r\n\t// TODO, replace 8 with the real maxMIPLevel\r\n\tvec3 radiance = getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), 8 );\r\n\r\n\t#ifndef STANDARD\r\n\t\tvec3 clearCoatRadiance = getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), 8 );\r\n\t#else\r\n\t\tvec3 clearCoatRadiance = vec3( 0.0 );\r\n\t#endif\r\n\r\n\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\r\n\r\n#endif\r\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\r\n\r\n\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\r\n\r\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\r\n\r\n\tuniform float logDepthBufFC;\r\n\r\n\t#ifdef USE_LOGDEPTHBUF_EXT\r\n\r\n\t\tvarying float vFragDepth;\r\n\r\n\t#endif\r\n\r\n#endif\r\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\r\n\r\n\t#ifdef USE_LOGDEPTHBUF_EXT\r\n\r\n\t\tvarying float vFragDepth;\r\n\r\n\t#endif\r\n\r\n\tuniform float logDepthBufFC;\r\n\r\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\r\n\r\n\t#ifdef USE_LOGDEPTHBUF_EXT\r\n\r\n\t\tvFragDepth = 1.0 + gl_Position.w;\r\n\r\n\t#else\r\n\r\n\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\r\n\r\n\t\tgl_Position.z *= gl_Position.w;\r\n\r\n\t#endif\r\n\r\n#endif\r\n",map_fragment:"#ifdef USE_MAP\r\n\r\n\tvec4 texelColor = texture2D( map, vUv );\r\n\r\n\ttexelColor = mapTexelToLinear( texelColor );\r\n\tdiffuseColor *= texelColor;\r\n\r\n#endif\r\n",map_pars_fragment:"#ifdef USE_MAP\r\n\r\n\tuniform sampler2D map;\r\n\r\n#endif\r\n",map_particle_fragment:"#ifdef USE_MAP\r\n\r\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\r\n\tvec4 mapTexel = texture2D( map, uv );\r\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\r\n\r\n#endif\r\n",map_particle_pars_fragment:"#ifdef USE_MAP\r\n\r\n\tuniform mat3 uvTransform;\r\n\tuniform sampler2D map;\r\n\r\n#endif\r\n",metalnessmap_fragment:"float metalnessFactor = metalness;\r\n\r\n#ifdef USE_METALNESSMAP\r\n\r\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\r\n\r\n\t// reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\r\n\tmetalnessFactor *= texelMetalness.b;\r\n\r\n#endif\r\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\r\n\r\n\tuniform sampler2D metalnessMap;\r\n\r\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\r\n\r\n\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\r\n\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\r\n\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\r\n\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\r\n\r\n#endif\r\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\r\n\r\n\t#ifndef USE_MORPHNORMALS\r\n\r\n\tuniform float morphTargetInfluences[ 8 ];\r\n\r\n\t#else\r\n\r\n\tuniform float morphTargetInfluences[ 4 ];\r\n\r\n\t#endif\r\n\r\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\r\n\r\n\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\r\n\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\r\n\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\r\n\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\r\n\r\n\t#ifndef USE_MORPHNORMALS\r\n\r\n\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\r\n\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\r\n\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\r\n\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\r\n\r\n\t#endif\r\n\r\n#endif\r\n",normal_fragment:"#ifdef FLAT_SHADED\r\n\r\n\t// Workaround for Adreno/Nexus5 not able able to do dFdx( vViewPosition ) ...\r\n\r\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\r\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\r\n\tvec3 normal = normalize( cross( fdx, fdy ) );\r\n\r\n#else\r\n\r\n\tvec3 normal = normalize( vNormal );\r\n\r\n\t#ifdef DOUBLE_SIDED\r\n\r\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\r\n\r\n\t#endif\r\n\r\n#endif\r\n\r\n#ifdef USE_NORMALMAP\r\n\r\n\tnormal = perturbNormal2Arb( -vViewPosition, normal );\r\n\r\n#elif defined( USE_BUMPMAP )\r\n\r\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\r\n\r\n#endif\r\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\r\n\r\n\tuniform sampler2D normalMap;\r\n\tuniform vec2 normalScale;\r\n\r\n\t// Per-Pixel Tangent Space Normal Mapping\r\n\t// http://hacksoflife.blogspot.ch/2009/11/per-pixel-tangent-space-normal-mapping.html\r\n\r\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\r\n\r\n\t\t// Workaround for Adreno 3XX dFd*( vec3 ) bug. See #9988\r\n\r\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\r\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\r\n\t\tvec2 st0 = dFdx( vUv.st );\r\n\t\tvec2 st1 = dFdy( vUv.st );\r\n\r\n\t\tvec3 S = normalize( q0 * st1.t - q1 * st0.t );\r\n\t\tvec3 T = normalize( -q0 * st1.s + q1 * st0.s );\r\n\t\tvec3 N = normalize( surf_norm );\r\n\r\n\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\r\n\t\tmapN.xy = normalScale * mapN.xy;\r\n\t\tmat3 tsn = mat3( S, T, N );\r\n\t\treturn normalize( tsn * mapN );\r\n\r\n\t}\r\n\r\n#endif\r\n",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\r\n\treturn normalize( normal ) * 0.5 + 0.5;\r\n}\r\n\r\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\r\n\treturn 2.0 * rgb.xyz - 1.0;\r\n}\r\n\r\nconst float PackUpscale = 256. / 255.; // fraction -> 0..1 (including 1)\r\nconst float UnpackDownscale = 255. / 256.; // 0..1 -> fraction (excluding 1)\r\n\r\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\r\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\r\n\r\nconst float ShiftRight8 = 1. / 256.;\r\n\r\nvec4 packDepthToRGBA( const in float v ) {\r\n\tvec4 r = vec4( fract( v * PackFactors ), v );\r\n\tr.yzw -= r.xyz * ShiftRight8; // tidy overflow\r\n\treturn r * PackUpscale;\r\n}\r\n\r\nfloat unpackRGBAToDepth( const in vec4 v ) {\r\n\treturn dot( v, UnpackFactors );\r\n}\r\n\r\n// NOTE: viewZ/eyeZ is < 0 when in front of the camera per OpenGL conventions\r\n\r\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\r\n\treturn ( viewZ + near ) / ( near - far );\r\n}\r\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\r\n\treturn linearClipZ * ( near - far ) - near;\r\n}\r\n\r\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\r\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\r\n}\r\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\r\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\r\n}\r\n",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\r\n\r\n\t// Get get normal blending with premultipled, use with CustomBlending, OneFactor, OneMinusSrcAlphaFactor, AddEquation.\r\n\tgl_FragColor.rgb *= gl_FragColor.a;\r\n\r\n#endif\r\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\r\n\r\ngl_Position = projectionMatrix * mvPosition;\r\n",dithering_fragment:"#if defined( DITHERING )\r\n\r\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\r\n\r\n#endif\r\n",dithering_pars_fragment:"#if defined( DITHERING )\r\n\r\n\t// based on https://www.shadertoy.com/view/MslGR8\r\n\tvec3 dithering( vec3 color ) {\r\n\t\t//Calculate grid position\r\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\r\n\r\n\t\t//Shift the individual colors differently, thus making it even harder to see the dithering pattern\r\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\r\n\r\n\t\t//modify shift acording to grid position.\r\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\r\n\r\n\t\t//shift the color by dither_shift\r\n\t\treturn color + dither_shift_RGB;\r\n\t}\r\n\r\n#endif\r\n",roughnessmap_fragment:"float roughnessFactor = roughness;\r\n\r\n#ifdef USE_ROUGHNESSMAP\r\n\r\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\r\n\r\n\t// reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\r\n\troughnessFactor *= texelRoughness.g;\r\n\r\n#endif\r\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\r\n\r\n\tuniform sampler2D roughnessMap;\r\n\r\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\r\n\r\n\t#if NUM_DIR_LIGHTS > 0\r\n\r\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\r\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\r\n\r\n\t#endif\r\n\r\n\t#if NUM_SPOT_LIGHTS > 0\r\n\r\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\r\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\r\n\r\n\t#endif\r\n\r\n\t#if NUM_POINT_LIGHTS > 0\r\n\r\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\r\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\r\n\r\n\t#endif\r\n\r\n\r\n\r\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\r\n\r\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\r\n\r\n\t}\r\n\r\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\r\n\r\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\r\n\r\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\r\n\t\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\r\n\r\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\r\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\r\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\r\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\r\n\r\n\t\tvec2 f = fract( uv * size + 0.5 );\r\n\r\n\t\tfloat a = mix( lb, lt, f.y );\r\n\t\tfloat b = mix( rb, rt, f.y );\r\n\t\tfloat c = mix( a, b, f.x );\r\n\r\n\t\treturn c;\r\n\r\n\t}\r\n\r\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\r\n\r\n\t\tfloat shadow = 1.0;\r\n\r\n\t\tshadowCoord.xyz /= shadowCoord.w;\r\n\t\tshadowCoord.z += shadowBias;\r\n\r\n\t\t// if ( something && something ) breaks ATI OpenGL shader compiler\r\n\t\t// if ( all( something, something ) ) using this instead\r\n\r\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\r\n\t\tbool inFrustum = all( inFrustumVec );\r\n\r\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\r\n\r\n\t\tbool frustumTest = all( frustumTestVec );\r\n\r\n\t\tif ( frustumTest ) {\r\n\r\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\r\n\r\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\r\n\r\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\r\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\r\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\r\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\r\n\r\n\t\t\tshadow = (\r\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\r\n\t\t\t) * ( 1.0 / 9.0 );\r\n\r\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\r\n\r\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\r\n\r\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\r\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\r\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\r\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\r\n\r\n\t\t\tshadow = (\r\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\r\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\r\n\t\t\t) * ( 1.0 / 9.0 );\r\n\r\n\t\t#else // no percentage-closer filtering:\r\n\r\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\r\n\r\n\t\t#endif\r\n\r\n\t\t}\r\n\r\n\t\treturn shadow;\r\n\r\n\t}\r\n\r\n\t// cubeToUV() maps a 3D direction vector suitable for cube texture mapping to a 2D\r\n\t// vector suitable for 2D texture mapping. This code uses the following layout for the\r\n\t// 2D texture:\r\n\t//\r\n\t// xzXZ\r\n\t// y Y\r\n\t//\r\n\t// Y - Positive y direction\r\n\t// y - Negative y direction\r\n\t// X - Positive x direction\r\n\t// x - Negative x direction\r\n\t// Z - Positive z direction\r\n\t// z - Negative z direction\r\n\t//\r\n\t// Source and test bed:\r\n\t// https://gist.github.com/tschw/da10c43c467ce8afd0c4\r\n\r\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\r\n\r\n\t\t// Number of texels to avoid at the edge of each square\r\n\r\n\t\tvec3 absV = abs( v );\r\n\r\n\t\t// Intersect unit cube\r\n\r\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\r\n\t\tabsV *= scaleToCube;\r\n\r\n\t\t// Apply scale to avoid seams\r\n\r\n\t\t// two texels less per square (one texel will do for NEAREST)\r\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\r\n\r\n\t\t// Unwrap\r\n\r\n\t\t// space: -1 ... 1 range for each square\r\n\t\t//\r\n\t\t// #X##\t\tdim := ( 4 , 2 )\r\n\t\t// # #\t\tcenter := ( 1 , 1 )\r\n\r\n\t\tvec2 planar = v.xy;\r\n\r\n\t\tfloat almostATexel = 1.5 * texelSizeY;\r\n\t\tfloat almostOne = 1.0 - almostATexel;\r\n\r\n\t\tif ( absV.z >= almostOne ) {\r\n\r\n\t\t\tif ( v.z > 0.0 )\r\n\t\t\t\tplanar.x = 4.0 - v.x;\r\n\r\n\t\t} else if ( absV.x >= almostOne ) {\r\n\r\n\t\t\tfloat signX = sign( v.x );\r\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\r\n\r\n\t\t} else if ( absV.y >= almostOne ) {\r\n\r\n\t\t\tfloat signY = sign( v.y );\r\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\r\n\t\t\tplanar.y = v.z * signY - 2.0;\r\n\r\n\t\t}\r\n\r\n\t\t// Transform to UV space\r\n\r\n\t\t// scale := 0.5 / dim\r\n\t\t// translate := ( center + 0.5 ) / dim\r\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\r\n\r\n\t}\r\n\r\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\r\n\r\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\r\n\r\n\t\t// for point lights, the uniform @vShadowCoord is re-purposed to hold\r\n\t\t// the vector from the light to the world-space position of the fragment.\r\n\t\tvec3 lightToPosition = shadowCoord.xyz;\r\n\r\n\t\t// dp = normalized distance from light to fragment position\r\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); // need to clamp?\r\n\t\tdp += shadowBias;\r\n\r\n\t\t// bd3D = base direction 3D\r\n\t\tvec3 bd3D = normalize( lightToPosition );\r\n\r\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\r\n\r\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\r\n\r\n\t\t\treturn (\r\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\r\n\t\t\t) * ( 1.0 / 9.0 );\r\n\r\n\t\t#else // no percentage-closer filtering\r\n\r\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\r\n\r\n\t\t#endif\r\n\r\n\t}\r\n\r\n#endif\r\n",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\r\n\r\n\t#if NUM_DIR_LIGHTS > 0\r\n\r\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\r\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\r\n\r\n\t#endif\r\n\r\n\t#if NUM_SPOT_LIGHTS > 0\r\n\r\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\r\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\r\n\r\n\t#endif\r\n\r\n\t#if NUM_POINT_LIGHTS > 0\r\n\r\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\r\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\r\n\r\n\t#endif\r\n\r\n\r\n\r\n#endif\r\n",shadowmap_vertex:"#ifdef USE_SHADOWMAP\r\n\r\n\t#if NUM_DIR_LIGHTS > 0\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\r\n\r\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\r\n\r\n\t}\r\n\r\n\t#endif\r\n\r\n\t#if NUM_SPOT_LIGHTS > 0\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\r\n\r\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\r\n\r\n\t}\r\n\r\n\t#endif\r\n\r\n\t#if NUM_POINT_LIGHTS > 0\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\r\n\r\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\r\n\r\n\t}\r\n\r\n\t#endif\r\n\r\n\r\n\r\n#endif\r\n",shadowmask_pars_fragment:"float getShadowMask() {\r\n\r\n\tfloat shadow = 1.0;\r\n\r\n\t#ifdef USE_SHADOWMAP\r\n\r\n\t#if NUM_DIR_LIGHTS > 0\r\n\r\n\tDirectionalLight directionalLight;\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\r\n\r\n\t\tdirectionalLight = directionalLights[ i ];\r\n\t\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\r\n\r\n\t}\r\n\r\n\t#endif\r\n\r\n\t#if NUM_SPOT_LIGHTS > 0\r\n\r\n\tSpotLight spotLight;\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\r\n\r\n\t\tspotLight = spotLights[ i ];\r\n\t\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\r\n\r\n\t}\r\n\r\n\t#endif\r\n\r\n\t#if NUM_POINT_LIGHTS > 0\r\n\r\n\tPointLight pointLight;\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\r\n\r\n\t\tpointLight = pointLights[ i ];\r\n\t\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\r\n\r\n\t}\r\n\r\n\t#endif\r\n\r\n\r\n\r\n\t#endif\r\n\r\n\treturn shadow;\r\n\r\n}\r\n",skinbase_vertex:"#ifdef USE_SKINNING\r\n\r\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\r\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\r\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\r\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\r\n\r\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\r\n\r\n\tuniform mat4 bindMatrix;\r\n\tuniform mat4 bindMatrixInverse;\r\n\r\n\t#ifdef BONE_TEXTURE\r\n\r\n\t\tuniform sampler2D boneTexture;\r\n\t\tuniform int boneTextureSize;\r\n\r\n\t\tmat4 getBoneMatrix( const in float i ) {\r\n\r\n\t\t\tfloat j = i * 4.0;\r\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\r\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\r\n\r\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\r\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\r\n\r\n\t\t\ty = dy * ( y + 0.5 );\r\n\r\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\r\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\r\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\r\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\r\n\r\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\r\n\r\n\t\t\treturn bone;\r\n\r\n\t\t}\r\n\r\n\t#else\r\n\r\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\r\n\r\n\t\tmat4 getBoneMatrix( const in float i ) {\r\n\r\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\r\n\t\t\treturn bone;\r\n\r\n\t\t}\r\n\r\n\t#endif\r\n\r\n#endif\r\n",skinning_vertex:"#ifdef USE_SKINNING\r\n\r\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\r\n\r\n\tvec4 skinned = vec4( 0.0 );\r\n\tskinned += boneMatX * skinVertex * skinWeight.x;\r\n\tskinned += boneMatY * skinVertex * skinWeight.y;\r\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\r\n\tskinned += boneMatW * skinVertex * skinWeight.w;\r\n\r\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\r\n\r\n#endif\r\n",skinnormal_vertex:"#ifdef USE_SKINNING\r\n\r\n\tmat4 skinMatrix = mat4( 0.0 );\r\n\tskinMatrix += skinWeight.x * boneMatX;\r\n\tskinMatrix += skinWeight.y * boneMatY;\r\n\tskinMatrix += skinWeight.z * boneMatZ;\r\n\tskinMatrix += skinWeight.w * boneMatW;\r\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\r\n\r\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\r\n\r\n#endif\r\n",specularmap_fragment:"float specularStrength;\r\n\r\n#ifdef USE_SPECULARMAP\r\n\r\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\r\n\tspecularStrength = texelSpecular.r;\r\n\r\n#else\r\n\r\n\tspecularStrength = 1.0;\r\n\r\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\r\n\r\n\tuniform sampler2D specularMap;\r\n\r\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\r\n\r\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\r\n\r\n#endif\r\n",tonemapping_pars_fragment:"#ifndef saturate\r\n\t#define saturate(a) clamp( a, 0.0, 1.0 )\r\n#endif\r\n\r\nuniform float toneMappingExposure;\r\nuniform float toneMappingWhitePoint;\r\n\r\n// exposure only\r\nvec3 LinearToneMapping( vec3 color ) {\r\n\r\n\treturn toneMappingExposure * color;\r\n\r\n}\r\n\r\n// source: https://www.cs.utah.edu/~reinhard/cdrom/\r\nvec3 ReinhardToneMapping( vec3 color ) {\r\n\r\n\tcolor *= toneMappingExposure;\r\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\r\n\r\n}\r\n\r\n// source: http://filmicgames.com/archives/75\r\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\r\nvec3 Uncharted2ToneMapping( vec3 color ) {\r\n\r\n\t// John Hable's filmic operator from Uncharted 2 video game\r\n\tcolor *= toneMappingExposure;\r\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\r\n\r\n}\r\n\r\n// source: http://filmicgames.com/archives/75\r\nvec3 OptimizedCineonToneMapping( vec3 color ) {\r\n\r\n\t// optimized filmic operator by Jim Hejl and Richard Burgess-Dawson\r\n\tcolor *= toneMappingExposure;\r\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\r\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\r\n\r\n}\r\n",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\r\n\r\n\tvarying vec2 vUv;\r\n\r\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\r\n\r\n\tvarying vec2 vUv;\r\n\tuniform mat3 uvTransform;\r\n\r\n#endif\r\n",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\r\n\r\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\r\n\r\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\r\n\r\n\tvarying vec2 vUv2;\r\n\r\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\r\n\r\n\tattribute vec2 uv2;\r\n\tvarying vec2 vUv2;\r\n\r\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\r\n\r\n\tvUv2 = uv2;\r\n\r\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\r\n\r\n\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\r\n\r\n#endif\r\n",cube_frag:"uniform samplerCube tCube;\r\nuniform float tFlip;\r\nuniform float opacity;\r\n\r\nvarying vec3 vWorldPosition;\r\n\r\nvoid main() {\r\n\r\n\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\r\n\tgl_FragColor.a *= opacity;\r\n\r\n}\r\n",cube_vert:"varying vec3 vWorldPosition;\r\n\r\n#include <common>\r\n\r\nvoid main() {\r\n\r\n\tvWorldPosition = transformDirection( position, modelMatrix );\r\n\r\n\t#include <begin_vertex>\r\n\t#include <project_vertex>\r\n\r\n\tgl_Position.z = gl_Position.w; // set z to camera.far\r\n\r\n}\r\n",depth_frag:"#if DEPTH_PACKING == 3200\r\n\r\n\tuniform float opacity;\r\n\r\n#endif\r\n\r\n#include <common>\r\n#include <packing>\r\n#include <uv_pars_fragment>\r\n#include <map_pars_fragment>\r\n#include <alphamap_pars_fragment>\r\n#include <logdepthbuf_pars_fragment>\r\n#include <clipping_planes_pars_fragment>\r\n\r\nvoid main() {\r\n\r\n\t#include <clipping_planes_fragment>\r\n\r\n\tvec4 diffuseColor = vec4( 1.0 );\r\n\r\n\t#if DEPTH_PACKING == 3200\r\n\r\n\t\tdiffuseColor.a = opacity;\r\n\r\n\t#endif\r\n\r\n\t#include <map_fragment>\r\n\t#include <alphamap_fragment>\r\n\t#include <alphatest_fragment>\r\n\r\n\t#include <logdepthbuf_fragment>\r\n\r\n\t#if DEPTH_PACKING == 3200\r\n\r\n\t\tgl_FragColor = vec4( vec3( gl_FragCoord.z ), opacity );\r\n\r\n\t#elif DEPTH_PACKING == 3201\r\n\r\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\r\n\r\n\t#endif\r\n\r\n}\r\n",depth_vert:"#include <common>\r\n#include <uv_pars_vertex>\r\n#include <displacementmap_pars_vertex>\r\n#include <morphtarget_pars_vertex>\r\n#include <skinning_pars_vertex>\r\n#include <logdepthbuf_pars_vertex>\r\n#include <clipping_planes_pars_vertex>\r\n\r\nvoid main() {\r\n\r\n\t#include <uv_vertex>\r\n\r\n\t#include <skinbase_vertex>\r\n\r\n\t#ifdef USE_DISPLACEMENTMAP\r\n\r\n\t\t#include <beginnormal_vertex>\r\n\t\t#include <morphnormal_vertex>\r\n\t\t#include <skinnormal_vertex>\r\n\r\n\t#endif\r\n\r\n\t#include <begin_vertex>\r\n\t#include <morphtarget_vertex>\r\n\t#include <skinning_vertex>\r\n\t#include <displacementmap_vertex>\r\n\t#include <project_vertex>\r\n\t#include <logdepthbuf_vertex>\r\n\t#include <clipping_planes_vertex>\r\n\r\n}\r\n",distanceRGBA_frag:"#define DISTANCE\r\n\r\nuniform vec3 referencePosition;\r\nuniform float nearDistance;\r\nuniform float farDistance;\r\nvarying vec3 vWorldPosition;\r\n\r\n#include <common>\r\n#include <packing>\r\n#include <uv_pars_fragment>\r\n#include <map_pars_fragment>\r\n#include <alphamap_pars_fragment>\r\n#include <clipping_planes_pars_fragment>\r\n\r\nvoid main () {\r\n\r\n\t#include <clipping_planes_fragment>\r\n\r\n\tvec4 diffuseColor = vec4( 1.0 );\r\n\r\n\t#include <map_fragment>\r\n\t#include <alphamap_fragment>\r\n\t#include <alphatest_fragment>\r\n\r\n\tfloat dist = length( vWorldPosition - referencePosition );\r\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\r\n\tdist = saturate( dist ); // clamp to [ 0, 1 ]\r\n\r\n\tgl_FragColor = packDepthToRGBA( dist );\r\n\r\n}\r\n",distanceRGBA_vert:"#define DISTANCE\r\n\r\nvarying vec3 vWorldPosition;\r\n\r\n#include <common>\r\n#include <uv_pars_vertex>\r\n#include <displacementmap_pars_vertex>\r\n#include <morphtarget_pars_vertex>\r\n#include <skinning_pars_vertex>\r\n#include <clipping_planes_pars_vertex>\r\n\r\nvoid main() {\r\n\r\n\t#include <uv_vertex>\r\n\r\n\t#include <skinbase_vertex>\r\n\r\n\t#ifdef USE_DISPLACEMENTMAP\r\n\r\n\t\t#include <beginnormal_vertex>\r\n\t\t#include <morphnormal_vertex>\r\n\t\t#include <skinnormal_vertex>\r\n\r\n\t#endif\r\n\r\n\t#include <begin_vertex>\r\n\t#include <morphtarget_vertex>\r\n\t#include <skinning_vertex>\r\n\t#include <displacementmap_vertex>\r\n\t#include <project_vertex>\r\n\t#include <worldpos_vertex>\r\n\t#include <clipping_planes_vertex>\r\n\r\n\tvWorldPosition = worldPosition.xyz;\r\n\r\n}\r\n",equirect_frag:"uniform sampler2D tEquirect;\r\n\r\nvarying vec3 vWorldPosition;\r\n\r\n#include <common>\r\n\r\nvoid main() {\r\n\r\n\tvec3 direction = normalize( vWorldPosition );\r\n\r\n\tvec2 sampleUV;\r\n\r\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\r\n\r\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\r\n\r\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\r\n\r\n}\r\n",equirect_vert:"varying vec3 vWorldPosition;\r\n\r\n#include <common>\r\n\r\nvoid main() {\r\n\r\n\tvWorldPosition = transformDirection( position, modelMatrix );\r\n\r\n\t#include <begin_vertex>\r\n\t#include <project_vertex>\r\n\r\n}\r\n",linedashed_frag:"uniform vec3 diffuse;\r\nuniform float opacity;\r\n\r\nuniform float dashSize;\r\nuniform float totalSize;\r\n\r\nvarying float vLineDistance;\r\n\r\n#include <common>\r\n#include <color_pars_fragment>\r\n#include <fog_pars_fragment>\r\n#include <logdepthbuf_pars_fragment>\r\n#include <clipping_planes_pars_fragment>\r\n\r\nvoid main() {\r\n\r\n\t#include <clipping_planes_fragment>\r\n\r\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\r\n\r\n\t\tdiscard;\r\n\r\n\t}\r\n\r\n\tvec3 outgoingLight = vec3( 0.0 );\r\n\tvec4 diffuseColor = vec4( diffuse, opacity );\r\n\r\n\t#include <logdepthbuf_fragment>\r\n\t#include <color_fragment>\r\n\r\n\toutgoingLight = diffuseColor.rgb; // simple shader\r\n\r\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\r\n\r\n\t#include <premultiplied_alpha_fragment>\r\n\t#include <tonemapping_fragment>\r\n\t#include <encodings_fragment>\r\n\t#include <fog_fragment>\r\n\r\n}\r\n",linedashed_vert:"uniform float scale;\r\nattribute float lineDistance;\r\n\r\nvarying float vLineDistance;\r\n\r\n#include <common>\r\n#include <color_pars_vertex>\r\n#include <fog_pars_vertex>\r\n#include <logdepthbuf_pars_vertex>\r\n#include <clipping_planes_pars_vertex>\r\n\r\nvoid main() {\r\n\r\n\t#include <color_vertex>\r\n\r\n\tvLineDistance = scale * lineDistance;\r\n\r\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\r\n\tgl_Position = projectionMatrix * mvPosition;\r\n\r\n\t#include <logdepthbuf_vertex>\r\n\t#include <clipping_planes_vertex>\r\n\t#include <fog_vertex>\r\n\r\n}\r\n",meshbasic_frag:"uniform vec3 diffuse;\r\nuniform float opacity;\r\n\r\n#ifndef FLAT_SHADED\r\n\r\n\tvarying vec3 vNormal;\r\n\r\n#endif\r\n\r\n#include <common>\r\n#include <color_pars_fragment>\r\n#include <uv_pars_fragment>\r\n#include <uv2_pars_fragment>\r\n#include <map_pars_fragment>\r\n#include <alphamap_pars_fragment>\r\n#include <aomap_pars_fragment>\r\n#include <lightmap_pars_fragment>\r\n#include <envmap_pars_fragment>\r\n#include <fog_pars_fragment>\r\n#include <specularmap_pars_fragment>\r\n#include <logdepthbuf_pars_fragment>\r\n#include <clipping_planes_pars_fragment>\r\n\r\nvoid main() {\r\n\r\n\t#include <clipping_planes_fragment>\r\n\r\n\tvec4 diffuseColor = vec4( diffuse, opacity );\r\n\r\n\t#include <logdepthbuf_fragment>\r\n\t#include <map_fragment>\r\n\t#include <color_fragment>\r\n\t#include <alphamap_fragment>\r\n\t#include <alphatest_fragment>\r\n\t#include <specularmap_fragment>\r\n\r\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\r\n\r\n\t// accumulation (baked indirect lighting only)\r\n\t#ifdef USE_LIGHTMAP\r\n\r\n\t\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\r\n\r\n\t#else\r\n\r\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\r\n\r\n\t#endif\r\n\r\n\t// modulation\r\n\t#include <aomap_fragment>\r\n\r\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\r\n\r\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\r\n\r\n\t#include <envmap_fragment>\r\n\r\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\r\n\r\n\t#include <premultiplied_alpha_fragment>\r\n\t#include <tonemapping_fragment>\r\n\t#include <encodings_fragment>\r\n\t#include <fog_fragment>\r\n\r\n}\r\n",meshbasic_vert:"#include <common>\r\n#include <uv_pars_vertex>\r\n#include <uv2_pars_vertex>\r\n#include <envmap_pars_vertex>\r\n#include <color_pars_vertex>\r\n#include <fog_pars_vertex>\r\n#include <morphtarget_pars_vertex>\r\n#include <skinning_pars_vertex>\r\n#include <logdepthbuf_pars_vertex>\r\n#include <clipping_planes_pars_vertex>\r\n\r\nvoid main() {\r\n\r\n\t#include <uv_vertex>\r\n\t#include <uv2_vertex>\r\n\t#include <color_vertex>\r\n\t#include <skinbase_vertex>\r\n\r\n\t#ifdef USE_ENVMAP\r\n\r\n\t#include <beginnormal_vertex>\r\n\t#include <morphnormal_vertex>\r\n\t#include <skinnormal_vertex>\r\n\t#include <defaultnormal_vertex>\r\n\r\n\t#endif\r\n\r\n\t#include <begin_vertex>\r\n\t#include <morphtarget_vertex>\r\n\t#include <skinning_vertex>\r\n\t#include <project_vertex>\r\n\t#include <logdepthbuf_vertex>\r\n\r\n\t#include <worldpos_vertex>\r\n\t#include <clipping_planes_vertex>\r\n\t#include <envmap_vertex>\r\n\t#include <fog_vertex>\r\n\r\n}\r\n",meshlambert_frag:"uniform vec3 diffuse;\r\nuniform vec3 emissive;\r\nuniform float opacity;\r\n\r\nvarying vec3 vLightFront;\r\n\r\n#ifdef DOUBLE_SIDED\r\n\r\n\tvarying vec3 vLightBack;\r\n\r\n#endif\r\n\r\n#include <common>\r\n#include <packing>\r\n#include <dithering_pars_fragment>\r\n#include <color_pars_fragment>\r\n#include <uv_pars_fragment>\r\n#include <uv2_pars_fragment>\r\n#include <map_pars_fragment>\r\n#include <alphamap_pars_fragment>\r\n#include <aomap_pars_fragment>\r\n#include <lightmap_pars_fragment>\r\n#include <emissivemap_pars_fragment>\r\n#include <envmap_pars_fragment>\r\n#include <bsdfs>\r\n#include <lights_pars>\r\n#include <fog_pars_fragment>\r\n#include <shadowmap_pars_fragment>\r\n#include <shadowmask_pars_fragment>\r\n#include <specularmap_pars_fragment>\r\n#include <logdepthbuf_pars_fragment>\r\n#include <clipping_planes_pars_fragment>\r\n\r\nvoid main() {\r\n\r\n\t#include <clipping_planes_fragment>\r\n\r\n\tvec4 diffuseColor = vec4( diffuse, opacity );\r\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\r\n\tvec3 totalEmissiveRadiance = emissive;\r\n\r\n\t#include <logdepthbuf_fragment>\r\n\t#include <map_fragment>\r\n\t#include <color_fragment>\r\n\t#include <alphamap_fragment>\r\n\t#include <alphatest_fragment>\r\n\t#include <specularmap_fragment>\r\n\t#include <emissivemap_fragment>\r\n\r\n\t// accumulation\r\n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\r\n\r\n\t#include <lightmap_fragment>\r\n\r\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\r\n\r\n\t#ifdef DOUBLE_SIDED\r\n\r\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\r\n\r\n\t#else\r\n\r\n\t\treflectedLight.directDiffuse = vLightFront;\r\n\r\n\t#endif\r\n\r\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\r\n\r\n\t// modulation\r\n\t#include <aomap_fragment>\r\n\r\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\r\n\r\n\t#include <envmap_fragment>\r\n\r\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\r\n\r\n\t#include <tonemapping_fragment>\r\n\t#include <encodings_fragment>\r\n\t#include <fog_fragment>\r\n\t#include <premultiplied_alpha_fragment>\r\n\t#include <dithering_fragment>\r\n\r\n}\r\n",meshlambert_vert:"#define LAMBERT\r\n\r\nvarying vec3 vLightFront;\r\n\r\n#ifdef DOUBLE_SIDED\r\n\r\n\tvarying vec3 vLightBack;\r\n\r\n#endif\r\n\r\n#include <common>\r\n#include <uv_pars_vertex>\r\n#include <uv2_pars_vertex>\r\n#include <envmap_pars_vertex>\r\n#include <bsdfs>\r\n#include <lights_pars>\r\n#include <color_pars_vertex>\r\n#include <fog_pars_vertex>\r\n#include <morphtarget_pars_vertex>\r\n#include <skinning_pars_vertex>\r\n#include <shadowmap_pars_vertex>\r\n#include <logdepthbuf_pars_vertex>\r\n#include <clipping_planes_pars_vertex>\r\n\r\nvoid main() {\r\n\r\n\t#include <uv_vertex>\r\n\t#include <uv2_vertex>\r\n\t#include <color_vertex>\r\n\r\n\t#include <beginnormal_vertex>\r\n\t#include <morphnormal_vertex>\r\n\t#include <skinbase_vertex>\r\n\t#include <skinnormal_vertex>\r\n\t#include <defaultnormal_vertex>\r\n\r\n\t#include <begin_vertex>\r\n\t#include <morphtarget_vertex>\r\n\t#include <skinning_vertex>\r\n\t#include <project_vertex>\r\n\t#include <logdepthbuf_vertex>\r\n\t#include <clipping_planes_vertex>\r\n\r\n\t#include <worldpos_vertex>\r\n\t#include <envmap_vertex>\r\n\t#include <lights_lambert_vertex>\r\n\t#include <shadowmap_vertex>\r\n\t#include <fog_vertex>\r\n\r\n}\r\n",meshphong_frag:"#define PHONG\r\n\r\nuniform vec3 diffuse;\r\nuniform vec3 emissive;\r\nuniform vec3 specular;\r\nuniform float shininess;\r\nuniform float opacity;\r\n\r\n#include <common>\r\n#include <packing>\r\n#include <dithering_pars_fragment>\r\n#include <color_pars_fragment>\r\n#include <uv_pars_fragment>\r\n#include <uv2_pars_fragment>\r\n#include <map_pars_fragment>\r\n#include <alphamap_pars_fragment>\r\n#include <aomap_pars_fragment>\r\n#include <lightmap_pars_fragment>\r\n#include <emissivemap_pars_fragment>\r\n#include <envmap_pars_fragment>\r\n#include <gradientmap_pars_fragment>\r\n#include <fog_pars_fragment>\r\n#include <bsdfs>\r\n#include <lights_pars>\r\n#include <lights_phong_pars_fragment>\r\n#include <shadowmap_pars_fragment>\r\n#include <bumpmap_pars_fragment>\r\n#include <normalmap_pars_fragment>\r\n#include <specularmap_pars_fragment>\r\n#include <logdepthbuf_pars_fragment>\r\n#include <clipping_planes_pars_fragment>\r\n\r\nvoid main() {\r\n\r\n\t#include <clipping_planes_fragment>\r\n\r\n\tvec4 diffuseColor = vec4( diffuse, opacity );\r\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\r\n\tvec3 totalEmissiveRadiance = emissive;\r\n\r\n\t#include <logdepthbuf_fragment>\r\n\t#include <map_fragment>\r\n\t#include <color_fragment>\r\n\t#include <alphamap_fragment>\r\n\t#include <alphatest_fragment>\r\n\t#include <specularmap_fragment>\r\n\t#include <normal_fragment>\r\n\t#include <emissivemap_fragment>\r\n\r\n\t// accumulation\r\n\t#include <lights_phong_fragment>\r\n\t#include <lights_template>\r\n\r\n\t// modulation\r\n\t#include <aomap_fragment>\r\n\r\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\r\n\r\n\t#include <envmap_fragment>\r\n\r\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\r\n\r\n\t#include <tonemapping_fragment>\r\n\t#include <encodings_fragment>\r\n\t#include <fog_fragment>\r\n\t#include <premultiplied_alpha_fragment>\r\n\t#include <dithering_fragment>\r\n\r\n}\r\n",meshphong_vert:"#define PHONG\r\n\r\nvarying vec3 vViewPosition;\r\n\r\n#ifndef FLAT_SHADED\r\n\r\n\tvarying vec3 vNormal;\r\n\r\n#endif\r\n\r\n#include <common>\r\n#include <uv_pars_vertex>\r\n#include <uv2_pars_vertex>\r\n#include <displacementmap_pars_vertex>\r\n#include <envmap_pars_vertex>\r\n#include <color_pars_vertex>\r\n#include <fog_pars_vertex>\r\n#include <morphtarget_pars_vertex>\r\n#include <skinning_pars_vertex>\r\n#include <shadowmap_pars_vertex>\r\n#include <logdepthbuf_pars_vertex>\r\n#include <clipping_planes_pars_vertex>\r\n\r\nvoid main() {\r\n\r\n\t#include <uv_vertex>\r\n\t#include <uv2_vertex>\r\n\t#include <color_vertex>\r\n\r\n\t#include <beginnormal_vertex>\r\n\t#include <morphnormal_vertex>\r\n\t#include <skinbase_vertex>\r\n\t#include <skinnormal_vertex>\r\n\t#include <defaultnormal_vertex>\r\n\r\n#ifndef FLAT_SHADED // Normal computed with derivatives when FLAT_SHADED\r\n\r\n\tvNormal = normalize( transformedNormal );\r\n\r\n#endif\r\n\r\n\t#include <begin_vertex>\r\n\t#include <morphtarget_vertex>\r\n\t#include <skinning_vertex>\r\n\t#include <displacementmap_vertex>\r\n\t#include <project_vertex>\r\n\t#include <logdepthbuf_vertex>\r\n\t#include <clipping_planes_vertex>\r\n\r\n\tvViewPosition = - mvPosition.xyz;\r\n\r\n\t#include <worldpos_vertex>\r\n\t#include <envmap_vertex>\r\n\t#include <shadowmap_vertex>\r\n\t#include <fog_vertex>\r\n\r\n}\r\n",meshphysical_frag:"#define PHYSICAL\r\n\r\nuniform vec3 diffuse;\r\nuniform vec3 emissive;\r\nuniform float roughness;\r\nuniform float metalness;\r\nuniform float opacity;\r\n\r\n#ifndef STANDARD\r\n\tuniform float clearCoat;\r\n\tuniform float clearCoatRoughness;\r\n#endif\r\n\r\nvarying vec3 vViewPosition;\r\n\r\n#ifndef FLAT_SHADED\r\n\r\n\tvarying vec3 vNormal;\r\n\r\n#endif\r\n\r\n#include <common>\r\n#include <packing>\r\n#include <dithering_pars_fragment>\r\n#include <color_pars_fragment>\r\n#include <uv_pars_fragment>\r\n#include <uv2_pars_fragment>\r\n#include <map_pars_fragment>\r\n#include <alphamap_pars_fragment>\r\n#include <aomap_pars_fragment>\r\n#include <lightmap_pars_fragment>\r\n#include <emissivemap_pars_fragment>\r\n#include <envmap_pars_fragment>\r\n#include <fog_pars_fragment>\r\n#include <bsdfs>\r\n#include <cube_uv_reflection_fragment>\r\n#include <lights_pars>\r\n#include <lights_physical_pars_fragment>\r\n#include <shadowmap_pars_fragment>\r\n#include <bumpmap_pars_fragment>\r\n#include <normalmap_pars_fragment>\r\n#include <roughnessmap_pars_fragment>\r\n#include <metalnessmap_pars_fragment>\r\n#include <logdepthbuf_pars_fragment>\r\n#include <clipping_planes_pars_fragment>\r\n\r\nvoid main() {\r\n\r\n\t#include <clipping_planes_fragment>\r\n\r\n\tvec4 diffuseColor = vec4( diffuse, opacity );\r\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\r\n\tvec3 totalEmissiveRadiance = emissive;\r\n\r\n\t#include <logdepthbuf_fragment>\r\n\t#include <map_fragment>\r\n\t#include <color_fragment>\r\n\t#include <alphamap_fragment>\r\n\t#include <alphatest_fragment>\r\n\t#include <roughnessmap_fragment>\r\n\t#include <metalnessmap_fragment>\r\n\t#include <normal_fragment>\r\n\t#include <emissivemap_fragment>\r\n\r\n\t// accumulation\r\n\t#include <lights_physical_fragment>\r\n\t#include <lights_template>\r\n\r\n\t// modulation\r\n\t#include <aomap_fragment>\r\n\r\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\r\n\r\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\r\n\r\n\t#include <tonemapping_fragment>\r\n\t#include <encodings_fragment>\r\n\t#include <fog_fragment>\r\n\t#include <premultiplied_alpha_fragment>\r\n\t#include <dithering_fragment>\r\n\r\n}\r\n",meshphysical_vert:"#define PHYSICAL\r\n\r\nvarying vec3 vViewPosition;\r\n\r\n#ifndef FLAT_SHADED\r\n\r\n\tvarying vec3 vNormal;\r\n\r\n#endif\r\n\r\n#include <common>\r\n#include <uv_pars_vertex>\r\n#include <uv2_pars_vertex>\r\n#include <displacementmap_pars_vertex>\r\n#include <color_pars_vertex>\r\n#include <fog_pars_vertex>\r\n#include <morphtarget_pars_vertex>\r\n#include <skinning_pars_vertex>\r\n#include <shadowmap_pars_vertex>\r\n#include <logdepthbuf_pars_vertex>\r\n#include <clipping_planes_pars_vertex>\r\n\r\nvoid main() {\r\n\r\n\t#include <uv_vertex>\r\n\t#include <uv2_vertex>\r\n\t#include <color_vertex>\r\n\r\n\t#include <beginnormal_vertex>\r\n\t#include <morphnormal_vertex>\r\n\t#include <skinbase_vertex>\r\n\t#include <skinnormal_vertex>\r\n\t#include <defaultnormal_vertex>\r\n\r\n#ifndef FLAT_SHADED // Normal computed with derivatives when FLAT_SHADED\r\n\r\n\tvNormal = normalize( transformedNormal );\r\n\r\n#endif\r\n\r\n\t#include <begin_vertex>\r\n\t#include <morphtarget_vertex>\r\n\t#include <skinning_vertex>\r\n\t#include <displacementmap_vertex>\r\n\t#include <project_vertex>\r\n\t#include <logdepthbuf_vertex>\r\n\t#include <clipping_planes_vertex>\r\n\r\n\tvViewPosition = - mvPosition.xyz;\r\n\r\n\t#include <worldpos_vertex>\r\n\t#include <shadowmap_vertex>\r\n\t#include <fog_vertex>\r\n\r\n}\r\n",normal_frag:"#define NORMAL\r\n\r\nuniform float opacity;\r\n\r\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\r\n\r\n\tvarying vec3 vViewPosition;\r\n\r\n#endif\r\n\r\n#ifndef FLAT_SHADED\r\n\r\n\tvarying vec3 vNormal;\r\n\r\n#endif\r\n\r\n#include <packing>\r\n#include <uv_pars_fragment>\r\n#include <bumpmap_pars_fragment>\r\n#include <normalmap_pars_fragment>\r\n#include <logdepthbuf_pars_fragment>\r\n\r\nvoid main() {\r\n\r\n\t#include <logdepthbuf_fragment>\r\n\t#include <normal_fragment>\r\n\r\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\r\n\r\n}\r\n",normal_vert:"#define NORMAL\r\n\r\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\r\n\r\n\tvarying vec3 vViewPosition;\r\n\r\n#endif\r\n\r\n#ifndef FLAT_SHADED\r\n\r\n\tvarying vec3 vNormal;\r\n\r\n#endif\r\n\r\n#include <uv_pars_vertex>\r\n#include <displacementmap_pars_vertex>\r\n#include <morphtarget_pars_vertex>\r\n#include <skinning_pars_vertex>\r\n#include <logdepthbuf_pars_vertex>\r\n\r\nvoid main() {\r\n\r\n\t#include <uv_vertex>\r\n\r\n\t#include <beginnormal_vertex>\r\n\t#include <morphnormal_vertex>\r\n\t#include <skinbase_vertex>\r\n\t#include <skinnormal_vertex>\r\n\t#include <defaultnormal_vertex>\r\n\r\n#ifndef FLAT_SHADED // Normal computed with derivatives when FLAT_SHADED\r\n\r\n\tvNormal = normalize( transformedNormal );\r\n\r\n#endif\r\n\r\n\t#include <begin_vertex>\r\n\t#include <morphtarget_vertex>\r\n\t#include <skinning_vertex>\r\n\t#include <displacementmap_vertex>\r\n\t#include <project_vertex>\r\n\t#include <logdepthbuf_vertex>\r\n\r\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\r\n\r\n\tvViewPosition = - mvPosition.xyz;\r\n\r\n#endif\r\n\r\n}\r\n",points_frag:"uniform vec3 diffuse;\r\nuniform float opacity;\r\n\r\n#include <common>\r\n#include <packing>\r\n#include <color_pars_fragment>\r\n#include <map_particle_pars_fragment>\r\n#include <fog_pars_fragment>\r\n#include <shadowmap_pars_fragment>\r\n#include <logdepthbuf_pars_fragment>\r\n#include <clipping_planes_pars_fragment>\r\n\r\nvoid main() {\r\n\r\n\t#include <clipping_planes_fragment>\r\n\r\n\tvec3 outgoingLight = vec3( 0.0 );\r\n\tvec4 diffuseColor = vec4( diffuse, opacity );\r\n\r\n\t#include <logdepthbuf_fragment>\r\n\t#include <map_particle_fragment>\r\n\t#include <color_fragment>\r\n\t#include <alphatest_fragment>\r\n\r\n\toutgoingLight = diffuseColor.rgb;\r\n\r\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\r\n\r\n\t#include <premultiplied_alpha_fragment>\r\n\t#include <tonemapping_fragment>\r\n\t#include <encodings_fragment>\r\n\t#include <fog_fragment>\r\n\r\n}\r\n",points_vert:"uniform float size;\r\nuniform float scale;\r\n\r\n#include <common>\r\n#include <color_pars_vertex>\r\n#include <fog_pars_vertex>\r\n#include <shadowmap_pars_vertex>\r\n#include <logdepthbuf_pars_vertex>\r\n#include <clipping_planes_pars_vertex>\r\n\r\nvoid main() {\r\n\r\n\t#include <color_vertex>\r\n\t#include <begin_vertex>\r\n\t#include <project_vertex>\r\n\r\n\t#ifdef USE_SIZEATTENUATION\r\n\t\tgl_PointSize = size * ( scale / - mvPosition.z );\r\n\t#else\r\n\t\tgl_PointSize = size;\r\n\t#endif\r\n\r\n\t#include <logdepthbuf_vertex>\r\n\t#include <clipping_planes_vertex>\r\n\t#include <worldpos_vertex>\r\n\t#include <shadowmap_vertex>\r\n\t#include <fog_vertex>\r\n\r\n}\r\n",shadow_frag:"uniform vec3 color;\r\nuniform float opacity;\r\n\r\n#include <common>\r\n#include <packing>\r\n#include <fog_pars_fragment>\r\n#include <bsdfs>\r\n#include <lights_pars>\r\n#include <shadowmap_pars_fragment>\r\n#include <shadowmask_pars_fragment>\r\n\r\nvoid main() {\r\n\r\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\r\n\r\n\t#include <fog_fragment>\r\n\r\n}\r\n",shadow_vert:"#include <fog_pars_vertex>\r\n#include <shadowmap_pars_vertex>\r\n\r\nvoid main() {\r\n\r\n\t#include <begin_vertex>\r\n\t#include <project_vertex>\r\n\t#include <worldpos_vertex>\r\n\t#include <shadowmap_vertex>\r\n\t#include <fog_vertex>\r\n\r\n}\r\n"},ve={basic:{uniforms:ge.merge([me.common,me.specularmap,me.envmap,me.aomap,me.lightmap,me.fog]),vertexShader:ye.meshbasic_vert,fragmentShader:ye.meshbasic_frag},lambert:{uniforms:ge.merge([me.common,me.specularmap,me.envmap,me.aomap,me.lightmap,me.emissivemap,me.fog,me.lights,{emissive:{value:new fe(0)}}]),vertexShader:ye.meshlambert_vert,fragmentShader:ye.meshlambert_frag},phong:{uniforms:ge.merge([me.common,me.specularmap,me.envmap,me.aomap,me.lightmap,me.emissivemap,me.bumpmap,me.normalmap,me.displacementmap,me.gradientmap,me.fog,me.lights,{emissive:{value:new fe(0)},specular:{value:new fe(1118481)},shininess:{value:30}}]),vertexShader:ye.meshphong_vert,fragmentShader:ye.meshphong_frag},standard:{uniforms:ge.merge([me.common,me.envmap,me.aomap,me.lightmap,me.emissivemap,me.bumpmap,me.normalmap,me.displacementmap,me.roughnessmap,me.metalnessmap,me.fog,me.lights,{emissive:{value:new fe(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:ye.meshphysical_vert,fragmentShader:ye.meshphysical_frag},points:{uniforms:ge.merge([me.points,me.fog]),vertexShader:ye.points_vert,fragmentShader:ye.points_frag},dashed:{uniforms:ge.merge([me.common,me.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ye.linedashed_vert,fragmentShader:ye.linedashed_frag},depth:{uniforms:ge.merge([me.common,me.displacementmap]),vertexShader:ye.depth_vert,fragmentShader:ye.depth_frag},normal:{uniforms:ge.merge([me.common,me.bumpmap,me.normalmap,me.displacementmap,{opacity:{value:1}}]),vertexShader:ye.normal_vert,fragmentShader:ye.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:ye.cube_vert,fragmentShader:ye.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ye.equirect_vert,fragmentShader:ye.equirect_frag},distanceRGBA:{uniforms:ge.merge([me.common,me.displacementmap,{referencePosition:{value:new b},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:ye.distanceRGBA_vert,fragmentShader:ye.distanceRGBA_frag},shadow:{uniforms:ge.merge([me.lights,me.fog,{color:{value:new fe(0)},opacity:{value:1}}]),vertexShader:ye.shadow_vert,fragmentShader:ye.shadow_frag}};function be(e,t,n,r,i,o,a,s,c){E.call(this,e,t,n,r,i,o,a,s,c),this.needsUpdate=!0}function _e(e,t,n,r,i){var o,a,s,c,l,u,h=new b,d=new v,p=new b;function f(){var e=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),n=new Uint16Array([0,1,2,0,2,3]);o=t.createBuffer(),a=t.createBuffer(),t.bindBuffer(t.ARRAY_BUFFER,o),t.bufferData(t.ARRAY_BUFFER,e,t.STATIC_DRAW),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,a),t.bufferData(t.ELEMENT_ARRAY_BUFFER,n,t.STATIC_DRAW),s=function(){var e=t.createProgram(),n=t.createShader(t.VERTEX_SHADER),r=t.createShader(t.FRAGMENT_SHADER);return t.shaderSource(n,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 center;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float fogDepth;","void main() {","\tvUV = uvOffset + uv * uvScale;","\tvec2 alignedPosition = ( position - center ) * scale;","\tvec2 rotatedPosition;","\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","\tvec4 mvPosition;","\tmvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","\tmvPosition.xy += rotatedPosition;","\tgl_Position = projectionMatrix * mvPosition;","\tfogDepth = - mvPosition.z;","}"].join("\n")),t.shaderSource(r,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","varying float fogDepth;","void main() {","\tvec4 texture = texture2D( map, vUV );","\tgl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","\tif ( gl_FragColor.a < alphaTest ) discard;","\tif ( fogType > 0 ) {","\t\tfloat fogFactor = 0.0;","\t\tif ( fogType == 1 ) {","\t\t\tfogFactor = smoothstep( fogNear, fogFar, fogDepth );","\t\t} else {","\t\t\tconst float LOG2 = 1.442695;","\t\t\tfogFactor = exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 );","\t\t\tfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","\t\t}","\t\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );","\t}","}"].join("\n")),t.compileShader(n),t.compileShader(r),t.attachShader(e,n),t.attachShader(e,r),t.linkProgram(e),e}(),c={position:t.getAttribLocation(s,"position"),uv:t.getAttribLocation(s,"uv")},l={uvOffset:t.getUniformLocation(s,"uvOffset"),uvScale:t.getUniformLocation(s,"uvScale"),rotation:t.getUniformLocation(s,"rotation"),center:t.getUniformLocation(s,"center"),scale:t.getUniformLocation(s,"scale"),color:t.getUniformLocation(s,"color"),map:t.getUniformLocation(s,"map"),opacity:t.getUniformLocation(s,"opacity"),modelViewMatrix:t.getUniformLocation(s,"modelViewMatrix"),projectionMatrix:t.getUniformLocation(s,"projectionMatrix"),fogType:t.getUniformLocation(s,"fogType"),fogDensity:t.getUniformLocation(s,"fogDensity"),fogNear:t.getUniformLocation(s,"fogNear"),fogFar:t.getUniformLocation(s,"fogFar"),fogColor:t.getUniformLocation(s,"fogColor"),fogDepth:t.getUniformLocation(s,"fogDepth"),alphaTest:t.getUniformLocation(s,"alphaTest")};var r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=8,r.height=8;var h=r.getContext("2d");h.fillStyle="white",h.fillRect(0,0,8,8),u=new be(r)}function m(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:t.id-e.id}this.render=function(i,g,y){if(0!==i.length){void 0===s&&f(),n.useProgram(s),n.initAttributes(),n.enableAttribute(c.position),n.enableAttribute(c.uv),n.disableUnusedAttributes(),n.disable(t.CULL_FACE),n.enable(t.BLEND),t.bindBuffer(t.ARRAY_BUFFER,o),t.vertexAttribPointer(c.position,2,t.FLOAT,!1,16,0),t.vertexAttribPointer(c.uv,2,t.FLOAT,!1,16,8),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,a),t.uniformMatrix4fv(l.projectionMatrix,!1,y.projectionMatrix.elements),n.activeTexture(t.TEXTURE0),t.uniform1i(l.map,0);var v=0,b=0,_=g.fog;_?(t.uniform3f(l.fogColor,_.color.r,_.color.g,_.color.b),_.isFog?(t.uniform1f(l.fogNear,_.near),t.uniform1f(l.fogFar,_.far),t.uniform1i(l.fogType,1),v=1,b=1):_.isFogExp2&&(t.uniform1f(l.fogDensity,_.density),t.uniform1i(l.fogType,2),v=2,b=2)):(t.uniform1i(l.fogType,0),v=0,b=0);for(var w=0,E=i.length;w<E;w++){(S=i[w]).modelViewMatrix.multiplyMatrices(y.matrixWorldInverse,S.matrixWorld),S.z=-S.modelViewMatrix.elements[14]}i.sort(m);var A=[],x=[];for(w=0,E=i.length;w<E;w++){var S,T=(S=i[w]).material;if(!1!==T.visible){S.onBeforeRender(e,g,y,void 0,T,void 0),t.uniform1f(l.alphaTest,T.alphaTest),t.uniformMatrix4fv(l.modelViewMatrix,!1,S.modelViewMatrix.elements),S.matrixWorld.decompose(h,d,p),A[0]=p.x,A[1]=p.y,x[0]=S.center.x-.5,x[1]=S.center.y-.5;var M=0;g.fog&&T.fog&&(M=b),v!==M&&(t.uniform1i(l.fogType,M),v=M),null!==T.map?(t.uniform2f(l.uvOffset,T.map.offset.x,T.map.offset.y),t.uniform2f(l.uvScale,T.map.repeat.x,T.map.repeat.y)):(t.uniform2f(l.uvOffset,0,0),t.uniform2f(l.uvScale,1,1)),t.uniform1f(l.opacity,T.opacity),t.uniform3f(l.color,T.color.r,T.color.g,T.color.b),t.uniform1f(l.rotation,T.rotation),t.uniform2fv(l.center,x),t.uniform2fv(l.scale,A),n.setBlending(T.blending,T.blendEquation,T.blendSrc,T.blendDst,T.blendEquationAlpha,T.blendSrcAlpha,T.blendDstAlpha,T.premultipliedAlpha),n.buffers.depth.setTest(T.depthTest),n.buffers.depth.setMask(T.depthWrite),n.buffers.color.setMask(T.colorWrite),r.setTexture2D(T.map||u,0),t.drawElements(t.TRIANGLES,6,t.UNSIGNED_SHORT,0),S.onAfterRender(e,g,y,void 0,T,void 0)}}n.enable(t.CULL_FACE),n.reset()}}}ve.physical={uniforms:ge.merge([ve.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:ye.meshphysical_vert,fragmentShader:ye.meshphysical_frag},be.prototype=Object.create(E.prototype),be.prototype.constructor=be;var we,Ee,Ae,xe,Se,Te,Me,Re=0;function Ce(){Object.defineProperty(this,"id",{value:Re++}),this.uuid=m.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=1,this.side=0,this.flatShading=!1,this.vertexColors=0,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this.userData={},this.needsUpdate=!0}function ke(e){Ce.call(this),this.type="MeshDepthMaterial",this.depthPacking=3200,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(e)}function Ie(e){Ce.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new b,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.lights=!1,this.setValues(e)}function Pe(e,t){this.min=void 0!==e?e:new b(1/0,1/0,1/0),this.max=void 0!==t?t:new b(-1/0,-1/0,-1/0)}function Oe(e,t){this.center=void 0!==e?e:new b,this.radius=void 0!==t?t:0}function Ne(e,t){this.normal=void 0!==e?e:new b(1,0,0),this.constant=void 0!==t?t:0}function De(e,t,n,r,i,o){this.planes=[void 0!==e?e:new Ne,void 0!==t?t:new Ne,void 0!==n?n:new Ne,void 0!==r?r:new Ne,void 0!==i?i:new Ne,void 0!==o?o:new Ne]}function Le(e,t,n){for(var r=new De,i=new y,o=new g,a=new g(n,n),s=new b,c=new b,l=new Array(4),u=new Array(4),h={},d={0:1,1:0,2:2},p=[new b(1,0,0),new b(-1,0,0),new b(0,0,1),new b(0,0,-1),new b(0,1,0),new b(0,-1,0)],f=[new b(0,1,0),new b(0,1,0),new b(0,1,0),new b(0,1,0),new b(0,0,1),new b(0,0,-1)],m=[new A,new A,new A,new A,new A,new A],v=0;4!==v;++v){var _=0!=(1&v),w=0!=(2&v),E=new ke({depthPacking:3201,morphTargets:_,skinning:w});l[v]=E;var S=new Ie({morphTargets:_,skinning:w});u[v]=S}var T=this;function M(t,n,r,i,o,a){var s=t.geometry,c=null,p=l,f=t.customDepthMaterial;if(r&&(p=u,f=t.customDistanceMaterial),f)c=f;else{var m=!1;n.morphTargets&&(s&&s.isBufferGeometry?m=s.morphAttributes&&s.morphAttributes.position&&s.morphAttributes.position.length>0:s&&s.isGeometry&&(m=s.morphTargets&&s.morphTargets.length>0)),t.isSkinnedMesh&&!1===n.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",t);var g=0;m&&(g|=1),t.isSkinnedMesh&&n.skinning&&(g|=2),c=p[g]}if(e.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var y=c.uuid,v=n.uuid,b=h[y];void 0===b&&(b={},h[y]=b);var _=b[v];void 0===_&&(_=c.clone(),b[v]=_),c=_}return c.visible=n.visible,c.wireframe=n.wireframe,c.side=null!=n.shadowSide?n.shadowSide:d[n.side],c.clipShadows=n.clipShadows,c.clippingPlanes=n.clippingPlanes,c.clipIntersection=n.clipIntersection,c.wireframeLinewidth=n.wireframeLinewidth,c.linewidth=n.linewidth,r&&c.isMeshDistanceMaterial&&(c.referencePosition.copy(i),c.nearDistance=o,c.farDistance=a),c}function R(n,i,o,a){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&n.castShadow&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);var s=t.update(n),l=n.material;if(Array.isArray(l))for(var u=s.groups,h=0,d=u.length;h<d;h++){var p=u[h],f=l[p.materialIndex];if(f&&f.visible){var m=M(n,f,a,c,o.near,o.far);e.renderBufferDirect(o,null,s,m,n,p)}}else if(l.visible){m=M(n,l,a,c,o.near,o.far);e.renderBufferDirect(o,null,s,m,n,null)}}for(var g=n.children,y=0,v=g.length;y<v;y++)R(g[y],i,o,a)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(t,n,l){if(!1!==T.enabled&&(!1!==T.autoUpdate||!1!==T.needsUpdate)&&0!==t.length){var u,h=e.context,d=e.state;d.disable(h.BLEND),d.buffers.color.setClear(1,1,1,1),d.buffers.depth.setTest(!0),d.setScissorTest(!1);for(var g=0,y=t.length;g<y;g++){var v=t[g],b=v.shadow,_=v&&v.isPointLight;if(void 0!==b){var w=b.camera;if(o.copy(b.mapSize),o.min(a),_){var E=o.x,A=o.y;m[0].set(2*E,A,E,A),m[1].set(0,A,E,A),m[2].set(3*E,A,E,A),m[3].set(E,A,E,A),m[4].set(3*E,0,E,A),m[5].set(E,0,E,A),o.x*=4,o.y*=2}if(null===b.map){var S={minFilter:1003,magFilter:1003,format:1023};b.map=new x(o.x,o.y,S),b.map.texture.name=v.name+".shadowMap",w.updateProjectionMatrix()}b.isSpotLightShadow&&b.update(v);var M=b.map,C=b.matrix;c.setFromMatrixPosition(v.matrixWorld),w.position.copy(c),_?(u=6,C.makeTranslation(-c.x,-c.y,-c.z)):(u=1,s.setFromMatrixPosition(v.target.matrixWorld),w.lookAt(s),w.updateMatrixWorld(),C.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),C.multiply(w.projectionMatrix),C.multiply(w.matrixWorldInverse)),e.setRenderTarget(M),e.clear();for(var k=0;k<u;k++){if(_){s.copy(w.position),s.add(p[k]),w.up.copy(f[k]),w.lookAt(s),w.updateMatrixWorld();var I=m[k];d.viewport(I)}i.multiplyMatrices(w.projectionMatrix,w.matrixWorldInverse),r.setFromMatrix(i),R(n,l,w,_)}}else console.warn("THREE.WebGLShadowMap:",v,"has no shadow.")}T.needsUpdate=!1}}}function Fe(e){var t={};return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),t[e.uuid]},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var r=t[n.uuid];r&&(e.deleteBuffer(r.buffer),delete t[n.uuid])},update:function(n,r){n.isInterleavedBufferAttribute&&(n=n.data);var i=t[n.uuid];void 0===i?t[n.uuid]=function(t,n){var r=t.array,i=t.dynamic?e.DYNAMIC_DRAW:e.STATIC_DRAW,o=e.createBuffer();e.bindBuffer(n,o),e.bufferData(n,r,i),t.onUploadCallback();var a=e.FLOAT;return r instanceof Float32Array?a=e.FLOAT:r instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):r instanceof Uint16Array?a=e.UNSIGNED_SHORT:r instanceof Int16Array?a=e.SHORT:r instanceof Uint32Array?a=e.UNSIGNED_INT:r instanceof Int32Array?a=e.INT:r instanceof Int8Array?a=e.BYTE:r instanceof Uint8Array&&(a=e.UNSIGNED_BYTE),{buffer:o,type:a,bytesPerElement:r.BYTES_PER_ELEMENT,version:t.version}}(n,r):i.version<n.version&&(!function(t,n,r){var i=n.array,o=n.updateRange;e.bindBuffer(r,t),!1===n.dynamic?e.bufferData(r,i,e.STATIC_DRAW):-1===o.count?e.bufferSubData(r,0,i):0===o.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(e.bufferSubData(r,o.offset*i.BYTES_PER_ELEMENT,i.subarray(o.offset,o.offset+o.count)),o.count=-1)}(i.buffer,n,r),i.version=n.version)}}}function je(e,t,n,r){this._x=e||0,this._y=t||0,this._z=n||0,this._order=r||je.DefaultOrder}function Ue(){this.mask=1}Ce.prototype=Object.assign(Object.create(o.prototype),{constructor:Ce,isMaterial:!0,onBeforeCompile:function(){},setValues:function(e){if(void 0!==e)for(var t in e){var n=e[t];if(void 0!==n)if("shading"!==t){var r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]="overdraw"===t?Number(n):n:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===n;else console.warn("THREE.Material: '"+t+"' parameter is undefined.")}},toJSON:function(e){var t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(e){var t=[];for(var n in e){var r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearCoat&&(n.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(n.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,n.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),0!==this.side&&(n.side=this.side),0!==this.vertexColors&&(n.vertexColors=this.vertexColors),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,0!==this.rotation&&(n.rotation=this.rotation),1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),t){var i=r(e.textures),o=r(e.images);i.length>0&&(n.textures=i),o.length>0&&(n.images=o)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(e){this.name=e.name,this.fog=e.fog,this.lights=e.lights,this.blending=e.blending,this.side=e.side,this.flatShading=e.flatShading,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.premultipliedAlpha=e.premultipliedAlpha,this.overdraw=e.overdraw,this.visible=e.visible,this.userData=JSON.parse(JSON.stringify(e.userData)),this.clipShadows=e.clipShadows,this.clipIntersection=e.clipIntersection;var t=e.clippingPlanes,n=null;if(null!==t){var r=t.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=t[i].clone()}return this.clippingPlanes=n,this.shadowSide=e.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),ke.prototype=Object.create(Ce.prototype),ke.prototype.constructor=ke,ke.prototype.isMeshDepthMaterial=!0,ke.prototype.copy=function(e){return Ce.prototype.copy.call(this,e),this.depthPacking=e.depthPacking,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this},Ie.prototype=Object.create(Ce.prototype),Ie.prototype.constructor=Ie,Ie.prototype.isMeshDistanceMaterial=!0,Ie.prototype.copy=function(e){return Ce.prototype.copy.call(this,e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this},Object.assign(Pe.prototype,{isBox3:!0,set:function(e,t){return this.min.copy(e),this.max.copy(t),this},setFromArray:function(e){for(var t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=e.length;s<c;s+=3){var l=e[s],u=e[s+1],h=e[s+2];l<t&&(t=l),u<n&&(n=u),h<r&&(r=h),l>i&&(i=l),u>o&&(o=u),h>a&&(a=h)}return this.min.set(t,n,r),this.max.set(i,o,a),this},setFromBufferAttribute:function(e){for(var t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=e.count;s<c;s++){var l=e.getX(s),u=e.getY(s),h=e.getZ(s);l<t&&(t=l),u<n&&(n=u),h<r&&(r=h),l>i&&(i=l),u>o&&(o=u),h>a&&(a=h)}return this.min.set(t,n,r),this.max.set(i,o,a),this},setFromPoints:function(e){this.makeEmpty();for(var t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this},setFromCenterAndSize:function(){var e=new b;return function(t,n){var r=e.copy(n).multiplyScalar(.5);return this.min.copy(t).sub(r),this.max.copy(t).add(r),this}}(),setFromObject:function(e){return this.makeEmpty(),this.expandByObject(e)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.min.copy(e.min),this.max.copy(e.max),this},makeEmpty:function(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(e){var t=e||new b;return this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(e){var t=e||new b;return this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)},expandByPoint:function(e){return this.min.min(e),this.max.max(e),this},expandByVector:function(e){return this.min.sub(e),this.max.add(e),this},expandByScalar:function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},expandByObject:function(){var e,t,n,r=new b;function i(i){var o=i.geometry;if(void 0!==o)if(o.isGeometry){var a=o.vertices;for(t=0,n=a.length;t<n;t++)r.copy(a[t]),r.applyMatrix4(i.matrixWorld),e.expandByPoint(r)}else if(o.isBufferGeometry){var s=o.attributes.position;if(void 0!==s)for(t=0,n=s.count;t<n;t++)r.fromBufferAttribute(s,t).applyMatrix4(i.matrixWorld),e.expandByPoint(r)}}return function(t){return e=this,t.updateMatrixWorld(!0),t.traverse(i),this}}(),containsPoint:function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)},containsBox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z},getParameter:function(e,t){return(t||new b).set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)},intersectsSphere:(Ee=new b,function(e){return this.clampPoint(e.center,Ee),Ee.distanceToSquared(e.center)<=e.radius*e.radius}),intersectsPlane:function(e){var t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=e.constant&&n>=e.constant},intersectsTriangle:function(){var e=new b,t=new b,n=new b,r=new b,i=new b,o=new b,a=new b,s=new b,c=new b,l=new b;function u(r){var i,o;for(i=0,o=r.length-3;i<=o;i+=3){a.fromArray(r,i);var s=c.x*Math.abs(a.x)+c.y*Math.abs(a.y)+c.z*Math.abs(a.z),l=e.dot(a),u=t.dot(a),h=n.dot(a);if(Math.max(-Math.max(l,u,h),Math.min(l,u,h))>s)return!1}return!0}return function(a){if(this.isEmpty())return!1;this.getCenter(s),c.subVectors(this.max,s),e.subVectors(a.a,s),t.subVectors(a.b,s),n.subVectors(a.c,s),r.subVectors(t,e),i.subVectors(n,t),o.subVectors(e,n);var h=[0,-r.z,r.y,0,-i.z,i.y,0,-o.z,o.y,r.z,0,-r.x,i.z,0,-i.x,o.z,0,-o.x,-r.y,r.x,0,-i.y,i.x,0,-o.y,o.x,0];return!!u(h)&&(!!u(h=[1,0,0,0,1,0,0,0,1])&&(l.crossVectors(r,i),u(h=[l.x,l.y,l.z])))}}(),clampPoint:function(e,t){return(t||new b).copy(e).clamp(this.min,this.max)},distanceToPoint:function(){var e=new b;return function(t){return e.copy(t).clamp(this.min,this.max).sub(t).length()}}(),getBoundingSphere:function(){var e=new b;return function(t){var n=t||new Oe;return this.getCenter(n.center),n.radius=.5*this.getSize(e).length(),n}}(),intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},applyMatrix4:(we=[new b,new b,new b,new b,new b,new b,new b,new b],function(e){return this.isEmpty()||(we[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),we[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),we[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),we[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),we[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),we[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),we[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),we[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(we)),this}),translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}),Object.assign(Oe.prototype,{set:function(e,t){return this.center.copy(e),this.radius=t,this},setFromPoints:(Ae=new Pe,function(e,t){var n=this.center;void 0!==t?n.copy(t):Ae.setFromPoints(e).getCenter(n);for(var r=0,i=0,o=e.length;i<o;i++)r=Math.max(r,n.distanceToSquared(e[i]));return this.radius=Math.sqrt(r),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.center.copy(e.center),this.radius=e.radius,this},empty:function(){return this.radius<=0},containsPoint:function(e){return e.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(e){return e.distanceTo(this.center)-this.radius},intersectsSphere:function(e){var t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t},intersectsBox:function(e){return e.intersectsSphere(this)},intersectsPlane:function(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius},clampPoint:function(e,t){var n=this.center.distanceToSquared(e),r=t||new b;return r.copy(e),n>this.radius*this.radius&&(r.sub(this.center).normalize(),r.multiplyScalar(this.radius).add(this.center)),r},getBoundingBox:function(e){var t=e||new Pe;return t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this},translate:function(e){return this.center.add(e),this},equals:function(e){return e.center.equals(this.center)&&e.radius===this.radius}}),Object.assign(Ne.prototype,{set:function(e,t){return this.normal.copy(e),this.constant=t,this},setComponents:function(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this},setFromCoplanarPoints:function(){var e=new b,t=new b;return function(n,r,i){var o=e.subVectors(i,r).cross(t.subVectors(n,r)).normalize();return this.setFromNormalAndCoplanarPoint(o,n),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.normal.copy(e.normal),this.constant=e.constant,this},normalize:function(){var e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(e){return this.normal.dot(e)+this.constant},distanceToSphere:function(e){return this.distanceToPoint(e.center)-e.radius},projectPoint:function(e,t){return(t||new b).copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)},intersectLine:function(){var e=new b;return function(t,n){var r=n||new b,i=t.delta(e),o=this.normal.dot(i);if(0===o)return 0===this.distanceToPoint(t.start)?r.copy(t.start):void 0;var a=-(t.start.dot(this.normal)+this.constant)/o;return a<0||a>1?void 0:r.copy(i).multiplyScalar(a).add(t.start)}}(),intersectsLine:function(e){var t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0},intersectsBox:function(e){return e.intersectsPlane(this)},intersectsSphere:function(e){return e.intersectsPlane(this)},coplanarPoint:function(e){return(e||new b).copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var e=new b,t=new _;return function(n,r){var i=r||t.getNormalMatrix(n),o=this.coplanarPoint(e).applyMatrix4(n),a=this.normal.applyMatrix3(i).normalize();return this.constant=-o.dot(a),this}}(),translate:function(e){return this.constant-=e.dot(this.normal),this},equals:function(e){return e.normal.equals(this.normal)&&e.constant===this.constant}}),Object.assign(De.prototype,{set:function(e,t,n,r,i,o){var a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){for(var t=this.planes,n=0;n<6;n++)t[n].copy(e.planes[n]);return this},setFromMatrix:function(e){var t=this.planes,n=e.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=n[5],l=n[6],u=n[7],h=n[8],d=n[9],p=n[10],f=n[11],m=n[12],g=n[13],y=n[14],v=n[15];return t[0].setComponents(a-r,u-s,f-h,v-m).normalize(),t[1].setComponents(a+r,u+s,f+h,v+m).normalize(),t[2].setComponents(a+i,u+c,f+d,v+g).normalize(),t[3].setComponents(a-i,u-c,f-d,v-g).normalize(),t[4].setComponents(a-o,u-l,f-p,v-y).normalize(),t[5].setComponents(a+o,u+l,f+p,v+y).normalize(),this},intersectsObject:(Te=new Oe,function(e){var t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),Te.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(Te)}),intersectsSprite:function(){var e=new Oe;return function(t){return e.center.set(0,0,0),e.radius=.7071067811865476,e.applyMatrix4(t.matrixWorld),this.intersectsSphere(e)}}(),intersectsSphere:function(e){for(var t=this.planes,n=e.center,r=-e.radius,i=0;i<6;i++){if(t[i].distanceToPoint(n)<r)return!1}return!0},intersectsBox:(xe=new b,Se=new b,function(e){for(var t=this.planes,n=0;n<6;n++){var r=t[n];xe.x=r.normal.x>0?e.min.x:e.max.x,Se.x=r.normal.x>0?e.max.x:e.min.x,xe.y=r.normal.y>0?e.min.y:e.max.y,Se.y=r.normal.y>0?e.max.y:e.min.y,xe.z=r.normal.z>0?e.min.z:e.max.z,Se.z=r.normal.z>0?e.max.z:e.min.z;var i=r.distanceToPoint(xe),o=r.distanceToPoint(Se);if(i<0&&o<0)return!1}return!0}),containsPoint:function(e){for(var t=this.planes,n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}}),je.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],je.DefaultOrder="XYZ",Object.defineProperties(je.prototype,{x:{get:function(){return this._x},set:function(e){this._x=e,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(e){this._y=e,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(e){this._z=e,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(e){this._order=e,this.onChangeCallback()}}}),Object.assign(je.prototype,{isEuler:!0,set:function(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._order=r||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this.onChangeCallback(),this},setFromRotationMatrix:function(e,t,n){var r=m.clamp,i=e.elements,o=i[0],a=i[4],s=i[8],c=i[1],l=i[5],u=i[9],h=i[2],d=i[6],p=i[10];return"XYZ"===(t=t||this._order)?(this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-u,p),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(d,l),this._z=0)):"YXZ"===t?(this._x=Math.asin(-r(u,-1,1)),Math.abs(u)<.99999?(this._y=Math.atan2(s,p),this._z=Math.atan2(c,l)):(this._y=Math.atan2(-h,o),this._z=0)):"ZXY"===t?(this._x=Math.asin(r(d,-1,1)),Math.abs(d)<.99999?(this._y=Math.atan2(-h,p),this._z=Math.atan2(-a,l)):(this._y=0,this._z=Math.atan2(c,o))):"ZYX"===t?(this._y=Math.asin(-r(h,-1,1)),Math.abs(h)<.99999?(this._x=Math.atan2(d,p),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,l))):"YZX"===t?(this._z=Math.asin(r(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(-u,l),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(s,p))):"XZY"===t?(this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(d,l),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-u,p),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+t),this._order=t,!1!==n&&this.onChangeCallback(),this},setFromQuaternion:function(){var e=new y;return function(t,n,r){return e.makeRotationFromQuaternion(t),this.setFromRotationMatrix(e,n,r)}}(),setFromVector3:function(e,t){return this.set(e.x,e.y,e.z,t||this._order)},reorder:(Me=new v,function(e){return Me.setFromEuler(this),this.setFromQuaternion(Me,e)}),equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order},fromArray:function(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this.onChangeCallback(),this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e},toVector3:function(e){return e?e.set(this._x,this._y,this._z):new b(this._x,this._y,this._z)},onChange:function(e){return this.onChangeCallback=e,this},onChangeCallback:function(){}}),Object.assign(Ue.prototype,{set:function(e){this.mask=1<<e|0},enable:function(e){this.mask|=1<<e|0},toggle:function(e){this.mask^=1<<e|0},disable:function(e){this.mask&=~(1<<e|0)},test:function(e){return 0!=(this.mask&e.mask)}});var Be,Ve,He,ze,qe=0;function Ge(){Object.defineProperty(this,"id",{value:qe++}),this.uuid=m.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Ge.DefaultUp.clone();var e=new b,t=new je,n=new v,r=new b(1,1,1);t.onChange((function(){n.setFromEuler(t,!1)})),n.onChange((function(){t.setFromQuaternion(n,void 0,!1)})),Object.defineProperties(this,{position:{enumerable:!0,value:e},rotation:{enumerable:!0,value:t},quaternion:{enumerable:!0,value:n},scale:{enumerable:!0,value:r},modelViewMatrix:{value:new y},normalMatrix:{value:new _}}),this.matrix=new y,this.matrixWorld=new y,this.matrixAutoUpdate=Ge.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new Ue,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function We(){Ge.call(this),this.type="Camera",this.matrixWorldInverse=new y,this.projectionMatrix=new y}function Je(e,t,n,r,i,o){We.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=void 0!==i?i:.1,this.far=void 0!==o?o:2e3,this.updateProjectionMatrix()}function Ze(e,t,n,r,i,o){this.a=e,this.b=t,this.c=n,this.normal=r&&r.isVector3?r:new b,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new fe,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=void 0!==o?o:0}Ge.DefaultUp=new b(0,1,0),Ge.DefaultMatrixAutoUpdate=!0,Ge.prototype=Object.assign(Object.create(o.prototype),{constructor:Ge,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(e){this.matrix.multiplyMatrices(e,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(e){return this.quaternion.premultiply(e),this},setRotationFromAxisAngle:function(e,t){this.quaternion.setFromAxisAngle(e,t)},setRotationFromEuler:function(e){this.quaternion.setFromEuler(e,!0)},setRotationFromMatrix:function(e){this.quaternion.setFromRotationMatrix(e)},setRotationFromQuaternion:function(e){this.quaternion.copy(e)},rotateOnAxis:(ze=new v,function(e,t){return ze.setFromAxisAngle(e,t),this.quaternion.multiply(ze),this}),rotateOnWorldAxis:function(){var e=new v;return function(t,n){return e.setFromAxisAngle(t,n),this.quaternion.premultiply(e),this}}(),rotateX:function(){var e=new b(1,0,0);return function(t){return this.rotateOnAxis(e,t)}}(),rotateY:function(){var e=new b(0,1,0);return function(t){return this.rotateOnAxis(e,t)}}(),rotateZ:function(){var e=new b(0,0,1);return function(t){return this.rotateOnAxis(e,t)}}(),translateOnAxis:function(){var e=new b;return function(t,n){return e.copy(t).applyQuaternion(this.quaternion),this.position.add(e.multiplyScalar(n)),this}}(),translateX:function(){var e=new b(1,0,0);return function(t){return this.translateOnAxis(e,t)}}(),translateY:function(){var e=new b(0,1,0);return function(t){return this.translateOnAxis(e,t)}}(),translateZ:function(){var e=new b(0,0,1);return function(t){return this.translateOnAxis(e,t)}}(),localToWorld:function(e){return e.applyMatrix4(this.matrixWorld)},worldToLocal:(He=new y,function(e){return e.applyMatrix4(He.getInverse(this.matrixWorld))}),lookAt:function(){var e=new y,t=new b;return function(n,r,i){n.isVector3?t.copy(n):t.set(n,r,i),this.isCamera?e.lookAt(this.position,t,this.up):e.lookAt(t,this.position,this.up),this.quaternion.setFromRotationMatrix(e)}}(),add:function(e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(null!==e.parent&&e.parent.remove(e),e.parent=this,e.dispatchEvent({type:"added"}),this.children.push(e)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)},remove:function(e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.remove(arguments[t]);return this}var n=this.children.indexOf(e);return-1!==n&&(e.parent=null,e.dispatchEvent({type:"removed"}),this.children.splice(n,1)),this},getObjectById:function(e){return this.getObjectByProperty("id",e)},getObjectByName:function(e){return this.getObjectByProperty("name",e)},getObjectByProperty:function(e,t){if(this[e]===t)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n].getObjectByProperty(e,t);if(void 0!==i)return i}},getWorldPosition:function(e){var t=e||new b;return this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:(Be=new b,Ve=new b,function(e){var t=e||new v;return this.updateMatrixWorld(!0),this.matrixWorld.decompose(Be,t,Ve),t}),getWorldRotation:function(){var e=new v;return function(t){var n=t||new je;return this.getWorldQuaternion(e),n.setFromQuaternion(e,this.rotation.order,!1)}}(),getWorldScale:function(){var e=new b,t=new v;return function(n){var r=n||new b;return this.updateMatrixWorld(!0),this.matrixWorld.decompose(e,t,r),r}}(),getWorldDirection:function(){var e=new v;return function(t){var n=t||new b;return this.getWorldQuaternion(e),n.set(0,0,1).applyQuaternion(e)}}(),raycast:function(){},traverse:function(e){e(this);for(var t=this.children,n=0,r=t.length;n<r;n++)t[n].traverse(e)},traverseVisible:function(e){if(!1!==this.visible){e(this);for(var t=this.children,n=0,r=t.length;n<r;n++)t[n].traverseVisible(e)}},traverseAncestors:function(e){var t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);for(var t=this.children,n=0,r=t.length;n<r;n++)t[n].updateMatrixWorld(e)},toJSON:function(e){var t=void 0===e||"string"==typeof e,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var r={};function i(t,n){return void 0===t[n.uuid]&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.matrix=this.matrix.toArray(),void 0!==this.geometry){r.geometry=i(e.geometries,this.geometry);var o=this.geometry.parameters;if(void 0!==o&&void 0!==o.shapes){var a=o.shapes;if(Array.isArray(a))for(var s=0,c=a.length;s<c;s++){var l=a[s];i(e.shapes,l)}else i(e.shapes,a)}}if(void 0!==this.material)if(Array.isArray(this.material)){var u=[];for(s=0,c=this.material.length;s<c;s++)u.push(i(e.materials,this.material[s]));r.material=u}else r.material=i(e.materials,this.material);if(this.children.length>0){r.children=[];for(s=0;s<this.children.length;s++)r.children.push(this.children[s].toJSON(e).object)}if(t){var h=m(e.geometries),d=m(e.materials),p=m(e.textures),f=m(e.images);a=m(e.shapes);h.length>0&&(n.geometries=h),d.length>0&&(n.materials=d),p.length>0&&(n.textures=p),f.length>0&&(n.images=f),a.length>0&&(n.shapes=a)}return n.object=r,n;function m(e){var t=[];for(var n in e){var r=e[n];delete r.metadata,t.push(r)}return t}},clone:function(e){return(new this.constructor).copy(this,e)},copy:function(e,t){if(void 0===t&&(t=!0),this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(var n=0;n<e.children.length;n++){var r=e.children[n];this.add(r.clone())}return this}}),We.prototype=Object.assign(Object.create(Ge.prototype),{constructor:We,isCamera:!0,copy:function(e,t){return Ge.prototype.copy.call(this,e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this},getWorldDirection:function(){var e=new v;return function(t){var n=t||new b;return this.getWorldQuaternion(e),n.set(0,0,-1).applyQuaternion(e)}}(),updateMatrixWorld:function(e){Ge.prototype.updateMatrixWorld.call(this,e),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),Je.prototype=Object.assign(Object.create(We.prototype),{constructor:Je,isOrthographicCamera:!0,copy:function(e,t){return We.prototype.copy.call(this,e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this},setViewOffset:function(e,t,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-e,o=n+e,a=r+t,s=r-t;if(null!==this.view&&this.view.enabled){var c=this.zoom/(this.view.width/this.view.fullWidth),l=this.zoom/(this.view.height/this.view.fullHeight),u=(this.right-this.left)/this.view.width,h=(this.top-this.bottom)/this.view.height;o=(i+=u*(this.view.offsetX/c))+u*(this.view.width/c),s=(a-=h*(this.view.offsetY/l))-h*(this.view.height/l)}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far)},toJSON:function(e){var t=Ge.prototype.toJSON.call(this,e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}),Object.assign(Ze.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(e){this.a=e.a,this.b=e.b,this.c=e.c,this.normal.copy(e.normal),this.color.copy(e.color),this.materialIndex=e.materialIndex;for(var t=0,n=e.vertexNormals.length;t<n;t++)this.vertexNormals[t]=e.vertexNormals[t].clone();for(t=0,n=e.vertexColors.length;t<n;t++)this.vertexColors[t]=e.vertexColors[t].clone();return this}});var Ye,Xe=0;function Qe(){Object.defineProperty(this,"id",{value:Xe+=2}),this.uuid=m.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}function Ke(e,t,n){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.uuid=m.generateUUID(),this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=!0===n,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.onUploadCallback=function(){},this.version=0}function $e(e,t,n){Ke.call(this,new Int8Array(e),t,n)}function et(e,t,n){Ke.call(this,new Uint8Array(e),t,n)}function tt(e,t,n){Ke.call(this,new Uint8ClampedArray(e),t,n)}function nt(e,t,n){Ke.call(this,new Int16Array(e),t,n)}function rt(e,t,n){Ke.call(this,new Uint16Array(e),t,n)}function it(e,t,n){Ke.call(this,new Int32Array(e),t,n)}function ot(e,t,n){Ke.call(this,new Uint32Array(e),t,n)}function at(e,t,n){Ke.call(this,new Float32Array(e),t,n)}function st(e,t,n){Ke.call(this,new Float64Array(e),t,n)}function ct(){this.indices=[],this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function lt(e){if(0===e.length)return-1/0;for(var t=e[0],n=1,r=e.length;n<r;++n)e[n]>t&&(t=e[n]);return t}Qe.prototype=Object.assign(Object.create(o.prototype),{constructor:Qe,isGeometry:!0,applyMatrix:function(e){for(var t=(new _).getNormalMatrix(e),n=0,r=this.vertices.length;n<r;n++){this.vertices[n].applyMatrix4(e)}for(n=0,r=this.faces.length;n<r;n++){var i=this.faces[n];i.normal.applyMatrix3(t).normalize();for(var o=0,a=i.vertexNormals.length;o<a;o++)i.vertexNormals[o].applyMatrix3(t).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var e=new y;return function(t){return e.makeRotationX(t),this.applyMatrix(e),this}}(),rotateY:function(){var e=new y;return function(t){return e.makeRotationY(t),this.applyMatrix(e),this}}(),rotateZ:function(){var e=new y;return function(t){return e.makeRotationZ(t),this.applyMatrix(e),this}}(),translate:function(){var e=new y;return function(t,n,r){return e.makeTranslation(t,n,r),this.applyMatrix(e),this}}(),scale:function(){var e=new y;return function(t,n,r){return e.makeScale(t,n,r),this.applyMatrix(e),this}}(),lookAt:(Ye=new Ge,function(e){Ye.lookAt(e),Ye.updateMatrix(),this.applyMatrix(Ye.matrix)}),fromBufferGeometry:function(e){var t=this,n=null!==e.index?e.index.array:void 0,r=e.attributes,i=r.position.array,o=void 0!==r.normal?r.normal.array:void 0,a=void 0!==r.color?r.color.array:void 0,s=void 0!==r.uv?r.uv.array:void 0,c=void 0!==r.uv2?r.uv2.array:void 0;void 0!==c&&(this.faceVertexUvs[1]=[]);for(var l=[],u=[],h=[],d=0,p=0;d<i.length;d+=3,p+=2)t.vertices.push(new b(i[d],i[d+1],i[d+2])),void 0!==o&&l.push(new b(o[d],o[d+1],o[d+2])),void 0!==a&&t.colors.push(new fe(a[d],a[d+1],a[d+2])),void 0!==s&&u.push(new g(s[p],s[p+1])),void 0!==c&&h.push(new g(c[p],c[p+1]));function f(e,n,r,i){var d=new Ze(e,n,r,void 0!==o?[l[e].clone(),l[n].clone(),l[r].clone()]:[],void 0!==a?[t.colors[e].clone(),t.colors[n].clone(),t.colors[r].clone()]:[],i);t.faces.push(d),void 0!==s&&t.faceVertexUvs[0].push([u[e].clone(),u[n].clone(),u[r].clone()]),void 0!==c&&t.faceVertexUvs[1].push([h[e].clone(),h[n].clone(),h[r].clone()])}var m=e.groups;if(m.length>0)for(d=0;d<m.length;d++)for(var y=m[d],v=y.start,_=(p=v,v+y.count);p<_;p+=3)void 0!==n?f(n[p],n[p+1],n[p+2],y.materialIndex):f(p,p+1,p+2,y.materialIndex);else if(void 0!==n)for(d=0;d<n.length;d+=3)f(n[d],n[d+1],n[d+2]);else for(d=0;d<i.length/3;d+=3)f(d,d+1,d+2);return this.computeFaceNormals(),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this},center:function(){this.computeBoundingBox();var e=this.boundingBox.getCenter().negate();return this.translate(e.x,e.y,e.z),e},normalize:function(){this.computeBoundingSphere();var e=this.boundingSphere.center,t=this.boundingSphere.radius,n=0===t?1:1/t,r=new y;return r.set(n,0,0,-n*e.x,0,n,0,-n*e.y,0,0,n,-n*e.z,0,0,0,1),this.applyMatrix(r),this},computeFaceNormals:function(){for(var e=new b,t=new b,n=0,r=this.faces.length;n<r;n++){var i=this.faces[n],o=this.vertices[i.a],a=this.vertices[i.b],s=this.vertices[i.c];e.subVectors(s,a),t.subVectors(o,a),e.cross(t),e.normalize(),i.normal.copy(e)}},computeVertexNormals:function(e){var t,n,r,i,o,a;for(void 0===e&&(e=!0),a=new Array(this.vertices.length),t=0,n=this.vertices.length;t<n;t++)a[t]=new b;if(e){var s,c,l,u=new b,h=new b;for(r=0,i=this.faces.length;r<i;r++)o=this.faces[r],s=this.vertices[o.a],c=this.vertices[o.b],l=this.vertices[o.c],u.subVectors(l,c),h.subVectors(s,c),u.cross(h),a[o.a].add(u),a[o.b].add(u),a[o.c].add(u)}else for(this.computeFaceNormals(),r=0,i=this.faces.length;r<i;r++)a[(o=this.faces[r]).a].add(o.normal),a[o.b].add(o.normal),a[o.c].add(o.normal);for(t=0,n=this.vertices.length;t<n;t++)a[t].normalize();for(r=0,i=this.faces.length;r<i;r++){var d=(o=this.faces[r]).vertexNormals;3===d.length?(d[0].copy(a[o.a]),d[1].copy(a[o.b]),d[2].copy(a[o.c])):(d[0]=a[o.a].clone(),d[1]=a[o.b].clone(),d[2]=a[o.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var e,t,n;for(this.computeFaceNormals(),e=0,t=this.faces.length;e<t;e++){var r=(n=this.faces[e]).vertexNormals;3===r.length?(r[0].copy(n.normal),r[1].copy(n.normal),r[2].copy(n.normal)):(r[0]=n.normal.clone(),r[1]=n.normal.clone(),r[2]=n.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var e,t,n,r,i;for(n=0,r=this.faces.length;n<r;n++)for((i=this.faces[n]).__originalFaceNormal?i.__originalFaceNormal.copy(i.normal):i.__originalFaceNormal=i.normal.clone(),i.__originalVertexNormals||(i.__originalVertexNormals=[]),e=0,t=i.vertexNormals.length;e<t;e++)i.__originalVertexNormals[e]?i.__originalVertexNormals[e].copy(i.vertexNormals[e]):i.__originalVertexNormals[e]=i.vertexNormals[e].clone();var o=new Qe;for(o.faces=this.faces,e=0,t=this.morphTargets.length;e<t;e++){if(!this.morphNormals[e]){this.morphNormals[e]={},this.morphNormals[e].faceNormals=[],this.morphNormals[e].vertexNormals=[];var a=this.morphNormals[e].faceNormals,s=this.morphNormals[e].vertexNormals;for(n=0,r=this.faces.length;n<r;n++)c=new b,l={a:new b,b:new b,c:new b},a.push(c),s.push(l)}var c,l,u=this.morphNormals[e];for(o.vertices=this.morphTargets[e].vertices,o.computeFaceNormals(),o.computeVertexNormals(),n=0,r=this.faces.length;n<r;n++)i=this.faces[n],c=u.faceNormals[n],l=u.vertexNormals[n],c.copy(i.normal),l.a.copy(i.vertexNormals[0]),l.b.copy(i.vertexNormals[1]),l.c.copy(i.vertexNormals[2])}for(n=0,r=this.faces.length;n<r;n++)(i=this.faces[n]).normal=i.__originalFaceNormal,i.vertexNormals=i.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new Pe),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new Oe),this.boundingSphere.setFromPoints(this.vertices)},merge:function(e,t,n){if(e&&e.isGeometry){var r,i=this.vertices.length,o=this.vertices,a=e.vertices,s=this.faces,c=e.faces,l=this.faceVertexUvs[0],u=e.faceVertexUvs[0],h=this.colors,d=e.colors;void 0===n&&(n=0),void 0!==t&&(r=(new _).getNormalMatrix(t));for(var p=0,f=a.length;p<f;p++){var m=a[p].clone();void 0!==t&&m.applyMatrix4(t),o.push(m)}for(p=0,f=d.length;p<f;p++)h.push(d[p].clone());for(p=0,f=c.length;p<f;p++){var g,y,v,b=c[p],w=b.vertexNormals,E=b.vertexColors;(g=new Ze(b.a+i,b.b+i,b.c+i)).normal.copy(b.normal),void 0!==r&&g.normal.applyMatrix3(r).normalize();for(var A=0,x=w.length;A<x;A++)y=w[A].clone(),void 0!==r&&y.applyMatrix3(r).normalize(),g.vertexNormals.push(y);g.color.copy(b.color);for(A=0,x=E.length;A<x;A++)v=E[A],g.vertexColors.push(v.clone());g.materialIndex=b.materialIndex+n,s.push(g)}for(p=0,f=u.length;p<f;p++){var S=u[p],T=[];if(void 0!==S){for(A=0,x=S.length;A<x;A++)T.push(S[A].clone());l.push(T)}}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",e)},mergeMesh:function(e){e&&e.isMesh?(e.matrixAutoUpdate&&e.updateMatrix(),this.merge(e.geometry,e.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",e)},mergeVertices:function(){var e,t,n,r,i,o,a,s,c={},l=[],u=[],h=Math.pow(10,4);for(n=0,r=this.vertices.length;n<r;n++)e=this.vertices[n],void 0===c[t=Math.round(e.x*h)+"_"+Math.round(e.y*h)+"_"+Math.round(e.z*h)]?(c[t]=n,l.push(this.vertices[n]),u[n]=l.length-1):u[n]=u[c[t]];var d=[];for(n=0,r=this.faces.length;n<r;n++){(i=this.faces[n]).a=u[i.a],i.b=u[i.b],i.c=u[i.c],o=[i.a,i.b,i.c];for(var p=0;p<3;p++)if(o[p]===o[(p+1)%3]){d.push(n);break}}for(n=d.length-1;n>=0;n--){var f=d[n];for(this.faces.splice(f,1),a=0,s=this.faceVertexUvs.length;a<s;a++)this.faceVertexUvs[a].splice(f,1)}var m=this.vertices.length-l.length;return this.vertices=l,m},setFromPoints:function(e){this.vertices=[];for(var t=0,n=e.length;t<n;t++){var r=e[t];this.vertices.push(new b(r.x,r.y,r.z||0))}return this},sortFacesByMaterialIndex:function(){for(var e=this.faces,t=e.length,n=0;n<t;n++)e[n]._id=n;e.sort((function(e,t){return e.materialIndex-t.materialIndex}));var r,i,o=this.faceVertexUvs[0],a=this.faceVertexUvs[1];o&&o.length===t&&(r=[]),a&&a.length===t&&(i=[]);for(n=0;n<t;n++){var s=e[n]._id;r&&r.push(o[s]),i&&i.push(a[s])}r&&(this.faceVertexUvs[0]=r),i&&(this.faceVertexUvs[1]=i)},toJSON:function(){var e={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),void 0!==this.parameters){var t=this.parameters;for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}for(var r=[],i=0;i<this.vertices.length;i++){var o=this.vertices[i];r.push(o.x,o.y,o.z)}var a=[],s=[],c={},l=[],u={},h=[],d={};for(i=0;i<this.faces.length;i++){var p=this.faces[i],f=void 0!==this.faceVertexUvs[0][i],m=p.normal.length()>0,g=p.vertexNormals.length>0,y=1!==p.color.r||1!==p.color.g||1!==p.color.b,v=p.vertexColors.length>0,b=0;if(b=A(b,0,0),b=A(b,1,!0),b=A(b,2,!1),b=A(b,3,f),b=A(b,4,m),b=A(b,5,g),b=A(b,6,y),b=A(b,7,v),a.push(b),a.push(p.a,p.b,p.c),a.push(p.materialIndex),f){var _=this.faceVertexUvs[0][i];a.push(T(_[0]),T(_[1]),T(_[2]))}if(m&&a.push(x(p.normal)),g){var w=p.vertexNormals;a.push(x(w[0]),x(w[1]),x(w[2]))}if(y&&a.push(S(p.color)),v){var E=p.vertexColors;a.push(S(E[0]),S(E[1]),S(E[2]))}}function A(e,t,n){return n?e|1<<t:e&~(1<<t)}function x(e){var t=e.x.toString()+e.y.toString()+e.z.toString();return void 0!==c[t]||(c[t]=s.length/3,s.push(e.x,e.y,e.z)),c[t]}function S(e){var t=e.r.toString()+e.g.toString()+e.b.toString();return void 0!==u[t]||(u[t]=l.length,l.push(e.getHex())),u[t]}function T(e){var t=e.x.toString()+e.y.toString();return void 0!==d[t]||(d[t]=h.length/2,h.push(e.x,e.y)),d[t]}return e.data={},e.data.vertices=r,e.data.normals=s,l.length>0&&(e.data.colors=l),h.length>0&&(e.data.uvs=[h]),e.data.faces=a,e},clone:function(){return(new Qe).copy(this)},copy:function(e){var t,n,r,i,o,a;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=e.name;var s=e.vertices;for(t=0,n=s.length;t<n;t++)this.vertices.push(s[t].clone());var c=e.colors;for(t=0,n=c.length;t<n;t++)this.colors.push(c[t].clone());var l=e.faces;for(t=0,n=l.length;t<n;t++)this.faces.push(l[t].clone());for(t=0,n=e.faceVertexUvs.length;t<n;t++){var u=e.faceVertexUvs[t];for(void 0===this.faceVertexUvs[t]&&(this.faceVertexUvs[t]=[]),r=0,i=u.length;r<i;r++){var h=u[r],d=[];for(o=0,a=h.length;o<a;o++){var p=h[o];d.push(p.clone())}this.faceVertexUvs[t].push(d)}}var f=e.morphTargets;for(t=0,n=f.length;t<n;t++){var m={};if(m.name=f[t].name,void 0!==f[t].vertices)for(m.vertices=[],r=0,i=f[t].vertices.length;r<i;r++)m.vertices.push(f[t].vertices[r].clone());if(void 0!==f[t].normals)for(m.normals=[],r=0,i=f[t].normals.length;r<i;r++)m.normals.push(f[t].normals[r].clone());this.morphTargets.push(m)}var g=e.morphNormals;for(t=0,n=g.length;t<n;t++){var y={};if(void 0!==g[t].vertexNormals)for(y.vertexNormals=[],r=0,i=g[t].vertexNormals.length;r<i;r++){var v=g[t].vertexNormals[r],b={};b.a=v.a.clone(),b.b=v.b.clone(),b.c=v.c.clone(),y.vertexNormals.push(b)}if(void 0!==g[t].faceNormals)for(y.faceNormals=[],r=0,i=g[t].faceNormals.length;r<i;r++)y.faceNormals.push(g[t].faceNormals[r].clone());this.morphNormals.push(y)}var _=e.skinWeights;for(t=0,n=_.length;t<n;t++)this.skinWeights.push(_[t].clone());var w=e.skinIndices;for(t=0,n=w.length;t<n;t++)this.skinIndices.push(w[t].clone());var E=e.lineDistances;for(t=0,n=E.length;t<n;t++)this.lineDistances.push(E[t]);var A=e.boundingBox;null!==A&&(this.boundingBox=A.clone());var x=e.boundingSphere;return null!==x&&(this.boundingSphere=x.clone()),this.elementsNeedUpdate=e.elementsNeedUpdate,this.verticesNeedUpdate=e.verticesNeedUpdate,this.uvsNeedUpdate=e.uvsNeedUpdate,this.normalsNeedUpdate=e.normalsNeedUpdate,this.colorsNeedUpdate=e.colorsNeedUpdate,this.lineDistancesNeedUpdate=e.lineDistancesNeedUpdate,this.groupsNeedUpdate=e.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Ke.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(Ke.prototype,{isBufferAttribute:!0,setArray:function(e){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.count=void 0!==e?e.length/this.itemSize:0,this.array=e},setDynamic:function(e){return this.dynamic=e,this},copy:function(e){return this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.dynamic=e.dynamic,this},copyAt:function(e,t,n){e*=this.itemSize,n*=t.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[e+r]=t.array[n+r];return this},copyArray:function(e){return this.array.set(e),this},copyColorsArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var o=e[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),o=new fe),t[n++]=o.r,t[n++]=o.g,t[n++]=o.b}return this},copyIndicesArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var o=e[r];t[n++]=o.a,t[n++]=o.b,t[n++]=o.c}return this},copyVector2sArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var o=e[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),o=new g),t[n++]=o.x,t[n++]=o.y}return this},copyVector3sArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var o=e[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),o=new b),t[n++]=o.x,t[n++]=o.y,t[n++]=o.z}return this},copyVector4sArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var o=e[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),o=new A),t[n++]=o.x,t[n++]=o.y,t[n++]=o.z,t[n++]=o.w}return this},set:function(e,t){return void 0===t&&(t=0),this.array.set(e,t),this},getX:function(e){return this.array[e*this.itemSize]},setX:function(e,t){return this.array[e*this.itemSize]=t,this},getY:function(e){return this.array[e*this.itemSize+1]},setY:function(e,t){return this.array[e*this.itemSize+1]=t,this},getZ:function(e){return this.array[e*this.itemSize+2]},setZ:function(e,t){return this.array[e*this.itemSize+2]=t,this},getW:function(e){return this.array[e*this.itemSize+3]},setW:function(e,t){return this.array[e*this.itemSize+3]=t,this},setXY:function(e,t,n){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this},setXYZ:function(e,t,n,r){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this},setXYZW:function(e,t,n,r,i){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=i,this},onUpload:function(e){return this.onUploadCallback=e,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),$e.prototype=Object.create(Ke.prototype),$e.prototype.constructor=$e,et.prototype=Object.create(Ke.prototype),et.prototype.constructor=et,tt.prototype=Object.create(Ke.prototype),tt.prototype.constructor=tt,nt.prototype=Object.create(Ke.prototype),nt.prototype.constructor=nt,rt.prototype=Object.create(Ke.prototype),rt.prototype.constructor=rt,it.prototype=Object.create(Ke.prototype),it.prototype.constructor=it,ot.prototype=Object.create(Ke.prototype),ot.prototype.constructor=ot,at.prototype=Object.create(Ke.prototype),at.prototype.constructor=at,st.prototype=Object.create(Ke.prototype),st.prototype.constructor=st,Object.assign(ct.prototype,{computeGroups:function(e){for(var t,n=[],r=void 0,i=e.faces,o=0;o<i.length;o++){var a=i[o];a.materialIndex!==r&&(r=a.materialIndex,void 0!==t&&(t.count=3*o-t.start,n.push(t)),t={start:3*o,materialIndex:r})}void 0!==t&&(t.count=3*o-t.start,n.push(t)),this.groups=n},fromGeometry:function(e){var t,n=e.faces,r=e.vertices,i=e.faceVertexUvs,o=i[0]&&i[0].length>0,a=i[1]&&i[1].length>0,s=e.morphTargets,c=s.length;if(c>0){t=[];for(var l=0;l<c;l++)t[l]=[];this.morphTargets.position=t}var u,h=e.morphNormals,d=h.length;if(d>0){u=[];for(l=0;l<d;l++)u[l]=[];this.morphTargets.normal=u}var p=e.skinIndices,f=e.skinWeights,m=p.length===r.length,y=f.length===r.length;for(l=0;l<n.length;l++){var v=n[l];this.vertices.push(r[v.a],r[v.b],r[v.c]);var b=v.vertexNormals;if(3===b.length)this.normals.push(b[0],b[1],b[2]);else{var _=v.normal;this.normals.push(_,_,_)}var w,E=v.vertexColors;if(3===E.length)this.colors.push(E[0],E[1],E[2]);else{var A=v.color;this.colors.push(A,A,A)}if(!0===o)void 0!==(w=i[0][l])?this.uvs.push(w[0],w[1],w[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",l),this.uvs.push(new g,new g,new g));if(!0===a)void 0!==(w=i[1][l])?this.uvs2.push(w[0],w[1],w[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",l),this.uvs2.push(new g,new g,new g));for(var x=0;x<c;x++){var S=s[x].vertices;t[x].push(S[v.a],S[v.b],S[v.c])}for(x=0;x<d;x++){var T=h[x].vertexNormals[l];u[x].push(T.a,T.b,T.c)}m&&this.skinIndices.push(p[v.a],p[v.b],p[v.c]),y&&this.skinWeights.push(f[v.a],f[v.b],f[v.c])}return this.computeGroups(e),this.verticesNeedUpdate=e.verticesNeedUpdate,this.normalsNeedUpdate=e.normalsNeedUpdate,this.colorsNeedUpdate=e.colorsNeedUpdate,this.uvsNeedUpdate=e.uvsNeedUpdate,this.groupsNeedUpdate=e.groupsNeedUpdate,this}});var ut,ht,dt,pt,ft,mt,gt,yt=1;function vt(){Object.defineProperty(this,"id",{value:yt+=2}),this.uuid=m.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0}}function bt(e,t,n,r,i,o){Qe.call(this),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:o},this.fromBufferGeometry(new _t(e,t,n,r,i,o)),this.mergeVertices()}function _t(e,t,n,r,i,o){vt.call(this),this.type="BoxBufferGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};var a=this;e=e||1,t=t||1,n=n||1,r=Math.floor(r)||1,i=Math.floor(i)||1,o=Math.floor(o)||1;var s=[],c=[],l=[],u=[],h=0,d=0;function p(e,t,n,r,i,o,p,f,m,g,y){var v,_,w=o/m,E=p/g,A=o/2,x=p/2,S=f/2,T=m+1,M=g+1,R=0,C=0,k=new b;for(_=0;_<M;_++){var I=_*E-x;for(v=0;v<T;v++){var P=v*w-A;k[e]=P*r,k[t]=I*i,k[n]=S,c.push(k.x,k.y,k.z),k[e]=0,k[t]=0,k[n]=f>0?1:-1,l.push(k.x,k.y,k.z),u.push(v/m),u.push(1-_/g),R+=1}}for(_=0;_<g;_++)for(v=0;v<m;v++){var O=h+v+T*_,N=h+v+T*(_+1),D=h+(v+1)+T*(_+1),L=h+(v+1)+T*_;s.push(O,N,L),s.push(N,D,L),C+=6}a.addGroup(d,C,y),d+=C,h+=R}p("z","y","x",-1,-1,n,t,e,o,i,0),p("z","y","x",1,-1,n,t,-e,o,i,1),p("x","z","y",1,1,e,n,t,r,o,2),p("x","z","y",1,-1,e,n,-t,r,o,3),p("x","y","z",1,-1,e,t,n,r,i,4),p("x","y","z",-1,-1,e,t,-n,r,i,5),this.setIndex(s),this.addAttribute("position",new at(c,3)),this.addAttribute("normal",new at(l,3)),this.addAttribute("uv",new at(u,2))}function wt(e,t,n,r){Qe.call(this),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r},this.fromBufferGeometry(new Et(e,t,n,r)),this.mergeVertices()}function Et(e,t,n,r){vt.call(this),this.type="PlaneBufferGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r};var i,o,a=(e=e||1)/2,s=(t=t||1)/2,c=Math.floor(n)||1,l=Math.floor(r)||1,u=c+1,h=l+1,d=e/c,p=t/l,f=[],m=[],g=[],y=[];for(o=0;o<h;o++){var v=o*p-s;for(i=0;i<u;i++){var b=i*d-a;m.push(b,-v,0),g.push(0,0,1),y.push(i/c),y.push(1-o/l)}}for(o=0;o<l;o++)for(i=0;i<c;i++){var _=i+u*o,w=i+u*(o+1),E=i+1+u*(o+1),A=i+1+u*o;f.push(_,w,A),f.push(w,E,A)}this.setIndex(f),this.addAttribute("position",new at(m,3)),this.addAttribute("normal",new at(g,3)),this.addAttribute("uv",new at(y,2))}function At(e){Ce.call(this),this.type="MeshBasicMaterial",this.color=new fe(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.lights=!1,this.setValues(e)}function xt(e){Ce.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==e&&(void 0!==e.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(e))}function St(e,t){this.origin=void 0!==e?e:new b,this.direction=void 0!==t?t:new b}function Tt(e,t){this.start=void 0!==e?e:new b,this.end=void 0!==t?t:new b}function Mt(e,t,n){this.a=void 0!==e?e:new b,this.b=void 0!==t?t:new b,this.c=void 0!==n?n:new b}function Rt(e,t){Ge.call(this),this.type="Mesh",this.geometry=void 0!==e?e:new vt,this.material=void 0!==t?t:new At({color:16777215*Math.random()}),this.drawMode=0,this.updateMorphTargets()}function Ct(e,t,n,r){var i,o,a,s=new fe(0),c=0;function l(e,n){t.buffers.color.setClear(e.r,e.g,e.b,n,r)}return{getClearColor:function(){return s},setClearColor:function(e,t){s.set(e),l(s,c=void 0!==t?t:1)},getClearAlpha:function(){return c},setClearAlpha:function(e){l(s,c=e)},render:function(t,r,u,h){var d=r.background;null===d?l(s,c):d&&d.isColor&&(l(d,1),h=!0),(e.autoClear||h)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),d&&d.isCubeTexture?(void 0===a&&((a=new Rt(new _t(1,1,1),new xt({uniforms:ve.cube.uniforms,vertexShader:ve.cube.vertexShader,fragmentShader:ve.cube.fragmentShader,side:1,depthTest:!0,depthWrite:!1,fog:!1}))).geometry.removeAttribute("normal"),a.geometry.removeAttribute("uv"),a.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},n.update(a.geometry)),a.material.uniforms.tCube.value=d,t.push(a,a.geometry,a.material,0,null)):d&&d.isTexture&&(void 0===i&&(i=new Je(-1,1,1,-1,0,1),o=new Rt(new Et(2,2),new At({depthTest:!1,depthWrite:!1,fog:!1})),n.update(o.geometry)),o.material.map=d,e.renderBufferDirect(i,null,o.geometry,o.material,o,null))}}}function kt(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.program&&t.program&&e.program!==t.program?e.program.id-t.program.id:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function It(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function Pt(){var e=[],t=0,n=[],r=[];return{opaque:n,transparent:r,init:function(){t=0,n.length=0,r.length=0},push:function(i,o,a,s,c){var l=e[t];void 0===l?(l={id:i.id,object:i,geometry:o,material:a,program:a.program,renderOrder:i.renderOrder,z:s,group:c},e[t]=l):(l.id=i.id,l.object=i,l.geometry=o,l.material=a,l.program=a.program,l.renderOrder=i.renderOrder,l.z=s,l.group=c),(!0===a.transparent?r:n).push(l),t++},sort:function(){n.length>1&&n.sort(kt),r.length>1&&r.sort(It)}}}function Ot(){var e={};return{get:function(t,n){var r=t.id+","+n.id,i=e[r];return void 0===i&&(i=new Pt,e[r]=i),i},dispose:function(){e={}}}}function Nt(e,t){return Math.abs(t[1])-Math.abs(e[1])}function Dt(e){var t={},n=new Float32Array(8);return{update:function(r,i,o,a){var s=r.morphTargetInfluences,c=s.length,l=t[i.id];if(void 0===l){l=[];for(var u=0;u<c;u++)l[u]=[u,0];t[i.id]=l}var h=o.morphTargets&&i.morphAttributes.position,d=o.morphNormals&&i.morphAttributes.normal;for(u=0;u<c;u++){0!==(p=l[u])[1]&&(h&&i.removeAttribute("morphTarget"+u),d&&i.removeAttribute("morphNormal"+u))}for(u=0;u<c;u++){(p=l[u])[0]=u,p[1]=s[u]}for(l.sort(Nt),u=0;u<8;u++){var p;if(p=l[u]){var f=p[0],m=p[1];if(m){h&&i.addAttribute("morphTarget"+u,h[f]),d&&i.addAttribute("morphNormal"+u,d[f]),n[u]=m;continue}}n[u]=0}a.getUniforms().setValue(e,"morphTargetInfluences",n)}}}function Lt(e,t,n){var r,i,o;this.setMode=function(e){r=e},this.setIndex=function(e){i=e.type,o=e.bytesPerElement},this.render=function(t,a){e.drawElements(r,a,i,t*o),n.calls++,n.vertices+=a,r===e.TRIANGLES?n.faces+=a/3:r===e.POINTS&&(n.points+=a)},this.renderInstances=function(a,s,c){var l=t.get("ANGLE_instanced_arrays");null!==l?(l.drawElementsInstancedANGLE(r,c,i,s*o,a.maxInstancedCount),n.calls++,n.vertices+=c*a.maxInstancedCount,r===e.TRIANGLES?n.faces+=a.maxInstancedCount*c/3:r===e.POINTS&&(n.points+=a.maxInstancedCount*c)):console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}function Ft(e,t,n){var r;this.setMode=function(e){r=e},this.render=function(t,i){e.drawArrays(r,t,i),n.calls++,n.vertices+=i,r===e.TRIANGLES?n.faces+=i/3:r===e.POINTS&&(n.points+=i)},this.renderInstances=function(i,o,a){var s=t.get("ANGLE_instanced_arrays");if(null!==s){var c=i.attributes.position;c.isInterleavedBufferAttribute?(a=c.data.count,s.drawArraysInstancedANGLE(r,0,a,i.maxInstancedCount)):s.drawArraysInstancedANGLE(r,o,a,i.maxInstancedCount),n.calls++,n.vertices+=a*i.maxInstancedCount,r===e.TRIANGLES?n.faces+=i.maxInstancedCount*a/3:r===e.POINTS&&(n.points+=i.maxInstancedCount*a)}else console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}function jt(e,t,n){var r={},i={};function o(e){var a=e.target,s=r[a.id];for(var c in null!==s.index&&t.remove(s.index),s.attributes)t.remove(s.attributes[c]);a.removeEventListener("dispose",o),delete r[a.id];var l=i[a.id];l&&(t.remove(l),delete i[a.id]),(l=i[s.id])&&(t.remove(l),delete i[s.id]),n.geometries--}return{get:function(e,t){var i=r[t.id];return i||(t.addEventListener("dispose",o),t.isBufferGeometry?i=t:t.isGeometry&&(void 0===t._bufferGeometry&&(t._bufferGeometry=(new vt).setFromObject(e)),i=t._bufferGeometry),r[t.id]=i,n.geometries++,i)},update:function(n){var r=n.index,i=n.attributes;for(var o in null!==r&&t.update(r,e.ELEMENT_ARRAY_BUFFER),i)t.update(i[o],e.ARRAY_BUFFER);var a=n.morphAttributes;for(var o in a)for(var s=a[o],c=0,l=s.length;c<l;c++)t.update(s[c],e.ARRAY_BUFFER)},getWireframeAttribute:function(n){var r=i[n.id];if(r)return r;var o,a=[],s=n.index,c=n.attributes;if(null!==s)for(var l=0,u=(o=s.array).length;l<u;l+=3){var h=o[l+0],d=o[l+1],p=o[l+2];a.push(h,d,d,p,p,h)}else for(l=0,u=(o=c.position.array).length/3-1;l<u;l+=3){h=l+0,d=l+1,p=l+2;a.push(h,d,d,p,p,h)}return r=new(lt(a)>65535?ot:rt)(a,1),t.update(r,e.ELEMENT_ARRAY_BUFFER),i[n.id]=r,r}}}function Ut(e,t){var n={};return{update:function(r){var i=t.frame,o=r.geometry,a=e.get(r,o);return n[a.id]!==i&&(o.isGeometry&&a.updateFromObject(r),e.update(a),n[a.id]=i),a},dispose:function(){n={}}}}function Bt(e,t,n){var r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),!1===e.getShaderParameter(r,e.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn't compile."),""!==e.getShaderInfoLog(r)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",t===e.VERTEX_SHADER?"vertex":"fragment",e.getShaderInfoLog(r),function(e){for(var t=e.split("\n"),n=0;n<t.length;n++)t[n]=n+1+": "+t[n];return t.join("\n")}(n)),r}vt.prototype=Object.assign(Object.create(o.prototype),{constructor:vt,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(e){Array.isArray(e)?this.index=new(lt(e)>65535?ot:rt)(e,1):this.index=e},addAttribute:function(e,t){return t&&t.isBufferAttribute||t&&t.isInterleavedBufferAttribute?"index"===e?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),void this.setIndex(t)):(this.attributes[e]=t,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void this.addAttribute(e,new Ke(arguments[1],arguments[2])))},getAttribute:function(e){return this.attributes[e]},removeAttribute:function(e){return delete this.attributes[e],this},addGroup:function(e,t,n){this.groups.push({start:e,count:t,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(e,t){this.drawRange.start=e,this.drawRange.count=t},applyMatrix:function(e){var t=this.attributes.position;void 0!==t&&(e.applyToBufferAttribute(t),t.needsUpdate=!0);var n=this.attributes.normal;void 0!==n&&((new _).getNormalMatrix(e).applyToBufferAttribute(n),n.needsUpdate=!0);return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var e=new y;return function(t){return e.makeRotationX(t),this.applyMatrix(e),this}}(),rotateY:function(){var e=new y;return function(t){return e.makeRotationY(t),this.applyMatrix(e),this}}(),rotateZ:function(){var e=new y;return function(t){return e.makeRotationZ(t),this.applyMatrix(e),this}}(),translate:function(){var e=new y;return function(t,n,r){return e.makeTranslation(t,n,r),this.applyMatrix(e),this}}(),scale:function(){var e=new y;return function(t,n,r){return e.makeScale(t,n,r),this.applyMatrix(e),this}}(),lookAt:function(){var e=new Ge;return function(t){e.lookAt(t),e.updateMatrix(),this.applyMatrix(e.matrix)}}(),center:function(){this.computeBoundingBox();var e=this.boundingBox.getCenter().negate();return this.translate(e.x,e.y,e.z),e},setFromObject:function(e){var t=e.geometry;if(e.isPoints||e.isLine){var n=new at(3*t.vertices.length,3),r=new at(3*t.colors.length,3);if(this.addAttribute("position",n.copyVector3sArray(t.vertices)),this.addAttribute("color",r.copyColorsArray(t.colors)),t.lineDistances&&t.lineDistances.length===t.vertices.length){var i=new at(t.lineDistances.length,1);this.addAttribute("lineDistance",i.copyArray(t.lineDistances))}null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone())}else e.isMesh&&t&&t.isGeometry&&this.fromGeometry(t);return this},setFromPoints:function(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e[n];t.push(i.x,i.y,i.z||0)}return this.addAttribute("position",new at(t,3)),this},updateFromObject:function(e){var t,n=e.geometry;if(e.isMesh){var r=n.__directGeometry;if(!0===n.elementsNeedUpdate&&(r=void 0,n.elementsNeedUpdate=!1),void 0===r)return this.fromGeometry(n);r.verticesNeedUpdate=n.verticesNeedUpdate,r.normalsNeedUpdate=n.normalsNeedUpdate,r.colorsNeedUpdate=n.colorsNeedUpdate,r.uvsNeedUpdate=n.uvsNeedUpdate,r.groupsNeedUpdate=n.groupsNeedUpdate,n.verticesNeedUpdate=!1,n.normalsNeedUpdate=!1,n.colorsNeedUpdate=!1,n.uvsNeedUpdate=!1,n.groupsNeedUpdate=!1,n=r}return!0===n.verticesNeedUpdate&&(void 0!==(t=this.attributes.position)&&(t.copyVector3sArray(n.vertices),t.needsUpdate=!0),n.verticesNeedUpdate=!1),!0===n.normalsNeedUpdate&&(void 0!==(t=this.attributes.normal)&&(t.copyVector3sArray(n.normals),t.needsUpdate=!0),n.normalsNeedUpdate=!1),!0===n.colorsNeedUpdate&&(void 0!==(t=this.attributes.color)&&(t.copyColorsArray(n.colors),t.needsUpdate=!0),n.colorsNeedUpdate=!1),n.uvsNeedUpdate&&(void 0!==(t=this.attributes.uv)&&(t.copyVector2sArray(n.uvs),t.needsUpdate=!0),n.uvsNeedUpdate=!1),n.lineDistancesNeedUpdate&&(void 0!==(t=this.attributes.lineDistance)&&(t.copyArray(n.lineDistances),t.needsUpdate=!0),n.lineDistancesNeedUpdate=!1),n.groupsNeedUpdate&&(n.computeGroups(e.geometry),this.groups=n.groups,n.groupsNeedUpdate=!1),this},fromGeometry:function(e){return e.__directGeometry=(new ct).fromGeometry(e),this.fromDirectGeometry(e.__directGeometry)},fromDirectGeometry:function(e){var t=new Float32Array(3*e.vertices.length);if(this.addAttribute("position",new Ke(t,3).copyVector3sArray(e.vertices)),e.normals.length>0){var n=new Float32Array(3*e.normals.length);this.addAttribute("normal",new Ke(n,3).copyVector3sArray(e.normals))}if(e.colors.length>0){var r=new Float32Array(3*e.colors.length);this.addAttribute("color",new Ke(r,3).copyColorsArray(e.colors))}if(e.uvs.length>0){var i=new Float32Array(2*e.uvs.length);this.addAttribute("uv",new Ke(i,2).copyVector2sArray(e.uvs))}if(e.uvs2.length>0){var o=new Float32Array(2*e.uvs2.length);this.addAttribute("uv2",new Ke(o,2).copyVector2sArray(e.uvs2))}if(e.indices.length>0){var a=new(lt(e.indices)>65535?Uint32Array:Uint16Array)(3*e.indices.length);this.setIndex(new Ke(a,1).copyIndicesArray(e.indices))}for(var s in this.groups=e.groups,e.morphTargets){for(var c=[],l=e.morphTargets[s],u=0,h=l.length;u<h;u++){var d=l[u],p=new at(3*d.length,3);c.push(p.copyVector3sArray(d))}this.morphAttributes[s]=c}if(e.skinIndices.length>0){var f=new at(4*e.skinIndices.length,4);this.addAttribute("skinIndex",f.copyVector4sArray(e.skinIndices))}if(e.skinWeights.length>0){var m=new at(4*e.skinWeights.length,4);this.addAttribute("skinWeight",m.copyVector4sArray(e.skinWeights))}return null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new Pe);var e=this.attributes.position;void 0!==e?this.boundingBox.setFromBufferAttribute(e):this.boundingBox.makeEmpty(),(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){var e=new Pe,t=new b;return function(){null===this.boundingSphere&&(this.boundingSphere=new Oe);var n=this.attributes.position;if(n){var r=this.boundingSphere.center;e.setFromBufferAttribute(n),e.getCenter(r);for(var i=0,o=0,a=n.count;o<a;o++)t.x=n.getX(o),t.y=n.getY(o),t.z=n.getZ(o),i=Math.max(i,r.distanceToSquared(t));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var e=this.index,t=this.attributes,n=this.groups;if(t.position){var r=t.position.array;if(void 0===t.normal)this.addAttribute("normal",new Ke(new Float32Array(r.length),3));else for(var i=t.normal.array,o=0,a=i.length;o<a;o++)i[o]=0;var s,c,l,u=t.normal.array,h=new b,d=new b,p=new b,f=new b,m=new b;if(e){var g=e.array;0===n.length&&this.addGroup(0,g.length);for(var y=0,v=n.length;y<v;++y){var _=n[y],w=_.start;for(o=w,a=w+_.count;o<a;o+=3)s=3*g[o+0],c=3*g[o+1],l=3*g[o+2],h.fromArray(r,s),d.fromArray(r,c),p.fromArray(r,l),f.subVectors(p,d),m.subVectors(h,d),f.cross(m),u[s]+=f.x,u[s+1]+=f.y,u[s+2]+=f.z,u[c]+=f.x,u[c+1]+=f.y,u[c+2]+=f.z,u[l]+=f.x,u[l+1]+=f.y,u[l+2]+=f.z}}else for(o=0,a=r.length;o<a;o+=9)h.fromArray(r,o),d.fromArray(r,o+3),p.fromArray(r,o+6),f.subVectors(p,d),m.subVectors(h,d),f.cross(m),u[o]=f.x,u[o+1]=f.y,u[o+2]=f.z,u[o+3]=f.x,u[o+4]=f.y,u[o+5]=f.z,u[o+6]=f.x,u[o+7]=f.y,u[o+8]=f.z;this.normalizeNormals(),t.normal.needsUpdate=!0}},merge:function(e,t){if(e&&e.isBufferGeometry){void 0===t&&(t=0);var n=this.attributes;for(var r in n)if(void 0!==e.attributes[r])for(var i=n[r].array,o=e.attributes[r],a=o.array,s=0,c=o.itemSize*t;s<a.length;s++,c++)i[c]=a[s];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",e)},normalizeNormals:function(){var e=new b;return function(){for(var t=this.attributes.normal,n=0,r=t.count;n<r;n++)e.x=t.getX(n),e.y=t.getY(n),e.z=t.getZ(n),e.normalize(),t.setXYZ(n,e.x,e.y,e.z)}}(),toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var e=new vt,t=this.index.array,n=this.attributes;for(var r in n){for(var i=n[r],o=i.array,a=i.itemSize,s=new o.constructor(t.length*a),c=0,l=0,u=0,h=t.length;u<h;u++){c=t[u]*a;for(var d=0;d<a;d++)s[l++]=o[c++]}e.addAttribute(r,new Ke(s,a))}return e},toJSON:function(){var e={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),void 0!==this.parameters){var t=this.parameters;for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};var r=this.index;if(null!==r){var i=Array.prototype.slice.call(r.array);e.data.index={type:r.array.constructor.name,array:i}}var o=this.attributes;for(var n in o){var a=o[n];i=Array.prototype.slice.call(a.array);e.data.attributes[n]={itemSize:a.itemSize,type:a.array.constructor.name,array:i,normalized:a.normalized}}var s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(e.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),e},clone:function(){return(new vt).copy(this)},copy:function(e){var t,n,r;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=e.name;var i=e.index;null!==i&&this.setIndex(i.clone());var o=e.attributes;for(t in o){var a=o[t];this.addAttribute(t,a.clone())}var s=e.morphAttributes;for(t in s){var c=[],l=s[t];for(n=0,r=l.length;n<r;n++)c.push(l[n].clone());this.morphAttributes[t]=c}var u=e.groups;for(n=0,r=u.length;n<r;n++){var h=u[n];this.addGroup(h.start,h.count,h.materialIndex)}var d=e.boundingBox;null!==d&&(this.boundingBox=d.clone());var p=e.boundingSphere;return null!==p&&(this.boundingSphere=p.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),bt.prototype=Object.create(Qe.prototype),bt.prototype.constructor=bt,_t.prototype=Object.create(vt.prototype),_t.prototype.constructor=_t,wt.prototype=Object.create(Qe.prototype),wt.prototype.constructor=wt,Et.prototype=Object.create(vt.prototype),Et.prototype.constructor=Et,At.prototype=Object.create(Ce.prototype),At.prototype.constructor=At,At.prototype.isMeshBasicMaterial=!0,At.prototype.copy=function(e){return Ce.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this},xt.prototype=Object.create(Ce.prototype),xt.prototype.constructor=xt,xt.prototype.isShaderMaterial=!0,xt.prototype.copy=function(e){return Ce.prototype.copy.call(this,e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=ge.clone(e.uniforms),this.defines=e.defines,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.lights=e.lights,this.clipping=e.clipping,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.extensions=e.extensions,this},xt.prototype.toJSON=function(e){var t=Ce.prototype.toJSON.call(this,e);return t.uniforms=this.uniforms,t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t},Object.assign(St.prototype,{set:function(e,t){return this.origin.copy(e),this.direction.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this},at:function(e,t){return(t||new b).copy(this.direction).multiplyScalar(e).add(this.origin)},lookAt:function(e){return this.direction.copy(e).sub(this.origin).normalize(),this},recast:function(){var e=new b;return function(t){return this.origin.copy(this.at(t,e)),this}}(),closestPointToPoint:function(e,t){var n=t||new b;n.subVectors(e,this.origin);var r=n.dot(this.direction);return r<0?n.copy(this.origin):n.copy(this.direction).multiplyScalar(r).add(this.origin)},distanceToPoint:function(e){return Math.sqrt(this.distanceSqToPoint(e))},distanceSqToPoint:function(){var e=new b;return function(t){var n=e.subVectors(t,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(t):(e.copy(this.direction).multiplyScalar(n).add(this.origin),e.distanceToSquared(t))}}(),distanceSqToSegment:(ht=new b,dt=new b,pt=new b,function(e,t,n,r){ht.copy(e).add(t).multiplyScalar(.5),dt.copy(t).sub(e).normalize(),pt.copy(this.origin).sub(ht);var i,o,a,s,c=.5*e.distanceTo(t),l=-this.direction.dot(dt),u=pt.dot(this.direction),h=-pt.dot(dt),d=pt.lengthSq(),p=Math.abs(1-l*l);if(p>0)if(o=l*u-h,s=c*p,(i=l*h-u)>=0)if(o>=-s)if(o<=s){var f=1/p;a=(i*=f)*(i+l*(o*=f)+2*u)+o*(l*i+o+2*h)+d}else o=c,a=-(i=Math.max(0,-(l*o+u)))*i+o*(o+2*h)+d;else o=-c,a=-(i=Math.max(0,-(l*o+u)))*i+o*(o+2*h)+d;else o<=-s?a=-(i=Math.max(0,-(-l*c+u)))*i+(o=i>0?-c:Math.min(Math.max(-c,-h),c))*(o+2*h)+d:o<=s?(i=0,a=(o=Math.min(Math.max(-c,-h),c))*(o+2*h)+d):a=-(i=Math.max(0,-(l*c+u)))*i+(o=i>0?c:Math.min(Math.max(-c,-h),c))*(o+2*h)+d;else o=l>0?-c:c,a=-(i=Math.max(0,-(l*o+u)))*i+o*(o+2*h)+d;return n&&n.copy(this.direction).multiplyScalar(i).add(this.origin),r&&r.copy(dt).multiplyScalar(o).add(ht),a}),intersectSphere:function(){var e=new b;return function(t,n){e.subVectors(t.center,this.origin);var r=e.dot(this.direction),i=e.dot(e)-r*r,o=t.radius*t.radius;if(i>o)return null;var a=Math.sqrt(o-i),s=r-a,c=r+a;return s<0&&c<0?null:s<0?this.at(c,n):this.at(s,n)}}(),intersectsSphere:function(e){return this.distanceToPoint(e.center)<=e.radius},distanceToPlane:function(e){var t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null},intersectPlane:function(e,t){var n=this.distanceToPlane(e);return null===n?null:this.at(n,t)},intersectsPlane:function(e){var t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0},intersectBox:function(e,t){var n,r,i,o,a,s,c=1/this.direction.x,l=1/this.direction.y,u=1/this.direction.z,h=this.origin;return c>=0?(n=(e.min.x-h.x)*c,r=(e.max.x-h.x)*c):(n=(e.max.x-h.x)*c,r=(e.min.x-h.x)*c),l>=0?(i=(e.min.y-h.y)*l,o=(e.max.y-h.y)*l):(i=(e.max.y-h.y)*l,o=(e.min.y-h.y)*l),n>o||i>r?null:((i>n||n!=n)&&(n=i),(o<r||r!=r)&&(r=o),u>=0?(a=(e.min.z-h.z)*u,s=(e.max.z-h.z)*u):(a=(e.max.z-h.z)*u,s=(e.min.z-h.z)*u),n>s||a>r?null:((a>n||n!=n)&&(n=a),(s<r||r!=r)&&(r=s),r<0?null:this.at(n>=0?n:r,t)))},intersectsBox:(ut=new b,function(e){return null!==this.intersectBox(e,ut)}),intersectTriangle:function(){var e=new b,t=new b,n=new b,r=new b;return function(i,o,a,s,c){t.subVectors(o,i),n.subVectors(a,i),r.crossVectors(t,n);var l,u=this.direction.dot(r);if(u>0){if(s)return null;l=1}else{if(!(u<0))return null;l=-1,u=-u}e.subVectors(this.origin,i);var h=l*this.direction.dot(n.crossVectors(e,n));if(h<0)return null;var d=l*this.direction.dot(t.cross(e));if(d<0)return null;if(h+d>u)return null;var p=-l*e.dot(r);return p<0?null:this.at(p/u,c)}}(),applyMatrix4:function(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this},equals:function(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}}),Object.assign(Tt.prototype,{set:function(e,t){return this.start.copy(e),this.end.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.start.copy(e.start),this.end.copy(e.end),this},getCenter:function(e){return(e||new b).addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(e){return(e||new b).subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(e,t){var n=t||new b;return this.delta(n).multiplyScalar(e).add(this.start)},closestPointToPointParameter:(ft=new b,mt=new b,function(e,t){ft.subVectors(e,this.start),mt.subVectors(this.end,this.start);var n=mt.dot(mt),r=mt.dot(ft)/n;return t&&(r=m.clamp(r,0,1)),r}),closestPointToPoint:function(e,t,n){var r=this.closestPointToPointParameter(e,t),i=n||new b;return this.delta(i).multiplyScalar(r).add(this.start)},applyMatrix4:function(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this},equals:function(e){return e.start.equals(this.start)&&e.end.equals(this.end)}}),Object.assign(Mt,{normal:(gt=new b,function(e,t,n,r){var i=r||new b;i.subVectors(n,t),gt.subVectors(e,t),i.cross(gt);var o=i.lengthSq();return o>0?i.multiplyScalar(1/Math.sqrt(o)):i.set(0,0,0)}),barycoordFromPoint:function(){var e=new b,t=new b,n=new b;return function(r,i,o,a,s){e.subVectors(a,i),t.subVectors(o,i),n.subVectors(r,i);var c=e.dot(e),l=e.dot(t),u=e.dot(n),h=t.dot(t),d=t.dot(n),p=c*h-l*l,f=s||new b;if(0===p)return f.set(-2,-1,-1);var m=1/p,g=(h*u-l*d)*m,y=(c*d-l*u)*m;return f.set(1-g-y,y,g)}}(),containsPoint:function(){var e=new b;return function(t,n,r,i){var o=Mt.barycoordFromPoint(t,n,r,i,e);return o.x>=0&&o.y>=0&&o.x+o.y<=1}}()}),Object.assign(Mt.prototype,{set:function(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this},setFromPointsAndIndices:function(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this},area:function(){var e=new b,t=new b;return function(){return e.subVectors(this.c,this.b),t.subVectors(this.a,this.b),.5*e.cross(t).length()}}(),midpoint:function(e){return(e||new b).addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},normal:function(e){return Mt.normal(this.a,this.b,this.c,e)},plane:function(e){return(e||new Ne).setFromCoplanarPoints(this.a,this.b,this.c)},barycoordFromPoint:function(e,t){return Mt.barycoordFromPoint(e,this.a,this.b,this.c,t)},containsPoint:function(e){return Mt.containsPoint(e,this.a,this.b,this.c)},intersectsBox:function(e){return e.intersectsTriangle(this)},closestPointToPoint:function(){var e=new Ne,t=[new Tt,new Tt,new Tt],n=new b,r=new b;return function(i,o){var a=o||new b,s=1/0;if(e.setFromCoplanarPoints(this.a,this.b,this.c),e.projectPoint(i,n),!0===this.containsPoint(n))a.copy(n);else{t[0].set(this.a,this.b),t[1].set(this.b,this.c),t[2].set(this.c,this.a);for(var c=0;c<t.length;c++){t[c].closestPointToPoint(n,!0,r);var l=n.distanceToSquared(r);l<s&&(s=l,a.copy(r))}}return a}}(),equals:function(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}),Rt.prototype=Object.assign(Object.create(Ge.prototype),{constructor:Rt,isMesh:!0,setDrawMode:function(e){this.drawMode=e},copy:function(e){return Ge.prototype.copy.call(this,e),this.drawMode=e.drawMode,void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this},updateMorphTargets:function(){var e,t,n,r=this.geometry;if(r.isBufferGeometry){var i=r.morphAttributes,o=Object.keys(i);if(o.length>0){var a=i[o[0]];if(void 0!==a)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},e=0,t=a.length;e<t;e++)n=a[e].name||String(e),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=e}}else{var s=r.morphTargets;if(void 0!==s&&s.length>0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},e=0,t=s.length;e<t;e++)n=s[e].name||String(e),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=e}},raycast:function(){var e=new y,t=new St,n=new Oe,r=new b,i=new b,o=new b,a=new b,s=new b,c=new b,l=new g,u=new g,h=new g,d=new b,p=new b,f=new b;function m(e,t,n,r,i,o,a){return Mt.barycoordFromPoint(e,t,n,r,d),i.multiplyScalar(d.x),o.multiplyScalar(d.y),a.multiplyScalar(d.z),i.add(o).add(a),i.clone()}function v(e,t,n,r,i,o,a,s){if(null===(1===t.side?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,2!==t.side,s)))return null;f.copy(s),f.applyMatrix4(e.matrixWorld);var c=n.ray.origin.distanceTo(f);return c<n.near||c>n.far?null:{distance:c,point:f.clone(),object:e}}function _(e,t,n,a,s,c,d,f){r.fromBufferAttribute(a,c),i.fromBufferAttribute(a,d),o.fromBufferAttribute(a,f);var g=v(e,e.material,t,n,r,i,o,p);return g&&(s&&(l.fromBufferAttribute(s,c),u.fromBufferAttribute(s,d),h.fromBufferAttribute(s,f),g.uv=m(p,r,i,o,l,u,h)),g.face=new Ze(c,d,f,Mt.normal(r,i,o)),g.faceIndex=c),g}return function(d,f){var g,y=this.geometry,b=this.material,w=this.matrixWorld;if(void 0!==b&&(null===y.boundingSphere&&y.computeBoundingSphere(),n.copy(y.boundingSphere),n.applyMatrix4(w),!1!==d.ray.intersectsSphere(n)&&(e.getInverse(w),t.copy(d.ray).applyMatrix4(e),null===y.boundingBox||!1!==t.intersectsBox(y.boundingBox))))if(y.isBufferGeometry){var E,A,x,S,T,M=y.index,R=y.attributes.position,C=y.attributes.uv;if(null!==M)for(S=0,T=M.count;S<T;S+=3)E=M.getX(S),A=M.getX(S+1),x=M.getX(S+2),(g=_(this,d,t,R,C,E,A,x))&&(g.faceIndex=Math.floor(S/3),f.push(g));else if(void 0!==R)for(S=0,T=R.count;S<T;S+=3)(g=_(this,d,t,R,C,E=S,A=S+1,x=S+2))&&(g.index=E,f.push(g))}else if(y.isGeometry){var k,I,P,O,N=Array.isArray(b),D=y.vertices,L=y.faces,F=y.faceVertexUvs[0];F.length>0&&(O=F);for(var j=0,U=L.length;j<U;j++){var B=L[j],V=N?b[B.materialIndex]:b;if(void 0!==V){if(k=D[B.a],I=D[B.b],P=D[B.c],!0===V.morphTargets){var H=y.morphTargets,z=this.morphTargetInfluences;r.set(0,0,0),i.set(0,0,0),o.set(0,0,0);for(var q=0,G=H.length;q<G;q++){var W=z[q];if(0!==W){var J=H[q].vertices;r.addScaledVector(a.subVectors(J[B.a],k),W),i.addScaledVector(s.subVectors(J[B.b],I),W),o.addScaledVector(c.subVectors(J[B.c],P),W)}}r.add(k),i.add(I),o.add(P),k=r,I=i,P=o}if(g=v(this,V,d,t,k,I,P,p)){if(O&&O[j]){var Z=O[j];l.copy(Z[0]),u.copy(Z[1]),h.copy(Z[2]),g.uv=m(p,k,I,P,l,u,h)}g.face=B,g.faceIndex=j,f.push(g)}}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}});var Vt=0;function Ht(e){switch(e){case 3e3:return["Linear","( value )"];case 3001:return["sRGB","( value )"];case 3002:return["RGBE","( value )"];case 3004:return["RGBM","( value, 7.0 )"];case 3005:return["RGBM","( value, 16.0 )"];case 3006:return["RGBD","( value, 256.0 )"];case 3007:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+e)}}function zt(e,t){var n=Ht(t);return"vec4 "+e+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function qt(e,t){var n;switch(t){case 1:n="Linear";break;case 2:n="Reinhard";break;case 3:n="Uncharted2";break;case 4:n="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+t)}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function Gt(e){return""!==e}function Wt(e,t){return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights)}function Jt(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}function Zt(e){return e.replace(/^[ \t]*#include +<([\w\d.]+)>/gm,(function(e,t){var n=ye[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return Zt(n)}))}function Yt(e){return e.replace(/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,(function(e,t,n,r){for(var i="",o=parseInt(t);o<parseInt(n);o++)i+=r.replace(/\[ i \]/g,"[ "+o+" ]");return i}))}function Xt(e,t,n,r,i,o){var a=e.context,s=r.defines,c=i.vertexShader,l=i.fragmentShader,u="SHADOWMAP_TYPE_BASIC";1===o.shadowMapType?u="SHADOWMAP_TYPE_PCF":2===o.shadowMapType&&(u="SHADOWMAP_TYPE_PCF_SOFT");var h="ENVMAP_TYPE_CUBE",d="ENVMAP_MODE_REFLECTION",p="ENVMAP_BLENDING_MULTIPLY";if(o.envMap){switch(r.envMap.mapping){case 301:case 302:h="ENVMAP_TYPE_CUBE";break;case 306:case 307:h="ENVMAP_TYPE_CUBE_UV";break;case 303:case 304:h="ENVMAP_TYPE_EQUIREC";break;case 305:h="ENVMAP_TYPE_SPHERE"}switch(r.envMap.mapping){case 302:case 304:d="ENVMAP_MODE_REFRACTION"}switch(r.combine){case 0:p="ENVMAP_BLENDING_MULTIPLY";break;case 1:p="ENVMAP_BLENDING_MIX";break;case 2:p="ENVMAP_BLENDING_ADD"}}var f,m,g,y,v,b=e.gammaFactor>0?e.gammaFactor:1,_=function(e,t,n){return[(e=e||{}).derivatives||t.envMapCubeUV||t.bumpMap||t.normalMap||t.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(e.fragDepth||t.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",e.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(e.shaderTextureLOD||t.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Gt).join("\n")}(r.extensions,o,t),w=function(e){var t=[];for(var n in e){var r=e[n];!1!==r&&t.push("#define "+n+" "+r)}return t.join("\n")}(s),E=a.createProgram();r.isRawShaderMaterial?((f=[w].filter(Gt).join("\n")).length>0&&(f+="\n"),(m=[_,w].filter(Gt).join("\n")).length>0&&(m+="\n")):(f=["precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,w,o.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+b,"#define MAX_BONES "+o.maxBones,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+d:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.displacementMap&&o.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.flatShading?"#define FLAT_SHADED":"",o.skinning?"#define USE_SKINNING":"",o.useVertexTexture?"#define BONE_TEXTURE":"",o.morphTargets?"#define USE_MORPHTARGETS":"",o.morphNormals&&!1===o.flatShading?"#define USE_MORPHNORMALS":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+u:"",o.sizeAttenuation?"#define USE_SIZEATTENUATION":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&t.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Gt).join("\n"),m=[_,"precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,w,o.alphaTest?"#define ALPHATEST "+o.alphaTest:"","#define GAMMA_FACTOR "+b,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+h:"",o.envMap?"#define "+d:"",o.envMap?"#define "+p:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.gradientMap?"#define USE_GRADIENTMAP":"",o.flatShading?"#define FLAT_SHADED":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+u:"",o.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",o.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&t.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",o.envMap&&t.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",0!==o.toneMapping?"#define TONE_MAPPING":"",0!==o.toneMapping?ye.tonemapping_pars_fragment:"",0!==o.toneMapping?qt("toneMapping",o.toneMapping):"",o.dithering?"#define DITHERING":"",o.outputEncoding||o.mapEncoding||o.envMapEncoding||o.emissiveMapEncoding?ye.encodings_pars_fragment:"",o.mapEncoding?zt("mapTexelToLinear",o.mapEncoding):"",o.envMapEncoding?zt("envMapTexelToLinear",o.envMapEncoding):"",o.emissiveMapEncoding?zt("emissiveMapTexelToLinear",o.emissiveMapEncoding):"",o.outputEncoding?(g="linearToOutputTexel",y=o.outputEncoding,v=Ht(y),"vec4 "+g+"( vec4 value ) { return LinearTo"+v[0]+v[1]+"; }"):"",o.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\n"].filter(Gt).join("\n")),c=Jt(c=Wt(c=Zt(c),o),o),l=Jt(l=Wt(l=Zt(l),o),o);var A=f+(c=Yt(c)),x=m+(l=Yt(l)),S=Bt(a,a.VERTEX_SHADER,A),T=Bt(a,a.FRAGMENT_SHADER,x);a.attachShader(E,S),a.attachShader(E,T),void 0!==r.index0AttributeName?a.bindAttribLocation(E,0,r.index0AttributeName):!0===o.morphTargets&&a.bindAttribLocation(E,0,"position"),a.linkProgram(E);var M,R,C=a.getProgramInfoLog(E).trim(),k=a.getShaderInfoLog(S).trim(),I=a.getShaderInfoLog(T).trim(),P=!0,O=!0;return!1===a.getProgramParameter(E,a.LINK_STATUS)?(P=!1,console.error("THREE.WebGLProgram: shader error: ",a.getError(),"gl.VALIDATE_STATUS",a.getProgramParameter(E,a.VALIDATE_STATUS),"gl.getProgramInfoLog",C,k,I)):""!==C?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",C):""!==k&&""!==I||(O=!1),O&&(this.diagnostics={runnable:P,material:r,programLog:C,vertexShader:{log:k,prefix:f},fragmentShader:{log:I,prefix:m}}),a.deleteShader(S),a.deleteShader(T),this.getUniforms=function(){return void 0===M&&(M=new de(a,E,e)),M},this.getAttributes=function(){return void 0===R&&(R=function(e,t){for(var n={},r=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),i=0;i<r;i++){var o=e.getActiveAttrib(t,i).name;n[o]=e.getAttribLocation(t,o)}return n}(a,E)),R},this.destroy=function(){a.deleteProgram(E),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.id=Vt++,this.code=n,this.usedTimes=1,this.program=E,this.vertexShader=S,this.fragmentShader=T,this}function Qt(e,t,n){var r=[],i={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow"},o=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering"];function a(e,t){var n;return e?e.isTexture?n=e.encoding:e.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),n=e.texture.encoding):n=3e3,3e3===n&&t&&(n=3007),n}this.getParameters=function(t,r,o,s,c,l,u){var h=i[t.type],d=u.isSkinnedMesh?function(e){var t=e.skeleton.bones;if(n.floatVertexTextures)return 1024;var r=n.maxVertexUniforms,i=Math.floor((r-20)/4),o=Math.min(i,t.length);return o<t.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+t.length+" bones. This GPU supports "+o+"."),0):o}(u):0,p=n.precision;null!==t.precision&&(p=n.getMaxPrecision(t.precision))!==t.precision&&console.warn("THREE.WebGLProgram.getParameters:",t.precision,"not supported, using",p,"instead.");var f=e.getRenderTarget();return{shaderID:h,precision:p,supportsVertexTextures:n.vertexTextures,outputEncoding:a(f?f.texture:null,e.gammaOutput),map:!!t.map,mapEncoding:a(t.map,e.gammaInput),envMap:!!t.envMap,envMapMode:t.envMap&&t.envMap.mapping,envMapEncoding:a(t.envMap,e.gammaInput),envMapCubeUV:!!t.envMap&&(306===t.envMap.mapping||307===t.envMap.mapping),lightMap:!!t.lightMap,aoMap:!!t.aoMap,emissiveMap:!!t.emissiveMap,emissiveMapEncoding:a(t.emissiveMap,e.gammaInput),bumpMap:!!t.bumpMap,normalMap:!!t.normalMap,displacementMap:!!t.displacementMap,roughnessMap:!!t.roughnessMap,metalnessMap:!!t.metalnessMap,specularMap:!!t.specularMap,alphaMap:!!t.alphaMap,gradientMap:!!t.gradientMap,combine:t.combine,vertexColors:t.vertexColors,fog:!!s,useFog:t.fog,fogExp:s&&s.isFogExp2,flatShading:t.flatShading,sizeAttenuation:t.sizeAttenuation,logarithmicDepthBuffer:n.logarithmicDepthBuffer,skinning:t.skinning&&d>0,maxBones:d,useVertexTexture:n.floatVertexTextures,morphTargets:t.morphTargets,morphNormals:t.morphNormals,maxMorphTargets:e.maxMorphTargets,maxMorphNormals:e.maxMorphNormals,numDirLights:r.directional.length,numPointLights:r.point.length,numSpotLights:r.spot.length,numRectAreaLights:r.rectArea.length,numHemiLights:r.hemi.length,numClippingPlanes:c,numClipIntersection:l,dithering:t.dithering,shadowMapEnabled:e.shadowMap.enabled&&u.receiveShadow&&o.length>0,shadowMapType:e.shadowMap.type,toneMapping:e.toneMapping,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:t.premultipliedAlpha,alphaTest:t.alphaTest,doubleSided:2===t.side,flipSided:1===t.side,depthPacking:void 0!==t.depthPacking&&t.depthPacking}},this.getProgramCode=function(t,n){var r=[];if(n.shaderID?r.push(n.shaderID):(r.push(t.fragmentShader),r.push(t.vertexShader)),void 0!==t.defines)for(var i in t.defines)r.push(i),r.push(t.defines[i]);for(var a=0;a<o.length;a++)r.push(n[o[a]]);return r.push(t.onBeforeCompile.toString()),r.push(e.gammaOutput),r.join()},this.acquireProgram=function(n,i,o,a){for(var s,c=0,l=r.length;c<l;c++){var u=r[c];if(u.code===a){++(s=u).usedTimes;break}}return void 0===s&&(s=new Xt(e,t,a,n,i,o),r.push(s)),s},this.releaseProgram=function(e){if(0==--e.usedTimes){var t=r.indexOf(e);r[t]=r[r.length-1],r.pop(),e.destroy()}},this.programs=r}function Kt(e,t,n,r,i,o,a,s){var c,l="undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext,u={};function h(e,t){if(e.width>t||e.height>t){var n=t/Math.max(e.width,e.height),r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return r.width=Math.floor(e.width*n),r.height=Math.floor(e.height*n),r.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,r.width,r.height),console.warn("THREE.WebGLRenderer: image is too big ("+e.width+"x"+e.height+"). Resized to "+r.width+"x"+r.height,e),r}return e}function d(e){return m.isPowerOfTwo(e.width)&&m.isPowerOfTwo(e.height)}function p(e,t){return e.generateMipmaps&&t&&1003!==e.minFilter&&1006!==e.minFilter}function f(t){return 1003===t||1004===t||1005===t?e.NEAREST:e.LINEAR}function g(t){var n=t.target;n.removeEventListener("dispose",g),function(t){var n=r.get(t);if(t.image&&n.__image__webglTextureCube)e.deleteTexture(n.__image__webglTextureCube);else{if(void 0===n.__webglInit)return;e.deleteTexture(n.__webglTexture)}r.remove(t)}(n),n.isVideoTexture&&delete u[n.id],a.textures--}function y(t){var n=t.target;n.removeEventListener("dispose",y),function(t){var n=r.get(t),i=r.get(t.texture);if(!t)return;void 0!==i.__webglTexture&&e.deleteTexture(i.__webglTexture);t.depthTexture&&t.depthTexture.dispose();if(t.isWebGLRenderTargetCube)for(var o=0;o<6;o++)e.deleteFramebuffer(n.__webglFramebuffer[o]),n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer[o]);else e.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer);r.remove(t.texture),r.remove(t)}(n),a.textures--}function v(t,f){var y=r.get(t);if(t.isVideoTexture&&function(e){var t=e.id,n=s.frame;u[t]!==n&&(u[t]=n,e.update())}(t),t.version>0&&y.__version!==t.version){var v=t.image;if(void 0===v)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",t);else{if(!1!==v.complete)return void function(t,r,s){void 0===t.__webglInit&&(t.__webglInit=!0,r.addEventListener("dispose",g),t.__webglTexture=e.createTexture(),a.textures++);n.activeTexture(e.TEXTURE0+s),n.bindTexture(e.TEXTURE_2D,t.__webglTexture),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,r.unpackAlignment);var u=h(r.image,i.maxTextureSize);(function(e){return 1001!==e.wrapS||1001!==e.wrapT||1003!==e.minFilter&&1006!==e.minFilter})(r)&&!1===d(u)&&(u=function(e){return e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageBitmap?(void 0===c&&(c=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),c.width=m.floorPowerOfTwo(e.width),c.height=m.floorPowerOfTwo(e.height),c.getContext("2d").drawImage(e,0,0,c.width,c.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+e.width+"x"+e.height+"). Resized to "+c.width+"x"+c.height,e),c):e}(u));var f=d(u),y=o.convert(r.format),v=o.convert(r.type);b(e.TEXTURE_2D,r,f);var _,w=r.mipmaps;if(r.isDepthTexture){var E=e.DEPTH_COMPONENT;if(1015===r.type){if(!l)throw new Error("Float Depth Texture only supported in WebGL2.0");E=e.DEPTH_COMPONENT32F}else l&&(E=e.DEPTH_COMPONENT16);1026===r.format&&E===e.DEPTH_COMPONENT&&1012!==r.type&&1014!==r.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=1012,v=o.convert(r.type)),1027===r.format&&(E=e.DEPTH_STENCIL,1020!==r.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=1020,v=o.convert(r.type))),n.texImage2D(e.TEXTURE_2D,0,E,u.width,u.height,0,y,v,null)}else if(r.isDataTexture)if(w.length>0&&f){for(var A=0,x=w.length;A<x;A++)_=w[A],n.texImage2D(e.TEXTURE_2D,A,y,_.width,_.height,0,y,v,_.data);r.generateMipmaps=!1}else n.texImage2D(e.TEXTURE_2D,0,y,u.width,u.height,0,y,v,u.data);else if(r.isCompressedTexture)for(A=0,x=w.length;A<x;A++)_=w[A],1023!==r.format&&1022!==r.format?n.getCompressedTextureFormats().indexOf(y)>-1?n.compressedTexImage2D(e.TEXTURE_2D,A,y,_.width,_.height,0,_.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(e.TEXTURE_2D,A,y,_.width,_.height,0,y,v,_.data);else if(w.length>0&&f){for(A=0,x=w.length;A<x;A++)_=w[A],n.texImage2D(e.TEXTURE_2D,A,y,y,v,_);r.generateMipmaps=!1}else n.texImage2D(e.TEXTURE_2D,0,y,y,v,u);p(r,f)&&e.generateMipmap(e.TEXTURE_2D);t.__version=r.version,r.onUpdate&&r.onUpdate(r)}(y,t,f);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",t)}}n.activeTexture(e.TEXTURE0+f),n.bindTexture(e.TEXTURE_2D,y.__webglTexture)}function b(n,a,s){var c;if(s?(e.texParameteri(n,e.TEXTURE_WRAP_S,o.convert(a.wrapS)),e.texParameteri(n,e.TEXTURE_WRAP_T,o.convert(a.wrapT)),e.texParameteri(n,e.TEXTURE_MAG_FILTER,o.convert(a.magFilter)),e.texParameteri(n,e.TEXTURE_MIN_FILTER,o.convert(a.minFilter))):(e.texParameteri(n,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(n,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),1001===a.wrapS&&1001===a.wrapT||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",a),e.texParameteri(n,e.TEXTURE_MAG_FILTER,f(a.magFilter)),e.texParameteri(n,e.TEXTURE_MIN_FILTER,f(a.minFilter)),1003!==a.minFilter&&1006!==a.minFilter&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",a)),c=t.get("EXT_texture_filter_anisotropic")){if(1015===a.type&&null===t.get("OES_texture_float_linear"))return;if(1016===a.type&&null===t.get("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(e.texParameterf(n,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function _(t,i,a,s){var c=o.convert(i.texture.format),l=o.convert(i.texture.type);n.texImage2D(s,0,c,i.width,i.height,0,c,l,null),e.bindFramebuffer(e.FRAMEBUFFER,t),e.framebufferTexture2D(e.FRAMEBUFFER,a,s,r.get(i.texture).__webglTexture,0),e.bindFramebuffer(e.FRAMEBUFFER,null)}function w(t,n){e.bindRenderbuffer(e.RENDERBUFFER,t),n.depthBuffer&&!n.stencilBuffer?(e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t)):n.depthBuffer&&n.stencilBuffer?(e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t)):e.renderbufferStorage(e.RENDERBUFFER,e.RGBA4,n.width,n.height),e.bindRenderbuffer(e.RENDERBUFFER,null)}function E(t){var n=r.get(t),i=!0===t.isWebGLRenderTargetCube;if(t.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");!function(t,n){if(n&&n.isWebGLRenderTargetCube)throw new Error("Depth Texture with cube render targets is not supported");if(e.bindFramebuffer(e.FRAMEBUFFER,t),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),v(n.depthTexture,0);var i=r.get(n.depthTexture).__webglTexture;if(1026===n.depthTexture.format)e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,i,0);else{if(1027!==n.depthTexture.format)throw new Error("Unknown depthTexture format");e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,i,0)}}(n.__webglFramebuffer,t)}else if(i){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)e.bindFramebuffer(e.FRAMEBUFFER,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=e.createRenderbuffer(),w(n.__webglDepthbuffer[o],t)}else e.bindFramebuffer(e.FRAMEBUFFER,n.__webglFramebuffer),n.__webglDepthbuffer=e.createRenderbuffer(),w(n.__webglDepthbuffer,t);e.bindFramebuffer(e.FRAMEBUFFER,null)}this.setTexture2D=v,this.setTextureCube=function(t,s){var c=r.get(t);if(6===t.image.length)if(t.version>0&&c.__version!==t.version){c.__image__webglTextureCube||(t.addEventListener("dispose",g),c.__image__webglTextureCube=e.createTexture(),a.textures++),n.activeTexture(e.TEXTURE0+s),n.bindTexture(e.TEXTURE_CUBE_MAP,c.__image__webglTextureCube),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t.flipY);for(var l=t&&t.isCompressedTexture,u=t.image[0]&&t.image[0].isDataTexture,f=[],m=0;m<6;m++)f[m]=l||u?u?t.image[m].image:t.image[m]:h(t.image[m],i.maxCubemapSize);var y=d(f[0]),v=o.convert(t.format),_=o.convert(t.type);b(e.TEXTURE_CUBE_MAP,t,y);for(m=0;m<6;m++)if(l)for(var w,E=f[m].mipmaps,A=0,x=E.length;A<x;A++)w=E[A],1023!==t.format&&1022!==t.format?n.getCompressedTextureFormats().indexOf(v)>-1?n.compressedTexImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+m,A,v,w.width,w.height,0,w.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+m,A,v,w.width,w.height,0,v,_,w.data);else u?n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+m,0,v,f[m].width,f[m].height,0,v,_,f[m].data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+m,0,v,v,_,f[m]);p(t,y)&&e.generateMipmap(e.TEXTURE_CUBE_MAP),c.__version=t.version,t.onUpdate&&t.onUpdate(t)}else n.activeTexture(e.TEXTURE0+s),n.bindTexture(e.TEXTURE_CUBE_MAP,c.__image__webglTextureCube)},this.setTextureCubeDynamic=function(t,i){n.activeTexture(e.TEXTURE0+i),n.bindTexture(e.TEXTURE_CUBE_MAP,r.get(t).__webglTexture)},this.setupRenderTarget=function(t){var i=r.get(t),o=r.get(t.texture);t.addEventListener("dispose",y),o.__webglTexture=e.createTexture(),a.textures++;var s=!0===t.isWebGLRenderTargetCube,c=d(t);if(s){i.__webglFramebuffer=[];for(var l=0;l<6;l++)i.__webglFramebuffer[l]=e.createFramebuffer()}else i.__webglFramebuffer=e.createFramebuffer();if(s){n.bindTexture(e.TEXTURE_CUBE_MAP,o.__webglTexture),b(e.TEXTURE_CUBE_MAP,t.texture,c);for(l=0;l<6;l++)_(i.__webglFramebuffer[l],t,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+l);p(t.texture,c)&&e.generateMipmap(e.TEXTURE_CUBE_MAP),n.bindTexture(e.TEXTURE_CUBE_MAP,null)}else n.bindTexture(e.TEXTURE_2D,o.__webglTexture),b(e.TEXTURE_2D,t.texture,c),_(i.__webglFramebuffer,t,e.COLOR_ATTACHMENT0,e.TEXTURE_2D),p(t.texture,c)&&e.generateMipmap(e.TEXTURE_2D),n.bindTexture(e.TEXTURE_2D,null);t.depthBuffer&&E(t)},this.updateRenderTargetMipmap=function(t){var i=t.texture;if(p(i,d(t))){var o=t.isWebGLRenderTargetCube?e.TEXTURE_CUBE_MAP:e.TEXTURE_2D,a=r.get(i).__webglTexture;n.bindTexture(o,a),e.generateMipmap(o),n.bindTexture(o,null)}}}function $t(){var e={};return{get:function(t){var n=t.uuid,r=e[n];return void 0===r&&(r={},e[n]=r),r},remove:function(t){delete e[t.uuid]},update:function(t,n,r){var i=t.uuid;e[i][n]=r},dispose:function(){e={}}}}function en(e,t,n){var r=new function(){var t=!1,n=new A,r=null,i=new A(0,0,0,0);return{setMask:function(n){r===n||t||(e.colorMask(n,n,n,n),r=n)},setLocked:function(e){t=e},setClear:function(t,r,o,a,s){!0===s&&(t*=a,r*=a,o*=a),n.set(t,r,o,a),!1===i.equals(n)&&(e.clearColor(t,r,o,a),i.copy(n))},reset:function(){t=!1,r=null,i.set(-1,0,0,0)}}},i=new function(){var t=!1,n=null,r=null,i=null;return{setTest:function(t){t?F(e.DEPTH_TEST):j(e.DEPTH_TEST)},setMask:function(r){n===r||t||(e.depthMask(r),n=r)},setFunc:function(t){if(r!==t){if(t)switch(t){case 0:e.depthFunc(e.NEVER);break;case 1:e.depthFunc(e.ALWAYS);break;case 2:e.depthFunc(e.LESS);break;case 3:e.depthFunc(e.LEQUAL);break;case 4:e.depthFunc(e.EQUAL);break;case 5:e.depthFunc(e.GEQUAL);break;case 6:e.depthFunc(e.GREATER);break;case 7:e.depthFunc(e.NOTEQUAL);break;default:e.depthFunc(e.LEQUAL)}else e.depthFunc(e.LEQUAL);r=t}},setLocked:function(e){t=e},setClear:function(t){i!==t&&(e.clearDepth(t),i=t)},reset:function(){t=!1,n=null,r=null,i=null}}},o=new function(){var t=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,l=null;return{setTest:function(t){t?F(e.STENCIL_TEST):j(e.STENCIL_TEST)},setMask:function(r){n===r||t||(e.stencilMask(r),n=r)},setFunc:function(t,n,a){r===t&&i===n&&o===a||(e.stencilFunc(t,n,a),r=t,i=n,o=a)},setOp:function(t,n,r){a===t&&s===n&&c===r||(e.stencilOp(t,n,r),a=t,s=n,c=r)},setLocked:function(e){t=e},setClear:function(t){l!==t&&(e.clearStencil(t),l=t)},reset:function(){t=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,l=null}}},a=e.getParameter(e.MAX_VERTEX_ATTRIBS),s=new Uint8Array(a),c=new Uint8Array(a),l=new Uint8Array(a),u={},h=null,d=null,p=null,f=null,m=null,g=null,y=null,v=null,b=null,_=!1,w=null,E=null,x=null,S=null,T=null,M=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS),R=!1,C=0,k=e.getParameter(e.VERSION);-1!==k.indexOf("WebGL")?(C=parseFloat(/^WebGL\ ([0-9])/.exec(k)[1]),R=C>=1):-1!==k.indexOf("OpenGL ES")&&(C=parseFloat(/^OpenGL\ ES\ ([0-9])/.exec(k)[1]),R=C>=2);var I=null,P={},O=new A,N=new A;function D(t,n,r){var i=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(var a=0;a<r;a++)e.texImage2D(n+a,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,i);return o}var L={};function F(t){!0!==u[t]&&(e.enable(t),u[t]=!0)}function j(t){!1!==u[t]&&(e.disable(t),u[t]=!1)}function U(t,r,i,o,a,s,c,l){if(0!==t?F(e.BLEND):j(e.BLEND),5!==t){if(t!==p||l!==_)switch(t){case 2:l?(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ONE,e.ONE,e.ONE,e.ONE)):(e.blendEquation(e.FUNC_ADD),e.blendFunc(e.SRC_ALPHA,e.ONE));break;case 3:l?(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ZERO,e.ZERO,e.ONE_MINUS_SRC_COLOR,e.ONE_MINUS_SRC_ALPHA)):(e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ZERO,e.ONE_MINUS_SRC_COLOR));break;case 4:l?(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ZERO,e.SRC_COLOR,e.ZERO,e.SRC_ALPHA)):(e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ZERO,e.SRC_COLOR));break;default:l?(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ONE,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA)):(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA))}f=null,m=null,g=null,y=null,v=null,b=null}else a=a||r,s=s||i,c=c||o,r===f&&a===y||(e.blendEquationSeparate(n.convert(r),n.convert(a)),f=r,y=a),i===m&&o===g&&s===v&&c===b||(e.blendFuncSeparate(n.convert(i),n.convert(o),n.convert(s),n.convert(c)),m=i,g=o,v=s,b=c);p=t,_=l}function B(t){w!==t&&(t?e.frontFace(e.CW):e.frontFace(e.CCW),w=t)}function V(t){0!==t?(F(e.CULL_FACE),t!==E&&(1===t?e.cullFace(e.BACK):2===t?e.cullFace(e.FRONT):e.cullFace(e.FRONT_AND_BACK))):j(e.CULL_FACE),E=t}function H(t,n,r){t?(F(e.POLYGON_OFFSET_FILL),S===n&&T===r||(e.polygonOffset(n,r),S=n,T=r)):j(e.POLYGON_OFFSET_FILL)}function z(t){void 0===t&&(t=e.TEXTURE0+M-1),I!==t&&(e.activeTexture(t),I=t)}return L[e.TEXTURE_2D]=D(e.TEXTURE_2D,e.TEXTURE_2D,1),L[e.TEXTURE_CUBE_MAP]=D(e.TEXTURE_CUBE_MAP,e.TEXTURE_CUBE_MAP_POSITIVE_X,6),r.setClear(0,0,0,1),i.setClear(1),o.setClear(0),F(e.DEPTH_TEST),i.setFunc(3),B(!1),V(1),F(e.CULL_FACE),F(e.BLEND),U(1),{buffers:{color:r,depth:i,stencil:o},initAttributes:function(){for(var e=0,t=s.length;e<t;e++)s[e]=0},enableAttribute:function(n){s[n]=1,0===c[n]&&(e.enableVertexAttribArray(n),c[n]=1),0!==l[n]&&(t.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,0),l[n]=0)},enableAttributeAndDivisor:function(n,r){s[n]=1,0===c[n]&&(e.enableVertexAttribArray(n),c[n]=1),l[n]!==r&&(t.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,r),l[n]=r)},disableUnusedAttributes:function(){for(var t=0,n=c.length;t!==n;++t)c[t]!==s[t]&&(e.disableVertexAttribArray(t),c[t]=0)},enable:F,disable:j,getCompressedTextureFormats:function(){if(null===h&&(h=[],t.get("WEBGL_compressed_texture_pvrtc")||t.get("WEBGL_compressed_texture_s3tc")||t.get("WEBGL_compressed_texture_etc1")||t.get("WEBGL_compressed_texture_astc")))for(var n=e.getParameter(e.COMPRESSED_TEXTURE_FORMATS),r=0;r<n.length;r++)h.push(n[r]);return h},useProgram:function(t){return d!==t&&(e.useProgram(t),d=t,!0)},setBlending:U,setMaterial:function(t,n){2===t.side?j(e.CULL_FACE):F(e.CULL_FACE);var o=1===t.side;n&&(o=!o),B(o),!0===t.transparent?U(t.blending,t.blendEquation,t.blendSrc,t.blendDst,t.blendEquationAlpha,t.blendSrcAlpha,t.blendDstAlpha,t.premultipliedAlpha):U(0),i.setFunc(t.depthFunc),i.setTest(t.depthTest),i.setMask(t.depthWrite),r.setMask(t.colorWrite),H(t.polygonOffset,t.polygonOffsetFactor,t.polygonOffsetUnits)},setFlipSided:B,setCullFace:V,setLineWidth:function(t){t!==x&&(R&&e.lineWidth(t),x=t)},setPolygonOffset:H,setScissorTest:function(t){t?F(e.SCISSOR_TEST):j(e.SCISSOR_TEST)},activeTexture:z,bindTexture:function(t,n){null===I&&z();var r=P[I];void 0===r&&(r={type:void 0,texture:void 0},P[I]=r),r.type===t&&r.texture===n||(e.bindTexture(t,n||L[t]),r.type=t,r.texture=n)},compressedTexImage2D:function(){try{e.compressedTexImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texImage2D:function(){try{e.texImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},scissor:function(t){!1===O.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),O.copy(t))},viewport:function(t){!1===N.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),N.copy(t))},reset:function(){for(var t=0;t<c.length;t++)1===c[t]&&(e.disableVertexAttribArray(t),c[t]=0);u={},h=null,I=null,P={},d=null,p=null,w=null,E=null,r.reset(),i.reset(),o.reset()}}}function tn(e,t,n){var r;function i(t){if("highp"===t){if(e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var o=void 0!==n.precision?n.precision:"highp",a=i(o);a!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",a,"instead."),o=a);var s=!0===n.logarithmicDepthBuffer,c=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),l=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),u=e.getParameter(e.MAX_TEXTURE_SIZE),h=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),d=e.getParameter(e.MAX_VERTEX_ATTRIBS),p=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),f=e.getParameter(e.MAX_VARYING_VECTORS),m=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),g=l>0,y=!!t.get("OES_texture_float");return{getMaxAnisotropy:function(){if(void 0!==r)return r;var n=t.get("EXT_texture_filter_anisotropic");return r=null!==n?e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:i,precision:o,logarithmicDepthBuffer:s,maxTextures:c,maxVertexTextures:l,maxTextureSize:u,maxCubemapSize:h,maxAttributes:d,maxVertexUniforms:p,maxVaryings:f,maxFragmentUniforms:m,vertexTextures:g,floatFragmentTextures:y,floatVertexTextures:g&&y}}function nn(e,t,n,r){We.call(this),this.type="PerspectiveCamera",this.fov=void 0!==e?e:50,this.zoom=1,this.near=void 0!==n?n:.1,this.far=void 0!==r?r:2e3,this.focus=10,this.aspect=void 0!==t?t:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function rn(e){nn.call(this),this.cameras=e||[]}function on(e){var t=this,n=null,r=null,i=null,o=new y,a=new y;"undefined"!=typeof window&&"VRFrameData"in window&&(r=new window.VRFrameData);var s=new y,c=new v,l=new b,u=new nn;u.bounds=new A(0,0,.5,1),u.layers.enable(1);var h=new nn;h.bounds=new A(.5,0,.5,1),h.layers.enable(2);var d,p,f=new rn([u,h]);function m(){if(null!==n&&n.isPresenting){var r=n.getEyeParameters("left"),i=r.renderWidth,o=r.renderHeight;p=e.getPixelRatio(),d=e.getSize(),e.setDrawingBufferSize(2*i,o,1)}else t.enabled&&e.setDrawingBufferSize(d.width,d.height,p)}f.layers.enable(1),f.layers.enable(2),"undefined"!=typeof window&&window.addEventListener("vrdisplaypresentchange",m,!1),this.enabled=!1,this.userHeight=1.6,this.getDevice=function(){return n},this.setDevice=function(e){void 0!==e&&(n=e)},this.setPoseTarget=function(e){void 0!==e&&(i=e)},this.getCamera=function(e){if(null===n)return e;n.depthNear=e.near,n.depthFar=e.far,n.getFrameData(r);var d=n.stageParameters;d?o.fromArray(d.sittingToStandingTransform):o.makeTranslation(0,t.userHeight,0);var p=r.pose,m=null!==i?i:e;if(m.matrix.copy(o),m.matrix.decompose(m.position,m.quaternion,m.scale),null!==p.orientation&&(c.fromArray(p.orientation),m.quaternion.multiply(c)),null!==p.position&&(c.setFromRotationMatrix(o),l.fromArray(p.position),l.applyQuaternion(c),m.position.add(l)),m.updateMatrixWorld(),!1===n.isPresenting)return e;u.near=e.near,h.near=e.near,u.far=e.far,h.far=e.far,f.matrixWorld.copy(e.matrixWorld),f.matrixWorldInverse.copy(e.matrixWorldInverse),u.matrixWorldInverse.fromArray(r.leftViewMatrix),h.matrixWorldInverse.fromArray(r.rightViewMatrix),a.getInverse(o),u.matrixWorldInverse.multiply(a),h.matrixWorldInverse.multiply(a);var g=m.parent;null!==g&&(s.getInverse(g.matrixWorld),u.matrixWorldInverse.multiply(s),h.matrixWorldInverse.multiply(s)),u.matrixWorld.getInverse(u.matrixWorldInverse),h.matrixWorld.getInverse(h.matrixWorldInverse),u.projectionMatrix.fromArray(r.leftProjectionMatrix),h.projectionMatrix.fromArray(r.rightProjectionMatrix),f.projectionMatrix.copy(u.projectionMatrix);var y=n.getLayers();if(y.length){var v=y[0];null!==v.leftBounds&&4===v.leftBounds.length&&u.bounds.fromArray(v.leftBounds),null!==v.rightBounds&&4===v.rightBounds.length&&h.bounds.fromArray(v.rightBounds)}return f},this.getStandingMatrix=function(){return o},this.submitFrame=function(){n&&n.isPresenting&&n.submitFrame()},this.dispose=function(){"undefined"!=typeof window&&window.removeEventListener("vrdisplaypresentchange",m)}}function an(e){var t={};return{get:function(n){if(void 0!==t[n])return t[n];var r;switch(n){case"WEBGL_depth_texture":r=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;case"WEBGL_compressed_texture_etc1":r=e.getExtension("WEBGL_compressed_texture_etc1");break;default:r=e.getExtension(n)}return null===r&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),t[n]=r,r}}}function sn(){var e=this,t=null,n=0,r=!1,i=!1,o=new Ne,a=new _,s={value:null,needsUpdate:!1};function c(){s.value!==t&&(s.value=t,s.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function l(t,n,r,i){var c=null!==t?t.length:0,l=null;if(0!==c){if(l=s.value,!0!==i||null===l){var u=r+4*c,h=n.matrixWorldInverse;a.getNormalMatrix(h),(null===l||l.length<u)&&(l=new Float32Array(u));for(var d=0,p=r;d!==c;++d,p+=4)o.copy(t[d]).applyMatrix4(h,a),o.normal.toArray(l,p),l[p+3]=o.constant}s.value=l,s.needsUpdate=!0}return e.numPlanes=c,l}this.uniform=s,this.numPlanes=0,this.numIntersection=0,this.init=function(e,i,o){var a=0!==e.length||i||0!==n||r;return r=i,t=l(e,o,0),n=e.length,a},this.beginShadows=function(){i=!0,l(null)},this.endShadows=function(){i=!1,c()},this.setState=function(e,o,a,u,h,d){if(!r||null===e||0===e.length||i&&!a)i?l(null):c();else{var p=i?0:n,f=4*p,m=h.clippingState||null;s.value=m,m=l(e,u,f,d);for(var g=0;g!==f;++g)m[g]=t[g];h.clippingState=m,this.numIntersection=o?this.numPlanes:0,this.numPlanes+=p}}}function cn(e,t){return{convert:function(n){var r;if(1e3===n)return e.REPEAT;if(1001===n)return e.CLAMP_TO_EDGE;if(1002===n)return e.MIRRORED_REPEAT;if(1003===n)return e.NEAREST;if(1004===n)return e.NEAREST_MIPMAP_NEAREST;if(1005===n)return e.NEAREST_MIPMAP_LINEAR;if(1006===n)return e.LINEAR;if(1007===n)return e.LINEAR_MIPMAP_NEAREST;if(1008===n)return e.LINEAR_MIPMAP_LINEAR;if(1009===n)return e.UNSIGNED_BYTE;if(1017===n)return e.UNSIGNED_SHORT_4_4_4_4;if(1018===n)return e.UNSIGNED_SHORT_5_5_5_1;if(1019===n)return e.UNSIGNED_SHORT_5_6_5;if(1010===n)return e.BYTE;if(1011===n)return e.SHORT;if(1012===n)return e.UNSIGNED_SHORT;if(1013===n)return e.INT;if(1014===n)return e.UNSIGNED_INT;if(1015===n)return e.FLOAT;if(1016===n&&null!==(r=t.get("OES_texture_half_float")))return r.HALF_FLOAT_OES;if(1021===n)return e.ALPHA;if(1022===n)return e.RGB;if(1023===n)return e.RGBA;if(1024===n)return e.LUMINANCE;if(1025===n)return e.LUMINANCE_ALPHA;if(1026===n)return e.DEPTH_COMPONENT;if(1027===n)return e.DEPTH_STENCIL;if(100===n)return e.FUNC_ADD;if(101===n)return e.FUNC_SUBTRACT;if(102===n)return e.FUNC_REVERSE_SUBTRACT;if(200===n)return e.ZERO;if(201===n)return e.ONE;if(202===n)return e.SRC_COLOR;if(203===n)return e.ONE_MINUS_SRC_COLOR;if(204===n)return e.SRC_ALPHA;if(205===n)return e.ONE_MINUS_SRC_ALPHA;if(206===n)return e.DST_ALPHA;if(207===n)return e.ONE_MINUS_DST_ALPHA;if(208===n)return e.DST_COLOR;if(209===n)return e.ONE_MINUS_DST_COLOR;if(210===n)return e.SRC_ALPHA_SATURATE;if((33776===n||33777===n||33778===n||33779===n)&&null!==(r=t.get("WEBGL_compressed_texture_s3tc"))){if(33776===n)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===n)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===n)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===n)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((35840===n||35841===n||35842===n||35843===n)&&null!==(r=t.get("WEBGL_compressed_texture_pvrtc"))){if(35840===n)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===n)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===n)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===n)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===n&&null!==(r=t.get("WEBGL_compressed_texture_etc1")))return r.COMPRESSED_RGB_ETC1_WEBGL;if((37808===n||37809===n||37810===n||37811===n||37812===n||37813===n||37814===n||37815===n||37816===n||37817===n||37818===n||37819===n||37820===n||37821===n)&&null!==(r=t.get("WEBGL_compressed_texture_astc")))return n;if((103===n||104===n)&&null!==(r=t.get("EXT_blend_minmax"))){if(103===n)return r.MIN_EXT;if(104===n)return r.MAX_EXT}return 1020===n&&null!==(r=t.get("WEBGL_depth_texture"))?r.UNSIGNED_INT_24_8_WEBGL:0}}}function ln(){var e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];var n;switch(t.type){case"DirectionalLight":n={direction:new b,color:new fe,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new g};break;case"SpotLight":n={position:new b,direction:new b,color:new fe,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new g};break;case"PointLight":n={position:new b,color:new fe,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new g,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":n={direction:new b,skyColor:new fe,groundColor:new fe};break;case"RectAreaLight":n={color:new fe,position:new b,halfWidth:new b,halfHeight:new b}}return e[t.id]=n,n}}}nn.prototype=Object.assign(Object.create(We.prototype),{constructor:nn,isPerspectiveCamera:!0,copy:function(e,t){return We.prototype.copy.call(this,e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this},setFocalLength:function(e){var t=.5*this.getFilmHeight()/e;this.fov=2*m.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var e=Math.tan(.5*m.DEG2RAD*this.fov);return.5*this.getFilmHeight()/e},getEffectiveFOV:function(){return 2*m.RAD2DEG*Math.atan(Math.tan(.5*m.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(e,t,n,r,i,o){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e=this.near,t=e*Math.tan(.5*m.DEG2RAD*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r,o=this.view;if(null!==this.view&&this.view.enabled){var a=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/a,t-=o.offsetY*n/s,r*=o.width/a,n*=o.height/s}var c=this.filmOffset;0!==c&&(i+=e*c/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far)},toJSON:function(e){var t=Ge.prototype.toJSON.call(this,e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}),rn.prototype=Object.assign(Object.create(nn.prototype),{constructor:rn,isArrayCamera:!0});var un,hn,dn,pn,fn,mn,gn,yn,vn=0;function bn(){var e=new ln,t={id:vn++,hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},n=new b,r=new y,i=new y;return{setup:function(o,a,s){for(var c=0,l=0,u=0,h=0,d=0,p=0,f=0,m=0,g=s.matrixWorldInverse,y=0,v=o.length;y<v;y++){var b=o[y],_=b.color,w=b.intensity,E=b.distance,A=b.shadow&&b.shadow.map?b.shadow.map.texture:null;if(b.isAmbientLight)c+=_.r*w,l+=_.g*w,u+=_.b*w;else if(b.isDirectionalLight){if((S=e.get(b)).color.copy(b.color).multiplyScalar(b.intensity),S.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),S.direction.sub(n),S.direction.transformDirection(g),S.shadow=b.castShadow,b.castShadow){var x=b.shadow;S.shadowBias=x.bias,S.shadowRadius=x.radius,S.shadowMapSize=x.mapSize}t.directionalShadowMap[h]=A,t.directionalShadowMatrix[h]=b.shadow.matrix,t.directional[h]=S,h++}else if(b.isSpotLight){if((S=e.get(b)).position.setFromMatrixPosition(b.matrixWorld),S.position.applyMatrix4(g),S.color.copy(_).multiplyScalar(w),S.distance=E,S.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),S.direction.sub(n),S.direction.transformDirection(g),S.coneCos=Math.cos(b.angle),S.penumbraCos=Math.cos(b.angle*(1-b.penumbra)),S.decay=0===b.distance?0:b.decay,S.shadow=b.castShadow,b.castShadow){x=b.shadow;S.shadowBias=x.bias,S.shadowRadius=x.radius,S.shadowMapSize=x.mapSize}t.spotShadowMap[p]=A,t.spotShadowMatrix[p]=b.shadow.matrix,t.spot[p]=S,p++}else if(b.isRectAreaLight){(S=e.get(b)).color.copy(_).multiplyScalar(w),S.position.setFromMatrixPosition(b.matrixWorld),S.position.applyMatrix4(g),i.identity(),r.copy(b.matrixWorld),r.premultiply(g),i.extractRotation(r),S.halfWidth.set(.5*b.width,0,0),S.halfHeight.set(0,.5*b.height,0),S.halfWidth.applyMatrix4(i),S.halfHeight.applyMatrix4(i),t.rectArea[f]=S,f++}else if(b.isPointLight){if((S=e.get(b)).position.setFromMatrixPosition(b.matrixWorld),S.position.applyMatrix4(g),S.color.copy(b.color).multiplyScalar(b.intensity),S.distance=b.distance,S.decay=0===b.distance?0:b.decay,S.shadow=b.castShadow,b.castShadow){x=b.shadow;S.shadowBias=x.bias,S.shadowRadius=x.radius,S.shadowMapSize=x.mapSize,S.shadowCameraNear=x.camera.near,S.shadowCameraFar=x.camera.far}t.pointShadowMap[d]=A,t.pointShadowMatrix[d]=b.shadow.matrix,t.point[d]=S,d++}else if(b.isHemisphereLight){var S;(S=e.get(b)).direction.setFromMatrixPosition(b.matrixWorld),S.direction.transformDirection(g),S.direction.normalize(),S.skyColor.copy(b.color).multiplyScalar(w),S.groundColor.copy(b.groundColor).multiplyScalar(w),t.hemi[m]=S,m++}}t.ambient[0]=c,t.ambient[1]=l,t.ambient[2]=u,t.directional.length=h,t.spot.length=p,t.rectArea.length=f,t.point.length=d,t.hemi.length=m,t.hash=t.id+","+h+","+d+","+p+","+f+","+m+","+a.length},state:t}}function _n(){var e=new bn,t=[],n=[],r=[];return{init:function(){t.length=0,n.length=0,r.length=0},state:{lightsArray:t,shadowsArray:n,spritesArray:r,lights:e},setupLights:function(r){e.setup(t,n,r)},pushLight:function(e){t.push(e)},pushShadow:function(e){n.push(e)},pushSprite:function(e){r.push(e)}}}function wn(){var e={};return{get:function(t,n){var r=t.id+","+n.id,i=e[r];return void 0===i&&(i=new _n,e[r]=i),i},dispose:function(){e={}}}}function En(e){console.log("THREE.WebGLRenderer","90");var t=void 0!==(e=e||{}).canvas?e.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),n=void 0!==e.context?e.context:null,r=void 0!==e.alpha&&e.alpha,i=void 0===e.depth||e.depth,o=void 0===e.stencil||e.stencil,a=void 0!==e.antialias&&e.antialias,s=void 0===e.premultipliedAlpha||e.premultipliedAlpha,c=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,l=void 0!==e.powerPreference?e.powerPreference:"default",u=null,h=null;this.domElement=t,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=1,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var d,p,f,g,v,_,w,E,x,S,M,R,C,k,I,P,O,N,D=this,L=!1,F=null,j=null,U=-1,B="",V=null,H=null,z=new A,q=new A,G=null,W=0,J=t.width,Z=t.height,Y=1,X=new A(0,0,J,Z),Q=new A(0,0,J,Z),K=!1,$=new De,ee=new sn,te=!1,ne=!1,re=new y,ie=new b,oe={geometries:0,textures:0},ae={frame:0,calls:0,vertices:0,faces:0,points:0};function se(){return null===F?Y:1}this.info={render:ae,memory:oe,programs:null,autoReset:!0,reset:function(){ae.frame++,ae.calls=0,ae.vertices=0,ae.faces=0,ae.points=0}};try{var ce={alpha:r,depth:i,stencil:o,antialias:a,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:l};if(t.addEventListener("webglcontextlost",pe,!1),t.addEventListener("webglcontextrestored",fe,!1),null===(d=n||t.getContext("webgl",ce)||t.getContext("experimental-webgl",ce)))throw null!==t.getContext("webgl")?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.");void 0===d.getShaderPrecisionFormat&&(d.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(e){console.error("THREE.WebGLRenderer: "+e.message)}function le(){(p=new an(d)).get("WEBGL_depth_texture"),p.get("OES_texture_float"),p.get("OES_texture_float_linear"),p.get("OES_texture_half_float"),p.get("OES_texture_half_float_linear"),p.get("OES_standard_derivatives"),p.get("OES_element_index_uint"),p.get("ANGLE_instanced_arrays"),N=new cn(d,p),f=new tn(d,p,e),(g=new en(d,p,N)).scissor(q.copy(Q).multiplyScalar(Y)),g.viewport(z.copy(X).multiplyScalar(Y)),v=new $t,_=new Kt(d,p,g,v,f,N,oe,ae),w=new Fe(d),E=new jt(d,w,oe),x=new Ut(E,ae),k=new Dt(d),S=new Qt(D,p,f),M=new Ot,R=new wn,C=new Ct(D,g,E,s),I=new Ft(d,p,ae),P=new Lt(d,p,ae),O=new _e(D,d,g,_,f),D.info.programs=S.programs,D.context=d,D.capabilities=f,D.extensions=p,D.properties=v,D.renderLists=M,D.state=g}le();var ue=new on(D);this.vr=ue;var he=new Le(D,x,f.maxTextureSize);function pe(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),L=!0}function fe(){console.log("THREE.WebGLRenderer: Context Restored."),L=!1,le()}function ye(e){var t=e.target;t.removeEventListener("dispose",ye),function(e){be(e),v.remove(e)}(t)}function be(e){var t=v.get(e).program;e.program=void 0,void 0!==t&&S.releaseProgram(t)}this.shadowMap=he,this.getContext=function(){return d},this.getContextAttributes=function(){return d.getContextAttributes()},this.forceContextLoss=function(){var e=p.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){var e=p.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return Y},this.setPixelRatio=function(e){void 0!==e&&(Y=e,this.setSize(J,Z,!1))},this.getSize=function(){return{width:J,height:Z}},this.setSize=function(e,n,r){var i=ue.getDevice();i&&i.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(J=e,Z=n,t.width=e*Y,t.height=n*Y,!1!==r&&(t.style.width=e+"px",t.style.height=n+"px"),this.setViewport(0,0,e,n))},this.getDrawingBufferSize=function(){return{width:J*Y,height:Z*Y}},this.setDrawingBufferSize=function(e,n,r){J=e,Z=n,Y=r,t.width=e*r,t.height=n*r,this.setViewport(0,0,e,n)},this.getCurrentViewport=function(){return z},this.setViewport=function(e,t,n,r){X.set(e,Z-t-r,n,r),g.viewport(z.copy(X).multiplyScalar(Y))},this.setScissor=function(e,t,n,r){Q.set(e,Z-t-r,n,r),g.scissor(q.copy(Q).multiplyScalar(Y))},this.setScissorTest=function(e){g.setScissorTest(K=e)},this.getClearColor=function(){return C.getClearColor()},this.setClearColor=function(){C.setClearColor.apply(C,arguments)},this.getClearAlpha=function(){return C.getClearAlpha()},this.setClearAlpha=function(){C.setClearAlpha.apply(C,arguments)},this.clear=function(e,t,n){var r=0;(void 0===e||e)&&(r|=d.COLOR_BUFFER_BIT),(void 0===t||t)&&(r|=d.DEPTH_BUFFER_BIT),(void 0===n||n)&&(r|=d.STENCIL_BUFFER_BIT),d.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(e,t,n,r){this.setRenderTarget(e),this.clear(t,n,r)},this.dispose=function(){t.removeEventListener("webglcontextlost",pe,!1),t.removeEventListener("webglcontextrestored",fe,!1),M.dispose(),R.dispose(),v.dispose(),x.dispose(),ue.dispose(),xe()},this.renderBufferImmediate=function(e,t,n){g.initAttributes();var r=v.get(e);e.hasPositions&&!r.position&&(r.position=d.createBuffer()),e.hasNormals&&!r.normal&&(r.normal=d.createBuffer()),e.hasUvs&&!r.uv&&(r.uv=d.createBuffer()),e.hasColors&&!r.color&&(r.color=d.createBuffer());var i=t.getAttributes();if(e.hasPositions&&(d.bindBuffer(d.ARRAY_BUFFER,r.position),d.bufferData(d.ARRAY_BUFFER,e.positionArray,d.DYNAMIC_DRAW),g.enableAttribute(i.position),d.vertexAttribPointer(i.position,3,d.FLOAT,!1,0,0)),e.hasNormals){if(d.bindBuffer(d.ARRAY_BUFFER,r.normal),!n.isMeshPhongMaterial&&!n.isMeshStandardMaterial&&!n.isMeshNormalMaterial&&!0===n.flatShading)for(var o=0,a=3*e.count;o<a;o+=9){var s=e.normalArray,c=(s[o+0]+s[o+3]+s[o+6])/3,l=(s[o+1]+s[o+4]+s[o+7])/3,u=(s[o+2]+s[o+5]+s[o+8])/3;s[o+0]=c,s[o+1]=l,s[o+2]=u,s[o+3]=c,s[o+4]=l,s[o+5]=u,s[o+6]=c,s[o+7]=l,s[o+8]=u}d.bufferData(d.ARRAY_BUFFER,e.normalArray,d.DYNAMIC_DRAW),g.enableAttribute(i.normal),d.vertexAttribPointer(i.normal,3,d.FLOAT,!1,0,0)}e.hasUvs&&n.map&&(d.bindBuffer(d.ARRAY_BUFFER,r.uv),d.bufferData(d.ARRAY_BUFFER,e.uvArray,d.DYNAMIC_DRAW),g.enableAttribute(i.uv),d.vertexAttribPointer(i.uv,2,d.FLOAT,!1,0,0)),e.hasColors&&0!==n.vertexColors&&(d.bindBuffer(d.ARRAY_BUFFER,r.color),d.bufferData(d.ARRAY_BUFFER,e.colorArray,d.DYNAMIC_DRAW),g.enableAttribute(i.color),d.vertexAttribPointer(i.color,3,d.FLOAT,!1,0,0)),g.disableUnusedAttributes(),d.drawArrays(d.TRIANGLES,0,e.count),e.count=0},this.renderBufferDirect=function(e,t,n,r,i,o){var a=i.isMesh&&i.matrixWorld.determinant()<0;g.setMaterial(r,a);var s=ke(e,t,r,i),c=n.id+"_"+s.id+"_"+(!0===r.wireframe),l=!1;c!==B&&(B=c,l=!0),i.morphTargetInfluences&&(k.update(i,n,r,s),l=!0);var u,h=n.index,f=n.attributes.position,m=1;!0===r.wireframe&&(h=E.getWireframeAttribute(n),m=2);var y=I;null!==h&&(u=w.get(h),(y=P).setIndex(u)),l&&(!function(e,t,n,r){if(n&&n.isInstancedBufferGeometry&&null===p.get("ANGLE_instanced_arrays"))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");void 0===r&&(r=0);g.initAttributes();var i=n.attributes,o=t.getAttributes(),a=e.defaultAttributeValues;for(var s in o){var c=o[s];if(c>=0){var l=i[s];if(void 0!==l){var u=l.normalized,h=l.itemSize,f=w.get(l);if(void 0===f)continue;var m=f.buffer,y=f.type,v=f.bytesPerElement;if(l.isInterleavedBufferAttribute){var b=l.data,_=b.stride,E=l.offset;b&&b.isInstancedInterleavedBuffer?(g.enableAttributeAndDivisor(c,b.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=b.meshPerAttribute*b.count)):g.enableAttribute(c),d.bindBuffer(d.ARRAY_BUFFER,m),d.vertexAttribPointer(c,h,y,u,_*v,(r*_+E)*v)}else l.isInstancedBufferAttribute?(g.enableAttributeAndDivisor(c,l.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=l.meshPerAttribute*l.count)):g.enableAttribute(c),d.bindBuffer(d.ARRAY_BUFFER,m),d.vertexAttribPointer(c,h,y,u,0,r*h*v)}else if(void 0!==a){var A=a[s];if(void 0!==A)switch(A.length){case 2:d.vertexAttrib2fv(c,A);break;case 3:d.vertexAttrib3fv(c,A);break;case 4:d.vertexAttrib4fv(c,A);break;default:d.vertexAttrib1fv(c,A)}}}}g.disableUnusedAttributes()}(r,s,n),null!==h&&d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,u.buffer));var v=1/0;null!==h?v=h.count:void 0!==f&&(v=f.count);var b=n.drawRange.start*m,_=n.drawRange.count*m,A=null!==o?o.start*m:0,x=null!==o?o.count*m:1/0,S=Math.max(b,A),T=Math.min(v,b+_,A+x)-1,M=Math.max(0,T-S+1);if(0!==M){if(i.isMesh)if(!0===r.wireframe)g.setLineWidth(r.wireframeLinewidth*se()),y.setMode(d.LINES);else switch(i.drawMode){case 0:y.setMode(d.TRIANGLES);break;case 1:y.setMode(d.TRIANGLE_STRIP);break;case 2:y.setMode(d.TRIANGLE_FAN)}else if(i.isLine){var R=r.linewidth;void 0===R&&(R=1),g.setLineWidth(R*se()),i.isLineSegments?y.setMode(d.LINES):i.isLineLoop?y.setMode(d.LINE_LOOP):y.setMode(d.LINE_STRIP)}else i.isPoints&&y.setMode(d.POINTS);n&&n.isInstancedBufferGeometry?n.maxInstancedCount>0&&y.renderInstances(n,S,M):y.render(S,M)}},this.compile=function(e,t){(h=R.get(e,t)).init(),e.traverse((function(e){e.isLight&&(h.pushLight(e),e.castShadow&&h.pushShadow(e))})),h.setupLights(t),e.traverse((function(t){if(t.material)if(Array.isArray(t.material))for(var n=0;n<t.material.length;n++)Ce(t.material[n],e.fog,t);else Ce(t.material,e.fog,t)}))};var we,Ee=!1,Ae=null;function xe(){Ee=!1}function Se(){var e=ue.getDevice();e&&e.isPresenting?e.requestAnimationFrame(Te):window.requestAnimationFrame(Te)}function Te(e){!1!==Ee&&(Ae(e),Se())}function Me(e,t,n,r){for(var i=0,o=e.length;i<o;i++){var a=e[i],s=a.object,c=a.geometry,l=void 0===r?a.material:r,u=a.group;if(n.isArrayCamera){H=n;for(var h=n.cameras,d=0,p=h.length;d<p;d++){var f=h[d];if(s.layers.test(f.layers)){var m=f.bounds,y=m.x*J,v=m.y*Z,b=m.z*J,_=m.w*Z;g.viewport(z.set(y,v,b,_).multiplyScalar(Y)),Re(s,t,f,c,l,u)}}}else H=null,Re(s,t,n,c,l,u)}}function Re(e,t,n,r,i,o){if(e.onBeforeRender(D,t,n,r,i,o),h=R.get(t,H||n),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),e.isImmediateRenderObject){var a=e.isMesh&&e.matrixWorld.determinant()<0;g.setMaterial(i,a);var s=ke(n,t.fog,i,e);B="",function(e,t,n){e.render((function(e){D.renderBufferImmediate(e,t,n)}))}(e,s,i)}else D.renderBufferDirect(n,t.fog,r,i,e,o);e.onAfterRender(D,t,n,r,i,o),h=R.get(t,H||n)}function Ce(e,t,n){var r=v.get(e),i=h.state.lights,o=h.state.shadowsArray,a=S.getParameters(e,i.state,o,t,ee.numPlanes,ee.numIntersection,n),s=S.getProgramCode(e,a),c=r.program,l=!0;if(void 0===c)e.addEventListener("dispose",ye);else if(c.code!==s)be(e);else if(r.lightsHash!==i.state.hash)v.update(e,"lightsHash",i.state.hash),l=!1;else{if(void 0!==a.shaderID)return;l=!1}if(l){if(a.shaderID){var u=ve[a.shaderID];r.shader={name:e.type,uniforms:ge.clone(u.uniforms),vertexShader:u.vertexShader,fragmentShader:u.fragmentShader}}else r.shader={name:e.type,uniforms:e.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader};e.onBeforeCompile(r.shader),c=S.acquireProgram(e,r.shader,a,s),r.program=c,e.program=c}var d=c.getAttributes();if(e.morphTargets){e.numSupportedMorphTargets=0;for(var p=0;p<D.maxMorphTargets;p++)d["morphTarget"+p]>=0&&e.numSupportedMorphTargets++}if(e.morphNormals){e.numSupportedMorphNormals=0;for(p=0;p<D.maxMorphNormals;p++)d["morphNormal"+p]>=0&&e.numSupportedMorphNormals++}var f=r.shader.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(r.numClippingPlanes=ee.numPlanes,r.numIntersection=ee.numIntersection,f.clippingPlanes=ee.uniform),r.fog=t,r.lightsHash=i.state.hash,e.lights&&(f.ambientLightColor.value=i.state.ambient,f.directionalLights.value=i.state.directional,f.spotLights.value=i.state.spot,f.rectAreaLights.value=i.state.rectArea,f.pointLights.value=i.state.point,f.hemisphereLights.value=i.state.hemi,f.directionalShadowMap.value=i.state.directionalShadowMap,f.directionalShadowMatrix.value=i.state.directionalShadowMatrix,f.spotShadowMap.value=i.state.spotShadowMap,f.spotShadowMatrix.value=i.state.spotShadowMatrix,f.pointShadowMap.value=i.state.pointShadowMap,f.pointShadowMatrix.value=i.state.pointShadowMatrix);var m=r.program.getUniforms(),g=de.seqWithValue(m.seq,f);r.uniformsList=g}function ke(e,t,n,r){W=0;var i=v.get(n),o=h.state.lights;if(te&&(ne||e!==V)){var a=e===V&&n.id===U;ee.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,e,i,a)}!1===n.needsUpdate&&(void 0===i.program||n.fog&&i.fog!==t||n.lights&&i.lightsHash!==o.state.hash?n.needsUpdate=!0:void 0===i.numClippingPlanes||i.numClippingPlanes===ee.numPlanes&&i.numIntersection===ee.numIntersection||(n.needsUpdate=!0)),n.needsUpdate&&(Ce(n,t,r),n.needsUpdate=!1);var s,c,l=!1,u=!1,p=!1,y=i.program,b=y.getUniforms(),_=i.shader.uniforms;if(g.useProgram(y.program)&&(l=!0,u=!0,p=!0),n.id!==U&&(U=n.id,u=!0),l||e!==V){if(b.setValue(d,"projectionMatrix",e.projectionMatrix),f.logarithmicDepthBuffer&&b.setValue(d,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),V!==(H||e)&&(V=H||e,u=!0,p=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var w=b.map.cameraPosition;void 0!==w&&w.setValue(d,ie.setFromMatrixPosition(e.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&b.setValue(d,"viewMatrix",e.matrixWorldInverse)}if(n.skinning){b.setOptional(d,r,"bindMatrix"),b.setOptional(d,r,"bindMatrixInverse");var E=r.skeleton;if(E){var A=E.bones;if(f.floatVertexTextures){if(void 0===E.boneTexture){var x=Math.sqrt(4*A.length);x=m.ceilPowerOfTwo(x),x=Math.max(x,4);var S=new Float32Array(x*x*4);S.set(E.boneMatrices);var M=new T(S,x,x,1023,1015);M.needsUpdate=!0,E.boneMatrices=S,E.boneTexture=M,E.boneTextureSize=x}b.setValue(d,"boneTexture",E.boneTexture),b.setValue(d,"boneTextureSize",E.boneTextureSize)}else b.setOptional(d,E,"boneMatrices")}}return u&&(b.setValue(d,"toneMappingExposure",D.toneMappingExposure),b.setValue(d,"toneMappingWhitePoint",D.toneMappingWhitePoint),n.lights&&(c=p,(s=_).ambientLightColor.needsUpdate=c,s.directionalLights.needsUpdate=c,s.pointLights.needsUpdate=c,s.spotLights.needsUpdate=c,s.rectAreaLights.needsUpdate=c,s.hemisphereLights.needsUpdate=c),t&&n.fog&&function(e,t){e.fogColor.value=t.color,t.isFog?(e.fogNear.value=t.near,e.fogFar.value=t.far):t.isFogExp2&&(e.fogDensity.value=t.density)}(_,t),n.isMeshBasicMaterial?Ie(_,n):n.isMeshLambertMaterial?(Ie(_,n),function(e,t){t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap)}(_,n)):n.isMeshPhongMaterial?(Ie(_,n),n.isMeshToonMaterial?function(e,t){Pe(e,t),t.gradientMap&&(e.gradientMap.value=t.gradientMap)}(_,n):Pe(_,n)):n.isMeshStandardMaterial?(Ie(_,n),n.isMeshPhysicalMaterial?function(e,t){e.clearCoat.value=t.clearCoat,e.clearCoatRoughness.value=t.clearCoatRoughness,Oe(e,t)}(_,n):Oe(_,n)):n.isMeshDepthMaterial?(Ie(_,n),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(_,n)):n.isMeshDistanceMaterial?(Ie(_,n),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias);e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}(_,n)):n.isMeshNormalMaterial?(Ie(_,n),function(e,t){t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale);t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale));t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(_,n)):n.isLineBasicMaterial?(function(e,t){e.diffuse.value=t.color,e.opacity.value=t.opacity}(_,n),n.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(_,n)):n.isPointsMaterial?function(e,t){if(e.diffuse.value=t.color,e.opacity.value=t.opacity,e.size.value=t.size*Y,e.scale.value=.5*Z,e.map.value=t.map,null!==t.map){if(!0===t.map.matrixAutoUpdate){var n=t.map.offset,r=t.map.repeat,i=t.map.rotation,o=t.map.center;t.map.matrix.setUvTransform(n.x,n.y,r.x,r.y,i,o.x,o.y)}e.uvTransform.value.copy(t.map.matrix)}}(_,n):n.isShadowMaterial&&(_.color.value=n.color,_.opacity.value=n.opacity),void 0!==_.ltc_1&&(_.ltc_1.value=me.LTC_1),void 0!==_.ltc_2&&(_.ltc_2.value=me.LTC_2),de.upload(d,i.uniformsList,_,D)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(de.upload(d,i.uniformsList,_,D),n.uniformsNeedUpdate=!1),b.setValue(d,"modelViewMatrix",r.modelViewMatrix),b.setValue(d,"normalMatrix",r.normalMatrix),b.setValue(d,"modelMatrix",r.matrixWorld),y}function Ie(e,t){var n;if(e.opacity.value=t.opacity,t.color&&(e.diffuse.value=t.color),t.emissive&&e.emissive.value.copy(t.emissive).multiplyScalar(t.emissiveIntensity),t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.specularMap&&(e.specularMap.value=t.specularMap),t.envMap&&(e.envMap.value=t.envMap,e.flipEnvMap.value=t.envMap&&t.envMap.isCubeTexture?-1:1,e.reflectivity.value=t.reflectivity,e.refractionRatio.value=t.refractionRatio),t.lightMap&&(e.lightMap.value=t.lightMap,e.lightMapIntensity.value=t.lightMapIntensity),t.aoMap&&(e.aoMap.value=t.aoMap,e.aoMapIntensity.value=t.aoMapIntensity),t.map?n=t.map:t.specularMap?n=t.specularMap:t.displacementMap?n=t.displacementMap:t.normalMap?n=t.normalMap:t.bumpMap?n=t.bumpMap:t.roughnessMap?n=t.roughnessMap:t.metalnessMap?n=t.metalnessMap:t.alphaMap?n=t.alphaMap:t.emissiveMap&&(n=t.emissiveMap),void 0!==n){if(n.isWebGLRenderTarget&&(n=n.texture),!0===n.matrixAutoUpdate){var r=n.offset,i=n.repeat,o=n.rotation,a=n.center;n.matrix.setUvTransform(r.x,r.y,i.x,i.y,o,a.x,a.y)}e.uvTransform.value.copy(n.matrix)}}function Pe(e,t){e.specular.value=t.specular,e.shininess.value=Math.max(t.shininess,1e-4),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale)),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}function Oe(e,t){e.roughness.value=t.roughness,e.metalness.value=t.metalness,t.roughnessMap&&(e.roughnessMap.value=t.roughnessMap),t.metalnessMap&&(e.metalnessMap.value=t.metalnessMap),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale)),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias),t.envMap&&(e.envMapIntensity.value=t.envMapIntensity)}this.animate=function(e){null!==(Ae=e)?Ee||(Se(),Ee=!0):xe()},this.render=function(e,t,n,r){if(t&&t.isCamera){if(!L){B="",U=-1,V=null,!0===e.autoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),ue.enabled&&(t=ue.getCamera(t)),(h=R.get(e,t)).init(),e.onBeforeRender(D,e,t,n),re.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),$.setFromMatrix(re),ne=this.localClippingEnabled,te=ee.init(this.clippingPlanes,ne,t),(u=M.get(e,t)).init(),function e(t,n,r){if(!1===t.visible)return;if(t.layers.test(n.layers))if(t.isLight)h.pushLight(t),t.castShadow&&h.pushShadow(t);else if(t.isSprite)t.frustumCulled&&!$.intersectsSprite(t)||h.pushSprite(t);else if(t.isImmediateRenderObject)r&&ie.setFromMatrixPosition(t.matrixWorld).applyMatrix4(re),u.push(t,null,t.material,ie.z,null);else if((t.isMesh||t.isLine||t.isPoints)&&(t.isSkinnedMesh&&t.skeleton.update(),!t.frustumCulled||$.intersectsObject(t))){r&&ie.setFromMatrixPosition(t.matrixWorld).applyMatrix4(re);var i=x.update(t),o=t.material;if(Array.isArray(o))for(var a=i.groups,s=0,c=a.length;s<c;s++){var l=a[s],d=o[l.materialIndex];d&&d.visible&&u.push(t,i,d,ie.z,l)}else o.visible&&u.push(t,i,o,ie.z,null)}var p=t.children;for(s=0,c=p.length;s<c;s++)e(p[s],n,r)}(e,t,D.sortObjects),!0===D.sortObjects&&u.sort(),te&&ee.beginShadows();var i=h.state.shadowsArray;he.render(i,e,t),h.setupLights(t),te&&ee.endShadows(),this.info.autoReset&&this.info.reset(),void 0===n&&(n=null),this.setRenderTarget(n),C.render(u,e,t,r);var o=u.opaque,a=u.transparent;if(e.overrideMaterial){var s=e.overrideMaterial;o.length&&Me(o,e,t,s),a.length&&Me(a,e,t,s)}else o.length&&Me(o,e,t),a.length&&Me(a,e,t);var c=h.state.spritesArray;O.render(c,e,t),n&&_.updateRenderTargetMipmap(n),g.buffers.depth.setTest(!0),g.buffers.depth.setMask(!0),g.buffers.color.setMask(!0),g.setPolygonOffset(!1),e.onAfterRender(D,e,t),ue.enabled&&ue.submitFrame(),u=null,h=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.allocTextureUnit=function(){var e=W;return e>=f.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+e+" texture units while this GPU supports only "+f.maxTextures),W+=1,e},this.setTexture2D=(we=!1,function(e,t){e&&e.isWebGLRenderTarget&&(we||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),we=!0),e=e.texture),_.setTexture2D(e,t)}),this.setTexture=function(){var e=!1;return function(t,n){e||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),e=!0),_.setTexture2D(t,n)}}(),this.setTextureCube=function(){var e=!1;return function(t,n){t&&t.isWebGLRenderTargetCube&&(e||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),e=!0),t=t.texture),t&&t.isCubeTexture||Array.isArray(t.image)&&6===t.image.length?_.setTextureCube(t,n):_.setTextureCubeDynamic(t,n)}}(),this.getRenderTarget=function(){return F},this.setRenderTarget=function(e){F=e,e&&void 0===v.get(e).__webglFramebuffer&&_.setupRenderTarget(e);var t=null,n=!1;if(e){var r=v.get(e).__webglFramebuffer;e.isWebGLRenderTargetCube?(t=r[e.activeCubeFace],n=!0):t=r,z.copy(e.viewport),q.copy(e.scissor),G=e.scissorTest}else z.copy(X).multiplyScalar(Y),q.copy(Q).multiplyScalar(Y),G=K;if(j!==t&&(d.bindFramebuffer(d.FRAMEBUFFER,t),j=t),g.viewport(z),g.scissor(q),g.setScissorTest(G),n){var i=v.get(e.texture);d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_CUBE_MAP_POSITIVE_X+e.activeCubeFace,i.__webglTexture,e.activeMipMapLevel)}},this.readRenderTargetPixels=function(e,t,n,r,i,o){if(e&&e.isWebGLRenderTarget){var a=v.get(e).__webglFramebuffer;if(a){var s=!1;a!==j&&(d.bindFramebuffer(d.FRAMEBUFFER,a),s=!0);try{var c=e.texture,l=c.format,u=c.type;if(1023!==l&&N.convert(l)!==d.getParameter(d.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(1009===u||N.convert(u)===d.getParameter(d.IMPLEMENTATION_COLOR_READ_TYPE)||1015===u&&(p.get("OES_texture_float")||p.get("WEBGL_color_buffer_float"))||1016===u&&p.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");d.checkFramebufferStatus(d.FRAMEBUFFER)===d.FRAMEBUFFER_COMPLETE?t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&d.readPixels(t,n,r,i,N.convert(l),N.convert(u),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&d.bindFramebuffer(d.FRAMEBUFFER,j)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(e,t,n){var r=t.image.width,i=t.image.height,o=N.convert(t.format);this.setTexture2D(t,0),d.copyTexImage2D(d.TEXTURE_2D,n||0,o,e.x,e.y,r,i,0)}}function An(e,t){this.name="",this.color=new fe(e),this.density=void 0!==t?t:25e-5}function xn(e,t,n){this.name="",this.color=new fe(e),this.near=void 0!==t?t:1,this.far=void 0!==n?n:1e3}function Sn(){Ge.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function Tn(e){Ce.call(this),this.type="SpriteMaterial",this.color=new fe(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(e)}function Mn(e){Ge.call(this),this.type="Sprite",this.material=void 0!==e?e:new Tn,this.center=new g(.5,.5)}function Rn(){Ge.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Cn(e,t){if(e=e||[],this.bones=e.slice(0),this.boneMatrices=new Float32Array(16*this.bones.length),void 0===t)this.calculateInverses();else if(this.bones.length===t.length)this.boneInverses=t.slice(0);else{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new y)}}function kn(){Ge.call(this),this.type="Bone"}function In(e,t){Rt.call(this,e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new y,this.bindMatrixInverse=new y;var n=new Cn(this.initBones());this.bind(n,this.matrixWorld),this.normalizeSkinWeights()}function Pn(e){Ce.call(this),this.type="LineBasicMaterial",this.color=new fe(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(e)}function On(e,t,n){if(1===n)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new Nn(e,t);Ge.call(this),this.type="Line",this.geometry=void 0!==e?e:new vt,this.material=void 0!==t?t:new Pn({color:16777215*Math.random()})}function Nn(e,t){On.call(this,e,t),this.type="LineSegments"}function Dn(e,t){On.call(this,e,t),this.type="LineLoop"}function Ln(e){Ce.call(this),this.type="PointsMaterial",this.color=new fe(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=!1,this.setValues(e)}function Fn(e,t){Ge.call(this),this.type="Points",this.geometry=void 0!==e?e:new vt,this.material=void 0!==t?t:new Ln({color:16777215*Math.random()})}function jn(){Ge.call(this),this.type="Group"}function Un(e,t,n,r,i,o,a,s,c){E.call(this,e,t,n,r,i,o,a,s,c),this.generateMipmaps=!1}function Bn(e,t,n,r,i,o,a,s,c,l,u,h){E.call(this,null,o,a,s,c,l,r,i,u,h),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}function Vn(e,t,n,r,i,o,a,s,c,l){if(1026!==(l=void 0!==l?l:1026)&&1027!==l)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&1026===l&&(n=1012),void 0===n&&1027===l&&(n=1020),E.call(this,null,r,i,o,a,s,l,n,c),this.image={width:e,height:t},this.magFilter=void 0!==a?a:1003,this.minFilter=void 0!==s?s:1003,this.flipY=!1,this.generateMipmaps=!1}function Hn(e){vt.call(this),this.type="WireframeGeometry";var t,n,r,i,o,a,s,c,l,u,h=[],d=[0,0],p={},f=["a","b","c"];if(e&&e.isGeometry){var m=e.faces;for(t=0,r=m.length;t<r;t++){var g=m[t];for(n=0;n<3;n++)s=g[f[n]],c=g[f[(n+1)%3]],d[0]=Math.min(s,c),d[1]=Math.max(s,c),void 0===p[l=d[0]+","+d[1]]&&(p[l]={index1:d[0],index2:d[1]})}for(l in p)a=p[l],u=e.vertices[a.index1],h.push(u.x,u.y,u.z),u=e.vertices[a.index2],h.push(u.x,u.y,u.z)}else if(e&&e.isBufferGeometry){var y,v,_,w,E,A,x;if(u=new b,null!==e.index){for(y=e.attributes.position,v=e.index,0===(_=e.groups).length&&(_=[{start:0,count:v.count,materialIndex:0}]),i=0,o=_.length;i<o;++i)for(t=E=(w=_[i]).start,r=E+w.count;t<r;t+=3)for(n=0;n<3;n++)s=v.getX(t+n),c=v.getX(t+(n+1)%3),d[0]=Math.min(s,c),d[1]=Math.max(s,c),void 0===p[l=d[0]+","+d[1]]&&(p[l]={index1:d[0],index2:d[1]});for(l in p)a=p[l],u.fromBufferAttribute(y,a.index1),h.push(u.x,u.y,u.z),u.fromBufferAttribute(y,a.index2),h.push(u.x,u.y,u.z)}else for(t=0,r=(y=e.attributes.position).count/3;t<r;t++)for(n=0;n<3;n++)A=3*t+n,u.fromBufferAttribute(y,A),h.push(u.x,u.y,u.z),x=3*t+(n+1)%3,u.fromBufferAttribute(y,x),h.push(u.x,u.y,u.z)}this.addAttribute("position",new at(h,3))}function zn(e,t,n){Qe.call(this),this.type="ParametricGeometry",this.parameters={func:e,slices:t,stacks:n},this.fromBufferGeometry(new qn(e,t,n)),this.mergeVertices()}function qn(e,t,n){vt.call(this),this.type="ParametricBufferGeometry",this.parameters={func:e,slices:t,stacks:n};var r,i,o=[],a=[],s=[],c=[],l=1e-5,u=new b,h=new b,d=new b,p=new b,f=new b,m=t+1;for(r=0;r<=n;r++){var g=r/n;for(i=0;i<=t;i++){var y=i/t;h=e(y,g,h),a.push(h.x,h.y,h.z),y-l>=0?(d=e(y-l,g,d),p.subVectors(h,d)):(d=e(y+l,g,d),p.subVectors(d,h)),g-l>=0?(d=e(y,g-l,d),f.subVectors(h,d)):(d=e(y,g+l,d),f.subVectors(d,h)),u.crossVectors(p,f).normalize(),s.push(u.x,u.y,u.z),c.push(y,g)}}for(r=0;r<n;r++)for(i=0;i<t;i++){var v=r*m+i,_=r*m+i+1,w=(r+1)*m+i+1,E=(r+1)*m+i;o.push(v,_,E),o.push(_,w,E)}this.setIndex(o),this.addAttribute("position",new at(a,3)),this.addAttribute("normal",new at(s,3)),this.addAttribute("uv",new at(c,2))}function Gn(e,t,n,r){Qe.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:r},this.fromBufferGeometry(new Wn(e,t,n,r)),this.mergeVertices()}function Wn(e,t,n,r){vt.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:r},n=n||1;var i=[],o=[];function a(e,t,n,r){var i,o,a=Math.pow(2,r),c=[];for(i=0;i<=a;i++){c[i]=[];var l=e.clone().lerp(n,i/a),u=t.clone().lerp(n,i/a),h=a-i;for(o=0;o<=h;o++)c[i][o]=0===o&&i===a?l:l.clone().lerp(u,o/h)}for(i=0;i<a;i++)for(o=0;o<2*(a-i)-1;o++){var d=Math.floor(o/2);o%2==0?(s(c[i][d+1]),s(c[i+1][d]),s(c[i][d])):(s(c[i][d+1]),s(c[i+1][d+1]),s(c[i+1][d]))}}function s(e){i.push(e.x,e.y,e.z)}function c(t,n){var r=3*t;n.x=e[r+0],n.y=e[r+1],n.z=e[r+2]}function l(e,t,n,r){r<0&&1===e.x&&(o[t]=e.x-1),0===n.x&&0===n.z&&(o[t]=r/2/Math.PI+.5)}function u(e){return Math.atan2(e.z,-e.x)}function h(e){return Math.atan2(-e.y,Math.sqrt(e.x*e.x+e.z*e.z))}!function(e){for(var n=new b,r=new b,i=new b,o=0;o<t.length;o+=3)c(t[o+0],n),c(t[o+1],r),c(t[o+2],i),a(n,r,i,e)}(r=r||0),function(e){for(var t=new b,n=0;n<i.length;n+=3)t.x=i[n+0],t.y=i[n+1],t.z=i[n+2],t.normalize().multiplyScalar(e),i[n+0]=t.x,i[n+1]=t.y,i[n+2]=t.z}(n),function(){for(var e=new b,t=0;t<i.length;t+=3){e.x=i[t+0],e.y=i[t+1],e.z=i[t+2];var n=u(e)/2/Math.PI+.5,r=h(e)/Math.PI+.5;o.push(n,1-r)}(function(){for(var e=new b,t=new b,n=new b,r=new b,a=new g,s=new g,c=new g,h=0,d=0;h<i.length;h+=9,d+=6){e.set(i[h+0],i[h+1],i[h+2]),t.set(i[h+3],i[h+4],i[h+5]),n.set(i[h+6],i[h+7],i[h+8]),a.set(o[d+0],o[d+1]),s.set(o[d+2],o[d+3]),c.set(o[d+4],o[d+5]),r.copy(e).add(t).add(n).divideScalar(3);var p=u(r);l(a,d+0,e,p),l(s,d+2,t,p),l(c,d+4,n,p)}})(),function(){for(var e=0;e<o.length;e+=6){var t=o[e+0],n=o[e+2],r=o[e+4],i=Math.max(t,n,r),a=Math.min(t,n,r);i>.9&&a<.1&&(t<.2&&(o[e+0]+=1),n<.2&&(o[e+2]+=1),r<.2&&(o[e+4]+=1))}}()}(),this.addAttribute("position",new at(i,3)),this.addAttribute("normal",new at(i.slice(),3)),this.addAttribute("uv",new at(o,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}function Jn(e,t){Qe.call(this),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Zn(e,t)),this.mergeVertices()}function Zn(e,t){Wn.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],e,t),this.type="TetrahedronBufferGeometry",this.parameters={radius:e,detail:t}}function Yn(e,t){Qe.call(this),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Xn(e,t)),this.mergeVertices()}function Xn(e,t){Wn.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],e,t),this.type="OctahedronBufferGeometry",this.parameters={radius:e,detail:t}}function Qn(e,t){Qe.call(this),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Kn(e,t)),this.mergeVertices()}function Kn(e,t){var n=(1+Math.sqrt(5))/2,r=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1];Wn.call(this,r,[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],e,t),this.type="IcosahedronBufferGeometry",this.parameters={radius:e,detail:t}}function $n(e,t){Qe.call(this),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new er(e,t)),this.mergeVertices()}function er(e,t){var n=(1+Math.sqrt(5))/2,r=1/n,i=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r];Wn.call(this,i,[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronBufferGeometry",this.parameters={radius:e,detail:t}}function tr(e,t,n,r,i,o){Qe.call(this),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:i},void 0!==o&&console.warn("THREE.TubeGeometry: taper has been removed.");var a=new nr(e,t,n,r,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals,this.fromBufferGeometry(a),this.mergeVertices()}function nr(e,t,n,r,i){vt.call(this),this.type="TubeBufferGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:i},t=t||64,n=n||1,r=r||8,i=i||!1;var o=e.computeFrenetFrames(t,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;var a,s,c=new b,l=new b,u=new g,h=new b,d=[],p=[],f=[],m=[];function y(i){h=e.getPointAt(i/t,h);var a=o.normals[i],u=o.binormals[i];for(s=0;s<=r;s++){var f=s/r*Math.PI*2,m=Math.sin(f),g=-Math.cos(f);l.x=g*a.x+m*u.x,l.y=g*a.y+m*u.y,l.z=g*a.z+m*u.z,l.normalize(),p.push(l.x,l.y,l.z),c.x=h.x+n*l.x,c.y=h.y+n*l.y,c.z=h.z+n*l.z,d.push(c.x,c.y,c.z)}}!function(){for(a=0;a<t;a++)y(a);y(!1===i?t:0),function(){for(a=0;a<=t;a++)for(s=0;s<=r;s++)u.x=a/t,u.y=s/r,f.push(u.x,u.y)}(),function(){for(s=1;s<=t;s++)for(a=1;a<=r;a++){var e=(r+1)*(s-1)+(a-1),n=(r+1)*s+(a-1),i=(r+1)*s+a,o=(r+1)*(s-1)+a;m.push(e,n,o),m.push(n,i,o)}}()}(),this.setIndex(m),this.addAttribute("position",new at(d,3)),this.addAttribute("normal",new at(p,3)),this.addAttribute("uv",new at(f,2))}function rr(e,t,n,r,i,o,a){Qe.call(this),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:r,p:i,q:o},void 0!==a&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new ir(e,t,n,r,i,o)),this.mergeVertices()}function ir(e,t,n,r,i,o){vt.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:r,p:i,q:o},e=e||1,t=t||.4,n=Math.floor(n)||64,r=Math.floor(r)||8,i=i||2,o=o||3;var a,s,c=[],l=[],u=[],h=[],d=new b,p=new b,f=new b,m=new b,g=new b,y=new b,v=new b;for(a=0;a<=n;++a){var _=a/n*i*Math.PI*2;for(R(_,i,o,e,f),R(_+.01,i,o,e,m),y.subVectors(m,f),v.addVectors(m,f),g.crossVectors(y,v),v.crossVectors(g,y),g.normalize(),v.normalize(),s=0;s<=r;++s){var w=s/r*Math.PI*2,E=-t*Math.cos(w),A=t*Math.sin(w);d.x=f.x+(E*v.x+A*g.x),d.y=f.y+(E*v.y+A*g.y),d.z=f.z+(E*v.z+A*g.z),l.push(d.x,d.y,d.z),p.subVectors(d,f).normalize(),u.push(p.x,p.y,p.z),h.push(a/n),h.push(s/r)}}for(s=1;s<=n;s++)for(a=1;a<=r;a++){var x=(r+1)*(s-1)+(a-1),S=(r+1)*s+(a-1),T=(r+1)*s+a,M=(r+1)*(s-1)+a;c.push(x,S,M),c.push(S,T,M)}function R(e,t,n,r,i){var o=Math.cos(e),a=Math.sin(e),s=n/t*e,c=Math.cos(s);i.x=r*(2+c)*.5*o,i.y=r*(2+c)*a*.5,i.z=r*Math.sin(s)*.5}this.setIndex(c),this.addAttribute("position",new at(l,3)),this.addAttribute("normal",new at(u,3)),this.addAttribute("uv",new at(h,2))}function or(e,t,n,r,i){Qe.call(this),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:r,arc:i},this.fromBufferGeometry(new ar(e,t,n,r,i)),this.mergeVertices()}function ar(e,t,n,r,i){vt.call(this),this.type="TorusBufferGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:r,arc:i},e=e||1,t=t||.4,n=Math.floor(n)||8,r=Math.floor(r)||6,i=i||2*Math.PI;var o,a,s=[],c=[],l=[],u=[],h=new b,d=new b,p=new b;for(o=0;o<=n;o++)for(a=0;a<=r;a++){var f=a/r*i,m=o/n*Math.PI*2;d.x=(e+t*Math.cos(m))*Math.cos(f),d.y=(e+t*Math.cos(m))*Math.sin(f),d.z=t*Math.sin(m),c.push(d.x,d.y,d.z),h.x=e*Math.cos(f),h.y=e*Math.sin(f),p.subVectors(d,h).normalize(),l.push(p.x,p.y,p.z),u.push(a/r),u.push(o/n)}for(o=1;o<=n;o++)for(a=1;a<=r;a++){var g=(r+1)*o+a-1,y=(r+1)*(o-1)+a-1,v=(r+1)*(o-1)+a,_=(r+1)*o+a;s.push(g,y,_),s.push(y,v,_)}this.setIndex(s),this.addAttribute("position",new at(c,3)),this.addAttribute("normal",new at(l,3)),this.addAttribute("uv",new at(u,2))}An.prototype.isFogExp2=!0,An.prototype.clone=function(){return new An(this.color.getHex(),this.density)},An.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},xn.prototype.isFog=!0,xn.prototype.clone=function(){return new xn(this.color.getHex(),this.near,this.far)},xn.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},Sn.prototype=Object.assign(Object.create(Ge.prototype),{constructor:Sn,copy:function(e,t){return Ge.prototype.copy.call(this,e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.fog&&(this.fog=e.fog.clone()),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this},toJSON:function(e){var t=Ge.prototype.toJSON.call(this,e);return null!==this.background&&(t.object.background=this.background.toJSON(e)),null!==this.fog&&(t.object.fog=this.fog.toJSON()),t}}),Tn.prototype=Object.create(Ce.prototype),Tn.prototype.constructor=Tn,Tn.prototype.isSpriteMaterial=!0,Tn.prototype.copy=function(e){return Ce.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.rotation=e.rotation,this},Mn.prototype=Object.assign(Object.create(Ge.prototype),{constructor:Mn,isSprite:!0,raycast:(un=new b,hn=new b,dn=new b,function(e,t){hn.setFromMatrixPosition(this.matrixWorld),e.ray.closestPointToPoint(hn,un),dn.setFromMatrixScale(this.matrixWorld);var n=dn.x*dn.y/4;if(!(hn.distanceToSquared(un)>n)){var r=e.ray.origin.distanceTo(un);r<e.near||r>e.far||t.push({distance:r,point:un.clone(),face:null,object:this})}}),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(e){return Ge.prototype.copy.call(this,e),void 0!==e.center&&this.center.copy(e.center),this}}),Rn.prototype=Object.assign(Object.create(Ge.prototype),{constructor:Rn,copy:function(e){Ge.prototype.copy.call(this,e,!1);for(var t=e.levels,n=0,r=t.length;n<r;n++){var i=t[n];this.addLevel(i.object.clone(),i.distance)}return this},addLevel:function(e,t){void 0===t&&(t=0),t=Math.abs(t);for(var n=this.levels,r=0;r<n.length&&!(t<n[r].distance);r++);n.splice(r,0,{distance:t,object:e}),this.add(e)},getObjectForDistance:function(e){for(var t=this.levels,n=1,r=t.length;n<r&&!(e<t[n].distance);n++);return t[n-1].object},raycast:(pn=new b,function(e,t){pn.setFromMatrixPosition(this.matrixWorld);var n=e.ray.origin.distanceTo(pn);this.getObjectForDistance(n).raycast(e,t)}),update:function(){var e=new b,t=new b;return function(n){var r=this.levels;if(r.length>1){e.setFromMatrixPosition(n.matrixWorld),t.setFromMatrixPosition(this.matrixWorld);var i=e.distanceTo(t);r[0].object.visible=!0;for(var o=1,a=r.length;o<a&&i>=r[o].distance;o++)r[o-1].object.visible=!1,r[o].object.visible=!0;for(;o<a;o++)r[o].object.visible=!1}}}(),toJSON:function(e){var t=Ge.prototype.toJSON.call(this,e);t.object.levels=[];for(var n=this.levels,r=0,i=n.length;r<i;r++){var o=n[r];t.object.levels.push({object:o.object.uuid,distance:o.distance})}return t}}),Object.assign(Cn.prototype,{calculateInverses:function(){this.boneInverses=[];for(var e=0,t=this.bones.length;e<t;e++){var n=new y;this.bones[e]&&n.getInverse(this.bones[e].matrixWorld),this.boneInverses.push(n)}},pose:function(){var e,t,n;for(t=0,n=this.bones.length;t<n;t++)(e=this.bones[t])&&e.matrixWorld.getInverse(this.boneInverses[t]);for(t=0,n=this.bones.length;t<n;t++)(e=this.bones[t])&&(e.parent&&e.parent.isBone?(e.matrix.getInverse(e.parent.matrixWorld),e.matrix.multiply(e.matrixWorld)):e.matrix.copy(e.matrixWorld),e.matrix.decompose(e.position,e.quaternion,e.scale))},update:(fn=new y,mn=new y,function(){for(var e=this.bones,t=this.boneInverses,n=this.boneMatrices,r=this.boneTexture,i=0,o=e.length;i<o;i++){var a=e[i]?e[i].matrixWorld:mn;fn.multiplyMatrices(a,t[i]),fn.toArray(n,16*i)}void 0!==r&&(r.needsUpdate=!0)}),clone:function(){return new Cn(this.bones,this.boneInverses)},getBoneByName:function(e){for(var t=0,n=this.bones.length;t<n;t++){var r=this.bones[t];if(r.name===e)return r}}}),kn.prototype=Object.assign(Object.create(Ge.prototype),{constructor:kn,isBone:!0}),In.prototype=Object.assign(Object.create(Rt.prototype),{constructor:In,isSkinnedMesh:!0,initBones:function(){var e,t,n,r,i=[];if(this.geometry&&void 0!==this.geometry.bones){for(n=0,r=this.geometry.bones.length;n<r;n++)t=this.geometry.bones[n],e=new kn,i.push(e),e.name=t.name,e.position.fromArray(t.pos),e.quaternion.fromArray(t.rotq),void 0!==t.scl&&e.scale.fromArray(t.scl);for(n=0,r=this.geometry.bones.length;n<r;n++)-1!==(t=this.geometry.bones[n]).parent&&null!==t.parent&&void 0!==i[t.parent]?i[t.parent].add(i[n]):this.add(i[n])}return this.updateMatrixWorld(!0),i},bind:function(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.getInverse(t)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var e,t;if(this.geometry&&this.geometry.isGeometry)for(t=0;t<this.geometry.skinWeights.length;t++){var n=this.geometry.skinWeights[t];(e=1/n.manhattanLength())!==1/0?n.multiplyScalar(e):n.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var r=new A,i=this.geometry.attributes.skinWeight;for(t=0;t<i.count;t++)r.x=i.getX(t),r.y=i.getY(t),r.z=i.getZ(t),r.w=i.getW(t),(e=1/r.manhattanLength())!==1/0?r.multiplyScalar(e):r.set(1,0,0,0),i.setXYZW(t,r.x,r.y,r.z,r.w)}},updateMatrixWorld:function(e){Rt.prototype.updateMatrixWorld.call(this,e),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Pn.prototype=Object.create(Ce.prototype),Pn.prototype.constructor=Pn,Pn.prototype.isLineBasicMaterial=!0,Pn.prototype.copy=function(e){return Ce.prototype.copy.call(this,e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this},On.prototype=Object.assign(Object.create(Ge.prototype),{constructor:On,isLine:!0,computeLineDistances:(gn=new b,yn=new b,function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,n=[0],r=1,i=t.count;r<i;r++)gn.fromBufferAttribute(t,r-1),yn.fromBufferAttribute(t,r),n[r]=n[r-1],n[r]+=gn.distanceTo(yn);e.addAttribute("lineDistance",new THREE.Float32BufferAttribute(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(e.isGeometry){var o=e.vertices;for((n=e.lineDistances)[0]=0,r=1,i=o.length;r<i;r++)n[r]=n[r-1],n[r]+=o[r-1].distanceTo(o[r])}return this}),raycast:function(){var e=new y,t=new St,n=new Oe;return function(r,i){var o=r.linePrecision,a=o*o,s=this.geometry,c=this.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),n.copy(s.boundingSphere),n.applyMatrix4(c),!1!==r.ray.intersectsSphere(n)){e.getInverse(c),t.copy(r.ray).applyMatrix4(e);var l=new b,u=new b,h=new b,d=new b,p=this&&this.isLineSegments?2:1;if(s.isBufferGeometry){var f=s.index,m=s.attributes.position.array;if(null!==f)for(var g=f.array,y=0,v=g.length-1;y<v;y+=p){var _=g[y],w=g[y+1];if(l.fromArray(m,3*_),u.fromArray(m,3*w),!(t.distanceSqToSegment(l,u,d,h)>a))d.applyMatrix4(this.matrixWorld),(x=r.ray.origin.distanceTo(d))<r.near||x>r.far||i.push({distance:x,point:h.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}else for(y=0,v=m.length/3-1;y<v;y+=p){if(l.fromArray(m,3*y),u.fromArray(m,3*y+3),!(t.distanceSqToSegment(l,u,d,h)>a))d.applyMatrix4(this.matrixWorld),(x=r.ray.origin.distanceTo(d))<r.near||x>r.far||i.push({distance:x,point:h.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}else if(s.isGeometry){var E=s.vertices,A=E.length;for(y=0;y<A-1;y+=p){var x;if(!(t.distanceSqToSegment(E[y],E[y+1],d,h)>a))d.applyMatrix4(this.matrixWorld),(x=r.ray.origin.distanceTo(d))<r.near||x>r.far||i.push({distance:x,point:h.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Nn.prototype=Object.assign(Object.create(On.prototype),{constructor:Nn,isLineSegments:!0,computeLineDistances:function(){var e=new b,t=new b;return function(){var n=this.geometry;if(n.isBufferGeometry)if(null===n.index){for(var r=n.attributes.position,i=[],o=0,a=r.count;o<a;o+=2)e.fromBufferAttribute(r,o),t.fromBufferAttribute(r,o+1),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+e.distanceTo(t);n.addAttribute("lineDistance",new THREE.Float32BufferAttribute(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(n.isGeometry){var s=n.vertices;for(i=n.lineDistances,o=0,a=s.length;o<a;o+=2)e.copy(s[o]),t.copy(s[o+1]),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+e.distanceTo(t)}return this}}()}),Dn.prototype=Object.assign(Object.create(On.prototype),{constructor:Dn,isLineLoop:!0}),Ln.prototype=Object.create(Ce.prototype),Ln.prototype.constructor=Ln,Ln.prototype.isPointsMaterial=!0,Ln.prototype.copy=function(e){return Ce.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this},Fn.prototype=Object.assign(Object.create(Ge.prototype),{constructor:Fn,isPoints:!0,raycast:function(){var e=new y,t=new St,n=new Oe;return function(r,i){var o=this,a=this.geometry,s=this.matrixWorld,c=r.params.Points.threshold;if(null===a.boundingSphere&&a.computeBoundingSphere(),n.copy(a.boundingSphere),n.applyMatrix4(s),n.radius+=c,!1!==r.ray.intersectsSphere(n)){e.getInverse(s),t.copy(r.ray).applyMatrix4(e);var l=c/((this.scale.x+this.scale.y+this.scale.z)/3),u=l*l,h=new b;if(a.isBufferGeometry){var d=a.index,p=a.attributes.position.array;if(null!==d)for(var f=d.array,m=0,g=f.length;m<g;m++){var y=f[m];h.fromArray(p,3*y),w(h,y)}else{m=0;for(var v=p.length/3;m<v;m++)h.fromArray(p,3*m),w(h,m)}}else{var _=a.vertices;for(m=0,v=_.length;m<v;m++)w(_[m],m)}}function w(e,n){var a=t.distanceSqToPoint(e);if(a<u){var c=t.closestPointToPoint(e);c.applyMatrix4(s);var l=r.ray.origin.distanceTo(c);if(l<r.near||l>r.far)return;i.push({distance:l,distanceToRay:Math.sqrt(a),point:c.clone(),index:n,face:null,object:o})}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),jn.prototype=Object.assign(Object.create(Ge.prototype),{constructor:jn,isGroup:!0}),Un.prototype=Object.assign(Object.create(E.prototype),{constructor:Un,isVideoTexture:!0,update:function(){var e=this.image;e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),Bn.prototype=Object.create(E.prototype),Bn.prototype.constructor=Bn,Bn.prototype.isCompressedTexture=!0,Vn.prototype=Object.create(E.prototype),Vn.prototype.constructor=Vn,Vn.prototype.isDepthTexture=!0,Hn.prototype=Object.create(vt.prototype),Hn.prototype.constructor=Hn,zn.prototype=Object.create(Qe.prototype),zn.prototype.constructor=zn,qn.prototype=Object.create(vt.prototype),qn.prototype.constructor=qn,Gn.prototype=Object.create(Qe.prototype),Gn.prototype.constructor=Gn,Wn.prototype=Object.create(vt.prototype),Wn.prototype.constructor=Wn,Jn.prototype=Object.create(Qe.prototype),Jn.prototype.constructor=Jn,Zn.prototype=Object.create(Wn.prototype),Zn.prototype.constructor=Zn,Yn.prototype=Object.create(Qe.prototype),Yn.prototype.constructor=Yn,Xn.prototype=Object.create(Wn.prototype),Xn.prototype.constructor=Xn,Qn.prototype=Object.create(Qe.prototype),Qn.prototype.constructor=Qn,Kn.prototype=Object.create(Wn.prototype),Kn.prototype.constructor=Kn,$n.prototype=Object.create(Qe.prototype),$n.prototype.constructor=$n,er.prototype=Object.create(Wn.prototype),er.prototype.constructor=er,tr.prototype=Object.create(Qe.prototype),tr.prototype.constructor=tr,nr.prototype=Object.create(vt.prototype),nr.prototype.constructor=nr,rr.prototype=Object.create(Qe.prototype),rr.prototype.constructor=rr,ir.prototype=Object.create(vt.prototype),ir.prototype.constructor=ir,or.prototype=Object.create(Qe.prototype),or.prototype.constructor=or,ar.prototype=Object.create(vt.prototype),ar.prototype.constructor=ar;var sr=function(e,t,n){n=n||2;var r,i,o,a,s,c,l,u=t&&t.length,h=u?t[0]*n:e.length,d=cr(e,0,h,n,!0),p=[];if(!d)return p;if(u&&(d=function(e,t,n,r){var i,o,a,s,c,l=[];for(i=0,o=t.length;i<o;i++)a=t[i]*r,s=i<o-1?t[i+1]*r:e.length,(c=cr(e,a,s,r,!1))===c.next&&(c.steiner=!0),l.push(vr(c));for(l.sort(mr),i=0;i<l.length;i++)gr(l[i],n),n=lr(n,n.next);return n}(e,t,d,n)),e.length>80*n){r=o=e[0],i=a=e[1];for(var f=n;f<h;f+=n)(s=e[f])<r&&(r=s),(c=e[f+1])<i&&(i=c),s>o&&(o=s),c>a&&(a=c);l=0!==(l=Math.max(o-r,a-i))?1/l:0}return ur(d,p,n,r,i,l),p};function cr(e,t,n,r,i){var o,a;if(i===function(e,t,n,r){for(var i=0,o=t,a=n-r;o<n;o+=r)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}(e,t,n,r)>0)for(o=t;o<n;o+=r)a=Tr(o,e[o],e[o+1],a);else for(o=n-r;o>=t;o-=r)a=Tr(o,e[o],e[o+1],a);return a&&Er(a,a.next)&&(Mr(a),a=a.next),a}function lr(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!Er(r,r.next)&&0!==wr(r.prev,r,r.next))r=r.next;else{if(Mr(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function ur(e,t,n,r,i,o,a){if(e){!a&&o&&function(e,t,n,r){var i=e;do{null===i.z&&(i.z=yr(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,o,a,s,c,l=1;do{for(n=e,e=null,o=null,a=0;n;){for(a++,r=n,s=0,t=0;t<l&&(s++,r=r.nextZ);t++);for(c=l;s>0||c>0&&r;)0!==s&&(0===c||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,l*=2}while(a>1)}(i)}(e,r,i,o);for(var s,c,l=e;e.prev!==e.next;)if(s=e.prev,c=e.next,o?dr(e,r,i,o):hr(e))t.push(s.i/n),t.push(e.i/n),t.push(c.i/n),Mr(e),e=c.next,l=c.next;else if((e=c)===l){a?1===a?ur(e=pr(e,t,n),t,n,r,i,o,2):2===a&&fr(e,t,n,r,i,o):ur(lr(e),t,n,r,i,o,1);break}}}function hr(e){var t=e.prev,n=e,r=e.next;if(wr(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(br(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&wr(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function dr(e,t,n,r){var i=e.prev,o=e,a=e.next;if(wr(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,c=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,l=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,u=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=yr(s,c,t,n,r),d=yr(l,u,t,n,r),p=e.nextZ;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&br(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&wr(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=e.prevZ;p&&p.z>=h;){if(p!==e.prev&&p!==e.next&&br(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&wr(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function pr(e,t,n){var r=e;do{var i=r.prev,o=r.next.next;!Er(i,o)&&Ar(i,r,r.next,o)&&xr(i,o)&&xr(o,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(o.i/n),Mr(r),Mr(r.next),r=e=o),r=r.next}while(r!==e);return r}function fr(e,t,n,r,i,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&_r(a,s)){var c=Sr(a,s);return a=lr(a,a.next),c=lr(c,c.next),ur(a,t,n,r,i,o),void ur(c,t,n,r,i,o)}s=s.next}a=a.next}while(a!==e)}function mr(e,t){return e.x-t.x}function gr(e,t){if(t=function(e,t){var n,r=t,i=e.x,o=e.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(i===a)return n.prev;var c,l=n,u=n.x,h=n.y,d=1/0;r=n.next;for(;r!==l;)i>=r.x&&r.x>=u&&i!==r.x&&br(o<h?i:a,o,u,h,o<h?a:i,o,r.x,r.y)&&((c=Math.abs(o-r.y)/(i-r.x))<d||c===d&&r.x>n.x)&&xr(r,e)&&(n=r,d=c),r=r.next;return n}(e,t)){var n=Sr(t,e);lr(n,n.next)}}function yr(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function vr(e){var t=e,n=e;do{t.x<n.x&&(n=t),t=t.next}while(t!==e);return n}function br(e,t,n,r,i,o,a,s){return(i-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(r-s)-(n-a)*(t-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function _r(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&Ar(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&xr(e,t)&&xr(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)}function wr(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function Er(e,t){return e.x===t.x&&e.y===t.y}function Ar(e,t,n,r){return!!(Er(e,t)&&Er(n,r)||Er(e,r)&&Er(n,t))||wr(e,t,n)>0!=wr(e,t,r)>0&&wr(n,r,e)>0!=wr(n,r,t)>0}function xr(e,t){return wr(e.prev,e,e.next)<0?wr(e,t,e.next)>=0&&wr(e,e.prev,t)>=0:wr(e,t,e.prev)<0||wr(e,e.next,t)<0}function Sr(e,t){var n=new Rr(e.i,e.x,e.y),r=new Rr(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function Tr(e,t,n,r){var i=new Rr(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Mr(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Rr(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var Cr={area:function(e){for(var t=e.length,n=0,r=t-1,i=0;i<t;r=i++)n+=e[r].x*e[i].y-e[i].x*e[r].y;return.5*n},isClockWise:function(e){return Cr.area(e)<0},triangulateShape:function(e,t){var n=[],r=[],i=[];kr(e),Ir(n,e);var o=e.length;t.forEach(kr);for(var a=0;a<t.length;a++)r.push(o),o+=t[a].length,Ir(n,t[a]);var s=sr(n,r);for(a=0;a<s.length;a+=3)i.push(s.slice(a,a+3));return i}};function kr(e){var t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function Ir(e,t){for(var n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}function Pr(e,t){Qe.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},this.fromBufferGeometry(new Or(e,t)),this.mergeVertices()}function Or(e,t){void 0!==e&&(vt.call(this),this.type="ExtrudeBufferGeometry",e=Array.isArray(e)?e:[e],this.addShapeList(e,t),this.computeVertexNormals())}function Nr(e,t){Qe.call(this),this.type="TextGeometry",this.parameters={text:e,parameters:t},this.fromBufferGeometry(new Dr(e,t)),this.mergeVertices()}function Dr(e,t){var n=(t=t||{}).font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new Qe;var r=n.generateShapes(e,t.size,t.curveSegments);t.amount=void 0!==t.height?t.height:50,void 0===t.bevelThickness&&(t.bevelThickness=10),void 0===t.bevelSize&&(t.bevelSize=8),void 0===t.bevelEnabled&&(t.bevelEnabled=!1),Or.call(this,r,t),this.type="TextBufferGeometry"}function Lr(e,t,n,r,i,o,a){Qe.call(this),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},this.fromBufferGeometry(new Fr(e,t,n,r,i,o,a)),this.mergeVertices()}function Fr(e,t,n,r,i,o,a){vt.call(this),this.type="SphereBufferGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},e=e||1,t=Math.max(3,Math.floor(t)||8),n=Math.max(2,Math.floor(n)||6),r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI;var s,c,l=(o=void 0!==o?o:0)+(a=void 0!==a?a:Math.PI),u=0,h=[],d=new b,p=new b,f=[],m=[],g=[],y=[];for(c=0;c<=n;c++){var v=[],_=c/n;for(s=0;s<=t;s++){var w=s/t;d.x=-e*Math.cos(r+w*i)*Math.sin(o+_*a),d.y=e*Math.cos(o+_*a),d.z=e*Math.sin(r+w*i)*Math.sin(o+_*a),m.push(d.x,d.y,d.z),p.set(d.x,d.y,d.z).normalize(),g.push(p.x,p.y,p.z),y.push(w,1-_),v.push(u++)}h.push(v)}for(c=0;c<n;c++)for(s=0;s<t;s++){var E=h[c][s+1],A=h[c][s],x=h[c+1][s],S=h[c+1][s+1];(0!==c||o>0)&&f.push(E,A,S),(c!==n-1||l<Math.PI)&&f.push(A,x,S)}this.setIndex(f),this.addAttribute("position",new at(m,3)),this.addAttribute("normal",new at(g,3)),this.addAttribute("uv",new at(y,2))}function jr(e,t,n,r,i,o){Qe.call(this),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},this.fromBufferGeometry(new Ur(e,t,n,r,i,o)),this.mergeVertices()}function Ur(e,t,n,r,i,o){vt.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},e=e||.5,t=t||1,i=void 0!==i?i:0,o=void 0!==o?o:2*Math.PI,n=void 0!==n?Math.max(3,n):8;var a,s,c,l=[],u=[],h=[],d=[],p=e,f=(t-e)/(r=void 0!==r?Math.max(1,r):1),m=new b,y=new g;for(s=0;s<=r;s++){for(c=0;c<=n;c++)a=i+c/n*o,m.x=p*Math.cos(a),m.y=p*Math.sin(a),u.push(m.x,m.y,m.z),h.push(0,0,1),y.x=(m.x/t+1)/2,y.y=(m.y/t+1)/2,d.push(y.x,y.y);p+=f}for(s=0;s<r;s++){var v=s*(n+1);for(c=0;c<n;c++){var _=a=c+v,w=a+n+1,E=a+n+2,A=a+1;l.push(_,w,A),l.push(w,E,A)}}this.setIndex(l),this.addAttribute("position",new at(u,3)),this.addAttribute("normal",new at(h,3)),this.addAttribute("uv",new at(d,2))}function Br(e,t,n,r){Qe.call(this),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:r},this.fromBufferGeometry(new Vr(e,t,n,r)),this.mergeVertices()}function Vr(e,t,n,r){vt.call(this),this.type="LatheBufferGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:r},t=Math.floor(t)||12,n=n||0,r=r||2*Math.PI,r=m.clamp(r,0,2*Math.PI);var i,o,a,s=[],c=[],l=[],u=1/t,h=new b,d=new g;for(o=0;o<=t;o++){var p=n+o*u*r,f=Math.sin(p),y=Math.cos(p);for(a=0;a<=e.length-1;a++)h.x=e[a].x*f,h.y=e[a].y,h.z=e[a].x*y,c.push(h.x,h.y,h.z),d.x=o/t,d.y=a/(e.length-1),l.push(d.x,d.y)}for(o=0;o<t;o++)for(a=0;a<e.length-1;a++){var v=i=a+o*e.length,_=i+e.length,w=i+e.length+1,E=i+1;s.push(v,_,E),s.push(_,w,E)}if(this.setIndex(s),this.addAttribute("position",new at(c,3)),this.addAttribute("uv",new at(l,2)),this.computeVertexNormals(),r===2*Math.PI){var A=this.attributes.normal.array,x=new b,S=new b,T=new b;for(i=t*e.length*3,o=0,a=0;o<e.length;o++,a+=3)x.x=A[a+0],x.y=A[a+1],x.z=A[a+2],S.x=A[i+a+0],S.y=A[i+a+1],S.z=A[i+a+2],T.addVectors(x,S).normalize(),A[a+0]=A[i+a+0]=T.x,A[a+1]=A[i+a+1]=T.y,A[a+2]=A[i+a+2]=T.z}}function Hr(e,t){Qe.call(this),this.type="ShapeGeometry","object"==typeof t&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),t=t.curveSegments),this.parameters={shapes:e,curveSegments:t},this.fromBufferGeometry(new zr(e,t)),this.mergeVertices()}function zr(e,t){vt.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:e,curveSegments:t},t=t||12;var n=[],r=[],i=[],o=[],a=0,s=0;if(!1===Array.isArray(e))l(e);else for(var c=0;c<e.length;c++)l(e[c]),this.addGroup(a,s,c),a+=s,s=0;function l(e){var a,c,l,u=r.length/3,h=e.extractPoints(t),d=h.shape,p=h.holes;if(!1===Cr.isClockWise(d))for(d=d.reverse(),a=0,c=p.length;a<c;a++)l=p[a],!0===Cr.isClockWise(l)&&(p[a]=l.reverse());var f=Cr.triangulateShape(d,p);for(a=0,c=p.length;a<c;a++)l=p[a],d=d.concat(l);for(a=0,c=d.length;a<c;a++){var m=d[a];r.push(m.x,m.y,0),i.push(0,0,1),o.push(m.x,m.y)}for(a=0,c=f.length;a<c;a++){var g=f[a],y=g[0]+u,v=g[1]+u,b=g[2]+u;n.push(y,v,b),s+=3}}this.setIndex(n),this.addAttribute("position",new at(r,3)),this.addAttribute("normal",new at(i,3)),this.addAttribute("uv",new at(o,2))}function qr(e,t){if(t.shapes=[],Array.isArray(e))for(var n=0,r=e.length;n<r;n++){var i=e[n];t.shapes.push(i.uuid)}else t.shapes.push(e.uuid);return t}function Gr(e,t){vt.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:t},t=void 0!==t?t:1;var n,r,i,o,a=[],s=Math.cos(m.DEG2RAD*t),c=[0,0],l={},u=["a","b","c"];e.isBufferGeometry?(o=new Qe).fromBufferGeometry(e):o=e.clone(),o.mergeVertices(),o.computeFaceNormals();for(var h=o.vertices,d=o.faces,p=0,f=d.length;p<f;p++)for(var g=d[p],y=0;y<3;y++)n=g[u[y]],r=g[u[(y+1)%3]],c[0]=Math.min(n,r),c[1]=Math.max(n,r),void 0===l[i=c[0]+","+c[1]]?l[i]={index1:c[0],index2:c[1],face1:p,face2:void 0}:l[i].face2=p;for(i in l){var v=l[i];if(void 0===v.face2||d[v.face1].normal.dot(d[v.face2].normal)<=s){var b=h[v.index1];a.push(b.x,b.y,b.z),b=h[v.index2],a.push(b.x,b.y,b.z)}}this.addAttribute("position",new at(a,3))}function Wr(e,t,n,r,i,o,a,s){Qe.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s},this.fromBufferGeometry(new Jr(e,t,n,r,i,o,a,s)),this.mergeVertices()}function Jr(e,t,n,r,i,o,a,s){vt.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s};var c=this;e=void 0!==e?e:1,t=void 0!==t?t:1,n=n||1,r=Math.floor(r)||8,i=Math.floor(i)||1,o=void 0!==o&&o,a=void 0!==a?a:0,s=void 0!==s?s:2*Math.PI;var l=[],u=[],h=[],d=[],p=0,f=[],m=n/2,y=0;function v(n){var i,o,f,v=new g,_=new b,w=0,E=!0===n?e:t,A=!0===n?1:-1;for(o=p,i=1;i<=r;i++)u.push(0,m*A,0),h.push(0,A,0),d.push(.5,.5),p++;for(f=p,i=0;i<=r;i++){var x=i/r*s+a,S=Math.cos(x),T=Math.sin(x);_.x=E*T,_.y=m*A,_.z=E*S,u.push(_.x,_.y,_.z),h.push(0,A,0),v.x=.5*S+.5,v.y=.5*T*A+.5,d.push(v.x,v.y),p++}for(i=0;i<r;i++){var M=o+i,R=f+i;!0===n?l.push(R,R+1,M):l.push(R+1,R,M),w+=3}c.addGroup(y,w,!0===n?1:2),y+=w}!function(){var o,g,v=new b,_=new b,w=0,E=(t-e)/n;for(g=0;g<=i;g++){var A=[],x=g/i,S=x*(t-e)+e;for(o=0;o<=r;o++){var T=o/r,M=T*s+a,R=Math.sin(M),C=Math.cos(M);_.x=S*R,_.y=-x*n+m,_.z=S*C,u.push(_.x,_.y,_.z),v.set(R,E,C).normalize(),h.push(v.x,v.y,v.z),d.push(T,1-x),A.push(p++)}f.push(A)}for(o=0;o<r;o++)for(g=0;g<i;g++){var k=f[g][o],I=f[g+1][o],P=f[g+1][o+1],O=f[g][o+1];l.push(k,I,O),l.push(I,P,O),w+=6}c.addGroup(y,w,0),y+=w}(),!1===o&&(e>0&&v(!0),t>0&&v(!1)),this.setIndex(l),this.addAttribute("position",new at(u,3)),this.addAttribute("normal",new at(h,3)),this.addAttribute("uv",new at(d,2))}function Zr(e,t,n,r,i,o,a){Wr.call(this,0,e,t,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function Yr(e,t,n,r,i,o,a){Jr.call(this,0,e,t,n,r,i,o,a),this.type="ConeBufferGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function Xr(e,t,n,r){Qe.call(this),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new Qr(e,t,n,r)),this.mergeVertices()}function Qr(e,t,n,r){vt.call(this),this.type="CircleBufferGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},e=e||1,t=void 0!==t?Math.max(3,t):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var i,o,a=[],s=[],c=[],l=[],u=new b,h=new g;for(s.push(0,0,0),c.push(0,0,1),l.push(.5,.5),o=0,i=3;o<=t;o++,i+=3){var d=n+o/t*r;u.x=e*Math.cos(d),u.y=e*Math.sin(d),s.push(u.x,u.y,u.z),c.push(0,0,1),h.x=(s[i]/e+1)/2,h.y=(s[i+1]/e+1)/2,l.push(h.x,h.y)}for(i=1;i<=t;i++)a.push(i,i+1,0);this.setIndex(a),this.addAttribute("position",new at(s,3)),this.addAttribute("normal",new at(c,3)),this.addAttribute("uv",new at(l,2))}Pr.prototype=Object.create(Qe.prototype),Pr.prototype.constructor=Pr,Or.prototype=Object.create(vt.prototype),Or.prototype.constructor=Or,Or.prototype.getArrays=function(){var e=this.getAttribute("position"),t=e?Array.prototype.slice.call(e.array):[],n=this.getAttribute("uv"),r=n?Array.prototype.slice.call(n.array):[],i=this.index;return{position:t,uv:r,index:i?Array.prototype.slice.call(i.array):[]}},Or.prototype.addShapeList=function(e,t){var n=e.length;t.arrays=this.getArrays();for(var r=0;r<n;r++){var i=e[r];this.addShape(i,t)}this.setIndex(t.arrays.index),this.addAttribute("position",new at(t.arrays.position,3)),this.addAttribute("uv",new at(t.arrays.uv,2))},Or.prototype.addShape=function(e,t){var n,r,i,o,a,s,c,l,u=t.arrays?t.arrays:this.getArrays(),h=u.position,d=u.index,p=u.uv,f=[],m=void 0!==t.amount?t.amount:100,y=void 0!==t.bevelThickness?t.bevelThickness:6,v=void 0!==t.bevelSize?t.bevelSize:y-2,_=void 0!==t.bevelSegments?t.bevelSegments:3,w=void 0===t.bevelEnabled||t.bevelEnabled,E=void 0!==t.curveSegments?t.curveSegments:12,A=void 0!==t.steps?t.steps:1,x=t.extrudePath,S=!1,T=void 0!==t.UVGenerator?t.UVGenerator:Pr.WorldUVGenerator;x&&(n=x.getSpacedPoints(A),S=!0,w=!1,r=void 0!==t.frames?t.frames:x.computeFrenetFrames(A,!1),i=new b,o=new b,a=new b),w||(_=0,y=0,v=0);var M=this,R=e.extractPoints(E),C=R.shape,k=R.holes;if(!Cr.isClockWise(C))for(C=C.reverse(),c=0,l=k.length;c<l;c++)s=k[c],Cr.isClockWise(s)&&(k[c]=s.reverse());var I=Cr.triangulateShape(C,k),P=C;for(c=0,l=k.length;c<l;c++)s=k[c],C=C.concat(s);function O(e,t,n){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),t.clone().multiplyScalar(n).add(e)}var N,D,L,F,j,U,B=C.length,V=I.length;function H(e,t,n){var r,i,o,a=e.x-t.x,s=e.y-t.y,c=n.x-e.x,l=n.y-e.y,u=a*a+s*s,h=a*l-s*c;if(Math.abs(h)>Number.EPSILON){var d=Math.sqrt(u),p=Math.sqrt(c*c+l*l),f=t.x-s/d,m=t.y+a/d,y=((n.x-l/p-f)*l-(n.y+c/p-m)*c)/(a*l-s*c),v=(r=f+a*y-e.x)*r+(i=m+s*y-e.y)*i;if(v<=2)return new g(r,i);o=Math.sqrt(v/2)}else{var b=!1;a>Number.EPSILON?c>Number.EPSILON&&(b=!0):a<-Number.EPSILON?c<-Number.EPSILON&&(b=!0):Math.sign(s)===Math.sign(l)&&(b=!0),b?(r=-s,i=a,o=Math.sqrt(u)):(r=a,i=s,o=Math.sqrt(u/2))}return new g(r/o,i/o)}for(var z=[],q=0,G=P.length,W=G-1,J=q+1;q<G;q++,W++,J++)W===G&&(W=0),J===G&&(J=0),z[q]=H(P[q],P[W],P[J]);var Z,Y,X=[],Q=z.concat();for(c=0,l=k.length;c<l;c++){for(s=k[c],Z=[],q=0,W=(G=s.length)-1,J=q+1;q<G;q++,W++,J++)W===G&&(W=0),J===G&&(J=0),Z[q]=H(s[q],s[W],s[J]);X.push(Z),Q=Q.concat(Z)}for(N=0;N<_;N++){for(L=N/_,F=y*Math.cos(L*Math.PI/2),D=v*Math.sin(L*Math.PI/2),q=0,G=P.length;q<G;q++)$((j=O(P[q],z[q],D)).x,j.y,-F);for(c=0,l=k.length;c<l;c++)for(s=k[c],Z=X[c],q=0,G=s.length;q<G;q++)$((j=O(s[q],Z[q],D)).x,j.y,-F)}for(D=v,q=0;q<B;q++)j=w?O(C[q],Q[q],D):C[q],S?(o.copy(r.normals[0]).multiplyScalar(j.x),i.copy(r.binormals[0]).multiplyScalar(j.y),a.copy(n[0]).add(o).add(i),$(a.x,a.y,a.z)):$(j.x,j.y,0);for(Y=1;Y<=A;Y++)for(q=0;q<B;q++)j=w?O(C[q],Q[q],D):C[q],S?(o.copy(r.normals[Y]).multiplyScalar(j.x),i.copy(r.binormals[Y]).multiplyScalar(j.y),a.copy(n[Y]).add(o).add(i),$(a.x,a.y,a.z)):$(j.x,j.y,m/A*Y);for(N=_-1;N>=0;N--){for(L=N/_,F=y*Math.cos(L*Math.PI/2),D=v*Math.sin(L*Math.PI/2),q=0,G=P.length;q<G;q++)$((j=O(P[q],z[q],D)).x,j.y,m+F);for(c=0,l=k.length;c<l;c++)for(s=k[c],Z=X[c],q=0,G=s.length;q<G;q++)j=O(s[q],Z[q],D),S?$(j.x,j.y+n[A-1].y,n[A-1].x+F):$(j.x,j.y,m+F)}function K(e,t){var n,r;for(q=e.length;--q>=0;){n=q,(r=q-1)<0&&(r=e.length-1);var i=0,o=A+2*_;for(i=0;i<o;i++){var a=B*i,s=B*(i+1);te(t+n+a,t+r+a,t+r+s,t+n+s)}}}function $(e,t,n){f.push(e),f.push(t),f.push(n)}function ee(e,t,n){ne(e),ne(t),ne(n);var r=h.length/3,i=T.generateTopUV(M,h,r-3,r-2,r-1);re(i[0]),re(i[1]),re(i[2])}function te(e,t,n,r){ne(e),ne(t),ne(r),ne(t),ne(n),ne(r);var i=h.length/3,o=T.generateSideWallUV(M,h,i-6,i-3,i-2,i-1);re(o[0]),re(o[1]),re(o[3]),re(o[1]),re(o[2]),re(o[3])}function ne(e){d.push(h.length/3),h.push(f[3*e+0]),h.push(f[3*e+1]),h.push(f[3*e+2])}function re(e){p.push(e.x),p.push(e.y)}!function(){var e=h.length/3;if(w){var n=0,r=B*n;for(q=0;q<V;q++)ee((U=I[q])[2]+r,U[1]+r,U[0]+r);for(r=B*(n=A+2*_),q=0;q<V;q++)ee((U=I[q])[0]+r,U[1]+r,U[2]+r)}else{for(q=0;q<V;q++)ee((U=I[q])[2],U[1],U[0]);for(q=0;q<V;q++)ee((U=I[q])[0]+B*A,U[1]+B*A,U[2]+B*A)}M.addGroup(e,h.length/3-e,void 0!==t.material?t.material:0)}(),function(){var e=h.length/3,n=0;for(K(P,n),n+=P.length,c=0,l=k.length;c<l;c++)K(s=k[c],n),n+=s.length;M.addGroup(e,h.length/3-e,void 0!==t.extrudeMaterial?t.extrudeMaterial:1)}(),t.arrays||(this.setIndex(d),this.addAttribute("position",new at(h,3)),this.addAttribute("uv",new at(p,2)))},Pr.WorldUVGenerator={generateTopUV:function(e,t,n,r,i){var o=t[3*n],a=t[3*n+1],s=t[3*r],c=t[3*r+1],l=t[3*i],u=t[3*i+1];return[new g(o,a),new g(s,c),new g(l,u)]},generateSideWallUV:function(e,t,n,r,i,o){var a=t[3*n],s=t[3*n+1],c=t[3*n+2],l=t[3*r],u=t[3*r+1],h=t[3*r+2],d=t[3*i],p=t[3*i+1],f=t[3*i+2],m=t[3*o],y=t[3*o+1],v=t[3*o+2];return Math.abs(s-u)<.01?[new g(a,1-c),new g(l,1-h),new g(d,1-f),new g(m,1-v)]:[new g(s,1-c),new g(u,1-h),new g(p,1-f),new g(y,1-v)]}},Nr.prototype=Object.create(Qe.prototype),Nr.prototype.constructor=Nr,Dr.prototype=Object.create(Or.prototype),Dr.prototype.constructor=Dr,Lr.prototype=Object.create(Qe.prototype),Lr.prototype.constructor=Lr,Fr.prototype=Object.create(vt.prototype),Fr.prototype.constructor=Fr,jr.prototype=Object.create(Qe.prototype),jr.prototype.constructor=jr,Ur.prototype=Object.create(vt.prototype),Ur.prototype.constructor=Ur,Br.prototype=Object.create(Qe.prototype),Br.prototype.constructor=Br,Vr.prototype=Object.create(vt.prototype),Vr.prototype.constructor=Vr,Hr.prototype=Object.create(Qe.prototype),Hr.prototype.constructor=Hr,Hr.prototype.toJSON=function(){var e=Qe.prototype.toJSON.call(this);return qr(this.parameters.shapes,e)},zr.prototype=Object.create(vt.prototype),zr.prototype.constructor=zr,zr.prototype.toJSON=function(){var e=vt.prototype.toJSON.call(this);return qr(this.parameters.shapes,e)},Gr.prototype=Object.create(vt.prototype),Gr.prototype.constructor=Gr,Wr.prototype=Object.create(Qe.prototype),Wr.prototype.constructor=Wr,Jr.prototype=Object.create(vt.prototype),Jr.prototype.constructor=Jr,Zr.prototype=Object.create(Wr.prototype),Zr.prototype.constructor=Zr,Yr.prototype=Object.create(Jr.prototype),Yr.prototype.constructor=Yr,Xr.prototype=Object.create(Qe.prototype),Xr.prototype.constructor=Xr,Qr.prototype=Object.create(vt.prototype),Qr.prototype.constructor=Qr;var Kr=Object.freeze({WireframeGeometry:Hn,ParametricGeometry:zn,ParametricBufferGeometry:qn,TetrahedronGeometry:Jn,TetrahedronBufferGeometry:Zn,OctahedronGeometry:Yn,OctahedronBufferGeometry:Xn,IcosahedronGeometry:Qn,IcosahedronBufferGeometry:Kn,DodecahedronGeometry:$n,DodecahedronBufferGeometry:er,PolyhedronGeometry:Gn,PolyhedronBufferGeometry:Wn,TubeGeometry:tr,TubeBufferGeometry:nr,TorusKnotGeometry:rr,TorusKnotBufferGeometry:ir,TorusGeometry:or,TorusBufferGeometry:ar,TextGeometry:Nr,TextBufferGeometry:Dr,SphereGeometry:Lr,SphereBufferGeometry:Fr,RingGeometry:jr,RingBufferGeometry:Ur,PlaneGeometry:wt,PlaneBufferGeometry:Et,LatheGeometry:Br,LatheBufferGeometry:Vr,ShapeGeometry:Hr,ShapeBufferGeometry:zr,ExtrudeGeometry:Pr,ExtrudeBufferGeometry:Or,EdgesGeometry:Gr,ConeGeometry:Zr,ConeBufferGeometry:Yr,CylinderGeometry:Wr,CylinderBufferGeometry:Jr,CircleGeometry:Xr,CircleBufferGeometry:Qr,BoxGeometry:bt,BoxBufferGeometry:_t});function $r(e){Ce.call(this),this.type="ShadowMaterial",this.color=new fe(0),this.opacity=1,this.lights=!0,this.transparent=!0,this.setValues(e)}function ei(e){xt.call(this,e),this.type="RawShaderMaterial"}function ti(e){Ce.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new fe(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new fe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new g(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function ni(e){ti.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(e)}function ri(e){Ce.call(this),this.type="MeshPhongMaterial",this.color=new fe(16777215),this.specular=new fe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new fe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new g(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function ii(e){ri.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(e)}function oi(e){Ce.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new g(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function ai(e){Ce.call(this),this.type="MeshLambertMaterial",this.color=new fe(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new fe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function si(e){Pn.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}$r.prototype=Object.create(Ce.prototype),$r.prototype.constructor=$r,$r.prototype.isShadowMaterial=!0,ei.prototype=Object.create(xt.prototype),ei.prototype.constructor=ei,ei.prototype.isRawShaderMaterial=!0,ti.prototype=Object.create(Ce.prototype),ti.prototype.constructor=ti,ti.prototype.isMeshStandardMaterial=!0,ti.prototype.copy=function(e){return Ce.prototype.copy.call(this,e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},ni.prototype=Object.create(ti.prototype),ni.prototype.constructor=ni,ni.prototype.isMeshPhysicalMaterial=!0,ni.prototype.copy=function(e){return ti.prototype.copy.call(this,e),this.defines={PHYSICAL:""},this.reflectivity=e.reflectivity,this.clearCoat=e.clearCoat,this.clearCoatRoughness=e.clearCoatRoughness,this},ri.prototype=Object.create(Ce.prototype),ri.prototype.constructor=ri,ri.prototype.isMeshPhongMaterial=!0,ri.prototype.copy=function(e){return Ce.prototype.copy.call(this,e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},ii.prototype=Object.create(ri.prototype),ii.prototype.constructor=ii,ii.prototype.isMeshToonMaterial=!0,ii.prototype.copy=function(e){return ri.prototype.copy.call(this,e),this.gradientMap=e.gradientMap,this},oi.prototype=Object.create(Ce.prototype),oi.prototype.constructor=oi,oi.prototype.isMeshNormalMaterial=!0,oi.prototype.copy=function(e){return Ce.prototype.copy.call(this,e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},ai.prototype=Object.create(Ce.prototype),ai.prototype.constructor=ai,ai.prototype.isMeshLambertMaterial=!0,ai.prototype.copy=function(e){return Ce.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},si.prototype=Object.create(Pn.prototype),si.prototype.constructor=si,si.prototype.isLineDashedMaterial=!0,si.prototype.copy=function(e){return Pn.prototype.copy.call(this,e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this};var ci=Object.freeze({ShadowMaterial:$r,SpriteMaterial:Tn,RawShaderMaterial:ei,ShaderMaterial:xt,PointsMaterial:Ln,MeshPhysicalMaterial:ni,MeshStandardMaterial:ti,MeshPhongMaterial:ri,MeshToonMaterial:ii,MeshNormalMaterial:oi,MeshLambertMaterial:ai,MeshDepthMaterial:ke,MeshDistanceMaterial:Ie,MeshBasicMaterial:At,LineDashedMaterial:si,LineBasicMaterial:Pn,Material:Ce}),li={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};function ui(e,t,n){var r=this,i=!1,o=0,a=0,s=void 0;this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(e){a++,!1===i&&void 0!==r.onStart&&r.onStart(e,o,a),i=!0},this.itemEnd=function(e){o++,void 0!==r.onProgress&&r.onProgress(e,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(e){void 0!==r.onError&&r.onError(e)},this.resolveURL=function(e){return s?s(e):e},this.setURLModifier=function(e){return s=e,this}}var hi=new ui,di={};function pi(e){this.manager=void 0!==e?e:hi}function fi(e){this.manager=void 0!==e?e:hi,this._parser=null}function mi(e){this.manager=void 0!==e?e:hi}function gi(e){this.manager=void 0!==e?e:hi}function yi(e){this.manager=void 0!==e?e:hi}function vi(){this.type="Curve",this.arcLengthDivisions=200}function bi(e,t,n,r,i,o,a,s){vi.call(this),this.type="EllipseCurve",this.aX=e||0,this.aY=t||0,this.xRadius=n||1,this.yRadius=r||1,this.aStartAngle=i||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=a||!1,this.aRotation=s||0}function _i(e,t,n,r,i,o){bi.call(this,e,t,n,n,r,i,o),this.type="ArcCurve"}function wi(){var e=0,t=0,n=0,r=0;function i(i,o,a,s){e=i,t=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(e,t,n,r,o){i(t,n,o*(n-e),o*(r-t))},initNonuniformCatmullRom:function(e,t,n,r,o,a,s){var c=(t-e)/o-(n-e)/(o+a)+(n-t)/a,l=(n-t)/a-(r-t)/(a+s)+(r-n)/s;i(t,n,c*=a,l*=a)},calc:function(i){var o=i*i;return e+t*i+n*o+r*(o*i)}}}Object.assign(pi.prototype,{load:function(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);var i=this,o=li.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;if(void 0===di[e]){var a=e.match(/^data:(.*?)(;base64)?,(.*)$/);if(a){var s=a[1],c=!!a[2],l=a[3];l=window.decodeURIComponent(l),c&&(l=window.atob(l));try{var u,h=(this.responseType||"").toLowerCase();switch(h){case"arraybuffer":case"blob":for(var d=new Uint8Array(l.length),p=0;p<l.length;p++)d[p]=l.charCodeAt(p);u="blob"===h?new Blob([d.buffer],{type:s}):d.buffer;break;case"document":var f=new DOMParser;u=f.parseFromString(l,s);break;case"json":u=JSON.parse(l);break;default:u=l}window.setTimeout((function(){t&&t(u),i.manager.itemEnd(e)}),0)}catch(t){window.setTimeout((function(){r&&r(t),i.manager.itemEnd(e),i.manager.itemError(e)}),0)}}else{di[e]=[],di[e].push({onLoad:t,onProgress:n,onError:r});var m=new XMLHttpRequest;for(var g in m.open("GET",e,!0),m.addEventListener("load",(function(t){var n=this.response;li.add(e,n);var r=di[e];if(delete di[e],200===this.status){for(var o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(e)}else if(0===this.status){console.warn("THREE.FileLoader: HTTP Status 0 received.");for(o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(e)}else{for(o=0,a=r.length;o<a;o++){var s;(s=r[o]).onError&&s.onError(t)}i.manager.itemEnd(e),i.manager.itemError(e)}}),!1),m.addEventListener("progress",(function(t){for(var n=di[e],r=0,i=n.length;r<i;r++){var o=n[r];o.onProgress&&o.onProgress(t)}}),!1),m.addEventListener("error",(function(t){var n=di[e];delete di[e];for(var r=0,o=n.length;r<o;r++){var a=n[r];a.onError&&a.onError(t)}i.manager.itemEnd(e),i.manager.itemError(e)}),!1),void 0!==this.responseType&&(m.responseType=this.responseType),void 0!==this.withCredentials&&(m.withCredentials=this.withCredentials),m.overrideMimeType&&m.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)m.setRequestHeader(g,this.requestHeader[g]);m.send(null)}return i.manager.itemStart(e),m}di[e].push({onLoad:t,onProgress:n,onError:r})},setPath:function(e){return this.path=e,this},setResponseType:function(e){return this.responseType=e,this},setWithCredentials:function(e){return this.withCredentials=e,this},setMimeType:function(e){return this.mimeType=e,this},setRequestHeader:function(e){return this.requestHeader=e,this}}),Object.assign(function(e){this.manager=void 0!==e?e:hi,this._parser=null}.prototype,{load:function(e,t,n,r){var i=this,o=[],a=new Bn;a.image=o;var s=new pi(this.manager);function c(c){s.load(e[c],(function(e){var n=i._parser(e,!0);o[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},6===(l+=1)&&(1===n.mipmapCount&&(a.minFilter=1006),a.format=n.format,a.needsUpdate=!0,t&&t(a))}),n,r)}if(s.setPath(this.path),s.setResponseType("arraybuffer"),Array.isArray(e))for(var l=0,u=0,h=e.length;u<h;++u)c(u);else s.load(e,(function(e){var n=i._parser(e,!0);if(n.isCubemap)for(var r=n.mipmaps.length/n.mipmapCount,s=0;s<r;s++){o[s]={mipmaps:[]};for(var c=0;c<n.mipmapCount;c++)o[s].mipmaps.push(n.mipmaps[s*n.mipmapCount+c]),o[s].format=n.format,o[s].width=n.width,o[s].height=n.height}else a.image.width=n.width,a.image.height=n.height,a.mipmaps=n.mipmaps;1===n.mipmapCount&&(a.minFilter=1006),a.format=n.format,a.needsUpdate=!0,t&&t(a)}),n,r);return a},setPath:function(e){return this.path=e,this}}),Object.assign(fi.prototype,{load:function(e,t,n,r){var i=this,o=new T,a=new pi(this.manager);return a.setResponseType("arraybuffer"),a.load(e,(function(e){var n=i._parser(e);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:1001,o.wrapT=void 0!==n.wrapT?n.wrapT:1001,o.magFilter=void 0!==n.magFilter?n.magFilter:1006,o.minFilter=void 0!==n.minFilter?n.minFilter:1008,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps),1===n.mipmapCount&&(o.minFilter=1006),o.needsUpdate=!0,t&&t(o,n))}),n,r),o}}),Object.assign(mi.prototype,{crossOrigin:"Anonymous",load:function(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);var i=this,o=li.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;var a=document.createElementNS("http://www.w3.org/1999/xhtml","img");return a.addEventListener("load",(function(){li.add(e,this),t&&t(this),i.manager.itemEnd(e)}),!1),a.addEventListener("error",(function(t){r&&r(t),i.manager.itemEnd(e),i.manager.itemError(e)}),!1),"data:"!==e.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(e),a.src=e,a},setCrossOrigin:function(e){return this.crossOrigin=e,this},setPath:function(e){return this.path=e,this}}),Object.assign(gi.prototype,{crossOrigin:"Anonymous",load:function(e,t,n,r){var i=new M,o=new mi(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);var a=0;function s(n){o.load(e[n],(function(e){i.images[n]=e,6===++a&&(i.needsUpdate=!0,t&&t(i))}),void 0,r)}for(var c=0;c<e.length;++c)s(c);return i},setCrossOrigin:function(e){return this.crossOrigin=e,this},setPath:function(e){return this.path=e,this}}),Object.assign(yi.prototype,{crossOrigin:"Anonymous",load:function(e,t,n,r){var i=new E,o=new mi(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,(function(n){i.image=n;var r=e.search(/\.(jpg|jpeg)$/)>0||0===e.search(/^data\:image\/jpeg/);i.format=r?1022:1023,i.needsUpdate=!0,void 0!==t&&t(i)}),n,r),i},setCrossOrigin:function(e){return this.crossOrigin=e,this},setPath:function(e){return this.path=e,this}}),Object.assign(vi.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(e,t){var n=this.getUtoTmapping(e);return this.getPoint(n,t)},getPoints:function(e){void 0===e&&(e=5);for(var t=[],n=0;n<=e;n++)t.push(this.getPoint(n/e));return t},getSpacedPoints:function(e){void 0===e&&(e=5);for(var t=[],n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t},getLength:function(){var e=this.getLengths();return e[e.length-1]},getLengths:function(e){if(void 0===e&&(e=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var t,n,r=[],i=this.getPoint(0),o=0;for(r.push(0),n=1;n<=e;n++)o+=(t=this.getPoint(n/e)).distanceTo(i),r.push(o),i=t;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(e,t){var n,r=this.getLengths(),i=0,o=r.length;n=t||e*r[o-1];for(var a,s=0,c=o-1;s<=c;)if((a=r[i=Math.floor(s+(c-s)/2)]-n)<0)s=i+1;else{if(!(a>0)){c=i;break}c=i-1}if(r[i=c]===n)return i/(o-1);var l=r[i];return(i+(n-l)/(r[i+1]-l))/(o-1)},getTangent:function(e){var t=e-1e-4,n=e+1e-4;t<0&&(t=0),n>1&&(n=1);var r=this.getPoint(t);return this.getPoint(n).clone().sub(r).normalize()},getTangentAt:function(e){var t=this.getUtoTmapping(e);return this.getTangent(t)},computeFrenetFrames:function(e,t){var n,r,i,o=new b,a=[],s=[],c=[],l=new b,u=new y;for(n=0;n<=e;n++)r=n/e,a[n]=this.getTangentAt(r),a[n].normalize();s[0]=new b,c[0]=new b;var h=Number.MAX_VALUE,d=Math.abs(a[0].x),p=Math.abs(a[0].y),f=Math.abs(a[0].z);for(d<=h&&(h=d,o.set(1,0,0)),p<=h&&(h=p,o.set(0,1,0)),f<=h&&o.set(0,0,1),l.crossVectors(a[0],o).normalize(),s[0].crossVectors(a[0],l),c[0].crossVectors(a[0],s[0]),n=1;n<=e;n++)s[n]=s[n-1].clone(),c[n]=c[n-1].clone(),l.crossVectors(a[n-1],a[n]),l.length()>Number.EPSILON&&(l.normalize(),i=Math.acos(m.clamp(a[n-1].dot(a[n]),-1,1)),s[n].applyMatrix4(u.makeRotationAxis(l,i))),c[n].crossVectors(a[n],s[n]);if(!0===t)for(i=Math.acos(m.clamp(s[0].dot(s[e]),-1,1)),i/=e,a[0].dot(l.crossVectors(s[0],s[e]))>0&&(i=-i),n=1;n<=e;n++)s[n].applyMatrix4(u.makeRotationAxis(a[n],i*n)),c[n].crossVectors(a[n],s[n]);return{tangents:a,normals:s,binormals:c}},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this},toJSON:function(){var e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e},fromJSON:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}),bi.prototype=Object.create(vi.prototype),bi.prototype.constructor=bi,bi.prototype.isEllipseCurve=!0,bi.prototype.getPoint=function(e,t){for(var n=t||new g,r=2*Math.PI,i=this.aEndAngle-this.aStartAngle,o=Math.abs(i)<Number.EPSILON;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);var a=this.aStartAngle+e*i,s=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){var l=Math.cos(this.aRotation),u=Math.sin(this.aRotation),h=s-this.aX,d=c-this.aY;s=h*l-d*u+this.aX,c=h*u+d*l+this.aY}return n.set(s,c)},bi.prototype.copy=function(e){return vi.prototype.copy.call(this,e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this},bi.prototype.toJSON=function(){var e=vi.prototype.toJSON.call(this);return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e},bi.prototype.fromJSON=function(e){return vi.prototype.fromJSON.call(this,e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this},_i.prototype=Object.create(bi.prototype),_i.prototype.constructor=_i,_i.prototype.isArcCurve=!0;var Ei=new b,Ai=new wi,xi=new wi,Si=new wi;function Ti(e,t,n,r){vi.call(this),this.type="CatmullRomCurve3",this.points=e||[],this.closed=t||!1,this.curveType=n||"centripetal",this.tension=r||.5}function Mi(e,t,n,r,i){var o=.5*(r-t),a=.5*(i-n),s=e*e;return(2*n-2*r+o+a)*(e*s)+(-3*n+3*r-2*o-a)*s+o*e+n}function Ri(e,t,n,r){return function(e,t){var n=1-e;return n*n*t}(e,t)+function(e,t){return 2*(1-e)*e*t}(e,n)+function(e,t){return e*e*t}(e,r)}function Ci(e,t,n,r,i){return function(e,t){var n=1-e;return n*n*n*t}(e,t)+function(e,t){var n=1-e;return 3*n*n*e*t}(e,n)+function(e,t){return 3*(1-e)*e*e*t}(e,r)+function(e,t){return e*e*e*t}(e,i)}function ki(e,t,n,r){vi.call(this),this.type="CubicBezierCurve",this.v0=e||new g,this.v1=t||new g,this.v2=n||new g,this.v3=r||new g}function Ii(e,t,n,r){vi.call(this),this.type="CubicBezierCurve3",this.v0=e||new b,this.v1=t||new b,this.v2=n||new b,this.v3=r||new b}function Pi(e,t){vi.call(this),this.type="LineCurve",this.v1=e||new g,this.v2=t||new g}function Oi(e,t){vi.call(this),this.type="LineCurve3",this.v1=e||new b,this.v2=t||new b}function Ni(e,t,n){vi.call(this),this.type="QuadraticBezierCurve",this.v0=e||new g,this.v1=t||new g,this.v2=n||new g}function Di(e,t,n){vi.call(this),this.type="QuadraticBezierCurve3",this.v0=e||new b,this.v1=t||new b,this.v2=n||new b}function Li(e){vi.call(this),this.type="SplineCurve",this.points=e||[]}Ti.prototype=Object.create(vi.prototype),Ti.prototype.constructor=Ti,Ti.prototype.isCatmullRomCurve3=!0,Ti.prototype.getPoint=function(e,t){var n,r,i,o,a=t||new b,s=this.points,c=s.length,l=(c-(this.closed?0:1))*e,u=Math.floor(l),h=l-u;if(this.closed?u+=u>0?0:(Math.floor(Math.abs(u)/s.length)+1)*s.length:0===h&&u===c-1&&(u=c-2,h=1),this.closed||u>0?n=s[(u-1)%c]:(Ei.subVectors(s[0],s[1]).add(s[0]),n=Ei),r=s[u%c],i=s[(u+1)%c],this.closed||u+2<c?o=s[(u+2)%c]:(Ei.subVectors(s[c-1],s[c-2]).add(s[c-1]),o=Ei),"centripetal"===this.curveType||"chordal"===this.curveType){var d="chordal"===this.curveType?.5:.25,p=Math.pow(n.distanceToSquared(r),d),f=Math.pow(r.distanceToSquared(i),d),m=Math.pow(i.distanceToSquared(o),d);f<1e-4&&(f=1),p<1e-4&&(p=f),m<1e-4&&(m=f),Ai.initNonuniformCatmullRom(n.x,r.x,i.x,o.x,p,f,m),xi.initNonuniformCatmullRom(n.y,r.y,i.y,o.y,p,f,m),Si.initNonuniformCatmullRom(n.z,r.z,i.z,o.z,p,f,m)}else"catmullrom"===this.curveType&&(Ai.initCatmullRom(n.x,r.x,i.x,o.x,this.tension),xi.initCatmullRom(n.y,r.y,i.y,o.y,this.tension),Si.initCatmullRom(n.z,r.z,i.z,o.z,this.tension));return a.set(Ai.calc(h),xi.calc(h),Si.calc(h)),a},Ti.prototype.copy=function(e){vi.prototype.copy.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var r=e.points[t];this.points.push(r.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},Ti.prototype.toJSON=function(){var e=vi.prototype.toJSON.call(this);e.points=[];for(var t=0,n=this.points.length;t<n;t++){var r=this.points[t];e.points.push(r.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e},Ti.prototype.fromJSON=function(e){vi.prototype.fromJSON.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var r=e.points[t];this.points.push((new b).fromArray(r))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},ki.prototype=Object.create(vi.prototype),ki.prototype.constructor=ki,ki.prototype.isCubicBezierCurve=!0,ki.prototype.getPoint=function(e,t){var n=t||new g,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ci(e,r.x,i.x,o.x,a.x),Ci(e,r.y,i.y,o.y,a.y)),n},ki.prototype.copy=function(e){return vi.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this},ki.prototype.toJSON=function(){var e=vi.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e},ki.prototype.fromJSON=function(e){return vi.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this},Ii.prototype=Object.create(vi.prototype),Ii.prototype.constructor=Ii,Ii.prototype.isCubicBezierCurve3=!0,Ii.prototype.getPoint=function(e,t){var n=t||new b,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ci(e,r.x,i.x,o.x,a.x),Ci(e,r.y,i.y,o.y,a.y),Ci(e,r.z,i.z,o.z,a.z)),n},Ii.prototype.copy=function(e){return vi.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this},Ii.prototype.toJSON=function(){var e=vi.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e},Ii.prototype.fromJSON=function(e){return vi.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this},Pi.prototype=Object.create(vi.prototype),Pi.prototype.constructor=Pi,Pi.prototype.isLineCurve=!0,Pi.prototype.getPoint=function(e,t){var n=t||new g;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n},Pi.prototype.getPointAt=function(e,t){return this.getPoint(e,t)},Pi.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},Pi.prototype.copy=function(e){return vi.prototype.copy.call(this,e),this.v1.copy(e.v1),this.v2.copy(e.v2),this},Pi.prototype.toJSON=function(){var e=vi.prototype.toJSON.call(this);return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},Pi.prototype.fromJSON=function(e){return vi.prototype.fromJSON.call(this,e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},Oi.prototype=Object.create(vi.prototype),Oi.prototype.constructor=Oi,Oi.prototype.isLineCurve3=!0,Oi.prototype.getPoint=function(e,t){var n=t||new b;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n},Oi.prototype.getPointAt=function(e,t){return this.getPoint(e,t)},Oi.prototype.copy=function(e){return vi.prototype.copy.call(this,e),this.v1.copy(e.v1),this.v2.copy(e.v2),this},Oi.prototype.toJSON=function(){var e=vi.prototype.toJSON.call(this);return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},Oi.prototype.fromJSON=function(e){return vi.prototype.fromJSON.call(this,e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},Ni.prototype=Object.create(vi.prototype),Ni.prototype.constructor=Ni,Ni.prototype.isQuadraticBezierCurve=!0,Ni.prototype.getPoint=function(e,t){var n=t||new g,r=this.v0,i=this.v1,o=this.v2;return n.set(Ri(e,r.x,i.x,o.x),Ri(e,r.y,i.y,o.y)),n},Ni.prototype.copy=function(e){return vi.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this},Ni.prototype.toJSON=function(){var e=vi.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},Ni.prototype.fromJSON=function(e){return vi.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},Di.prototype=Object.create(vi.prototype),Di.prototype.constructor=Di,Di.prototype.isQuadraticBezierCurve3=!0,Di.prototype.getPoint=function(e,t){var n=t||new b,r=this.v0,i=this.v1,o=this.v2;return n.set(Ri(e,r.x,i.x,o.x),Ri(e,r.y,i.y,o.y),Ri(e,r.z,i.z,o.z)),n},Di.prototype.copy=function(e){return vi.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this},Di.prototype.toJSON=function(){var e=vi.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},Di.prototype.fromJSON=function(e){return vi.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},Li.prototype=Object.create(vi.prototype),Li.prototype.constructor=Li,Li.prototype.isSplineCurve=!0,Li.prototype.getPoint=function(e,t){var n=t||new g,r=this.points,i=(r.length-1)*e,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],c=r[o],l=r[o>r.length-2?r.length-1:o+1],u=r[o>r.length-3?r.length-1:o+2];return n.set(Mi(a,s.x,c.x,l.x,u.x),Mi(a,s.y,c.y,l.y,u.y)),n},Li.prototype.copy=function(e){vi.prototype.copy.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var r=e.points[t];this.points.push(r.clone())}return this},Li.prototype.toJSON=function(){var e=vi.prototype.toJSON.call(this);e.points=[];for(var t=0,n=this.points.length;t<n;t++){var r=this.points[t];e.points.push(r.toArray())}return e},Li.prototype.fromJSON=function(e){vi.prototype.fromJSON.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var r=e.points[t];this.points.push((new g).fromArray(r))}return this};var Fi=Object.freeze({ArcCurve:_i,CatmullRomCurve3:Ti,CubicBezierCurve:ki,CubicBezierCurve3:Ii,EllipseCurve:bi,LineCurve:Pi,LineCurve3:Oi,QuadraticBezierCurve:Ni,QuadraticBezierCurve3:Di,SplineCurve:Li});function ji(){vi.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function Ui(e){ji.call(this),this.type="Path",this.currentPoint=new g,e&&this.setFromPoints(e)}function Bi(e){Ui.call(this,e),this.uuid=m.generateUUID(),this.type="Shape",this.holes=[]}function Vi(e,t){Ge.call(this),this.type="Light",this.color=new fe(e),this.intensity=void 0!==t?t:1,this.receiveShadow=void 0}function Hi(e,t,n){Vi.call(this,e,n),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(Ge.DefaultUp),this.updateMatrix(),this.groundColor=new fe(t)}function zi(e){this.camera=e,this.bias=0,this.radius=1,this.mapSize=new g(512,512),this.map=null,this.matrix=new y}function qi(){zi.call(this,new nn(50,1,.5,500))}function Gi(e,t,n,r,i,o){Vi.call(this,e,t),this.type="SpotLight",this.position.copy(Ge.DefaultUp),this.updateMatrix(),this.target=new Ge,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(e){this.intensity=e/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==r?r:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==o?o:1,this.shadow=new qi}function Wi(e,t,n,r){Vi.call(this,e,t),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(e){this.intensity=e/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==r?r:1,this.shadow=new zi(new nn(90,1,.5,500))}function Ji(){zi.call(this,new Je(-5,5,5,-5,.5,500))}function Zi(e,t){Vi.call(this,e,t),this.type="DirectionalLight",this.position.copy(Ge.DefaultUp),this.updateMatrix(),this.target=new Ge,this.shadow=new Ji}function Yi(e,t){Vi.call(this,e,t),this.type="AmbientLight",this.castShadow=void 0}function Xi(e,t,n,r){Vi.call(this,e,t),this.type="RectAreaLight",this.width=void 0!==n?n:10,this.height=void 0!==r?r:10}function Qi(e,t,n,r){co.call(this,e,t,n,r)}function Ki(e,t,n){co.call(this,e,t,n)}function $i(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new t.constructor(n),this.sampleValues=t,this.valueSize=n}function eo(e,t,n,r){$i.call(this,e,t,n,r)}function to(e,t,n,r){co.call(this,e,t,n,r)}function no(e,t,n,r){co.call(this,e,t,n,r)}function ro(e,t,n,r){co.call(this,e,t,n,r)}function io(e,t,n,r){$i.call(this,e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function oo(e,t,n,r){$i.call(this,e,t,n,r)}function ao(e,t,n,r){$i.call(this,e,t,n,r)}ji.prototype=Object.assign(Object.create(vi.prototype),{constructor:ji,add:function(e){this.curves.push(e)},closePath:function(){var e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new Pi(t,e))},getPoint:function(e){for(var t=e*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=t){var i=n[r]-t,o=this.curves[r],a=o.getLength(),s=0===a?0:1-i/a;return o.getPointAt(s)}r++}return null},getLength:function(){var e=this.getCurveLengths();return e[e.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var e=[],t=0,n=0,r=this.curves.length;n<r;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e},getSpacedPoints:function(e){void 0===e&&(e=40);for(var t=[],n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t},getPoints:function(e){e=e||12;for(var t,n=[],r=0,i=this.curves;r<i.length;r++)for(var o=i[r],a=o&&o.isEllipseCurve?2*e:o&&o.isLineCurve?1:o&&o.isSplineCurve?e*o.points.length:e,s=o.getPoints(a),c=0;c<s.length;c++){var l=s[c];t&&t.equals(l)||(n.push(l),t=l)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(e){vi.prototype.copy.call(this,e),this.curves=[];for(var t=0,n=e.curves.length;t<n;t++){var r=e.curves[t];this.curves.push(r.clone())}return this.autoClose=e.autoClose,this},toJSON:function(){var e=vi.prototype.toJSON.call(this);e.autoClose=this.autoClose,e.curves=[];for(var t=0,n=this.curves.length;t<n;t++){var r=this.curves[t];e.curves.push(r.toJSON())}return e},fromJSON:function(e){vi.prototype.fromJSON.call(this,e),this.autoClose=e.autoClose,this.curves=[];for(var t=0,n=e.curves.length;t<n;t++){var r=e.curves[t];this.curves.push((new Fi[r.type]).fromJSON(r))}return this}}),Ui.prototype=Object.assign(Object.create(ji.prototype),{constructor:Ui,setFromPoints:function(e){this.moveTo(e[0].x,e[0].y);for(var t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y)},moveTo:function(e,t){this.currentPoint.set(e,t)},lineTo:function(e,t){var n=new Pi(this.currentPoint.clone(),new g(e,t));this.curves.push(n),this.currentPoint.set(e,t)},quadraticCurveTo:function(e,t,n,r){var i=new Ni(this.currentPoint.clone(),new g(e,t),new g(n,r));this.curves.push(i),this.currentPoint.set(n,r)},bezierCurveTo:function(e,t,n,r,i,o){var a=new ki(this.currentPoint.clone(),new g(e,t),new g(n,r),new g(i,o));this.curves.push(a),this.currentPoint.set(i,o)},splineThru:function(e){var t=new Li([this.currentPoint.clone()].concat(e));this.curves.push(t),this.currentPoint.copy(e[e.length-1])},arc:function(e,t,n,r,i,o){var a=this.currentPoint.x,s=this.currentPoint.y;this.absarc(e+a,t+s,n,r,i,o)},absarc:function(e,t,n,r,i,o){this.absellipse(e,t,n,n,r,i,o)},ellipse:function(e,t,n,r,i,o,a,s){var c=this.currentPoint.x,l=this.currentPoint.y;this.absellipse(e+c,t+l,n,r,i,o,a,s)},absellipse:function(e,t,n,r,i,o,a,s){var c=new bi(e,t,n,r,i,o,a,s);if(this.curves.length>0){var l=c.getPoint(0);l.equals(this.currentPoint)||this.lineTo(l.x,l.y)}this.curves.push(c);var u=c.getPoint(1);this.currentPoint.copy(u)},copy:function(e){return ji.prototype.copy.call(this,e),this.currentPoint.copy(e.currentPoint),this},toJSON:function(){var e=ji.prototype.toJSON.call(this);return e.currentPoint=this.currentPoint.toArray(),e},fromJSON:function(e){return ji.prototype.fromJSON.call(this,e),this.currentPoint.fromArray(e.currentPoint),this}}),Bi.prototype=Object.assign(Object.create(Ui.prototype),{constructor:Bi,getPointsHoles:function(e){for(var t=[],n=0,r=this.holes.length;n<r;n++)t[n]=this.holes[n].getPoints(e);return t},extractPoints:function(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}},copy:function(e){Ui.prototype.copy.call(this,e),this.holes=[];for(var t=0,n=e.holes.length;t<n;t++){var r=e.holes[t];this.holes.push(r.clone())}return this},toJSON:function(){var e=Ui.prototype.toJSON.call(this);e.uuid=this.uuid,e.holes=[];for(var t=0,n=this.holes.length;t<n;t++){var r=this.holes[t];e.holes.push(r.toJSON())}return e},fromJSON:function(e){Ui.prototype.fromJSON.call(this,e),this.uuid=e.uuid,this.holes=[];for(var t=0,n=e.holes.length;t<n;t++){var r=e.holes[t];this.holes.push((new Ui).fromJSON(r))}return this}}),Vi.prototype=Object.assign(Object.create(Ge.prototype),{constructor:Vi,isLight:!0,copy:function(e){return Ge.prototype.copy.call(this,e),this.color.copy(e.color),this.intensity=e.intensity,this},toJSON:function(e){var t=Ge.prototype.toJSON.call(this,e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}),Hi.prototype=Object.assign(Object.create(Vi.prototype),{constructor:Hi,isHemisphereLight:!0,copy:function(e){return Vi.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this}}),Object.assign(zi.prototype,{copy:function(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var e={};return 0!==this.bias&&(e.bias=this.bias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}),qi.prototype=Object.assign(Object.create(zi.prototype),{constructor:qi,isSpotLightShadow:!0,update:function(e){var t=this.camera,n=2*m.RAD2DEG*e.angle,r=this.mapSize.width/this.mapSize.height,i=e.distance||t.far;n===t.fov&&r===t.aspect&&i===t.far||(t.fov=n,t.aspect=r,t.far=i,t.updateProjectionMatrix())}}),Gi.prototype=Object.assign(Object.create(Vi.prototype),{constructor:Gi,isSpotLight:!0,copy:function(e){return Vi.prototype.copy.call(this,e),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}),Wi.prototype=Object.assign(Object.create(Vi.prototype),{constructor:Wi,isPointLight:!0,copy:function(e){return Vi.prototype.copy.call(this,e),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}),Ji.prototype=Object.assign(Object.create(zi.prototype),{constructor:Ji}),Zi.prototype=Object.assign(Object.create(Vi.prototype),{constructor:Zi,isDirectionalLight:!0,copy:function(e){return Vi.prototype.copy.call(this,e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}),Yi.prototype=Object.assign(Object.create(Vi.prototype),{constructor:Yi,isAmbientLight:!0}),Xi.prototype=Object.assign(Object.create(Vi.prototype),{constructor:Xi,isRectAreaLight:!0,copy:function(e){return Vi.prototype.copy.call(this,e),this.width=e.width,this.height=e.height,this},toJSON:function(e){var t=Vi.prototype.toJSON.call(this,e);return t.object.width=this.width,t.object.height=this.height,t}}),Qi.prototype=Object.assign(Object.create(co.prototype),{constructor:Qi,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Ki.prototype=Object.assign(Object.create(co.prototype),{constructor:Ki,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Object.assign($i.prototype,{evaluate:function(e){var t=this.parameterPositions,n=this._cachedIndex,r=t[n],i=t[n-1];e:{t:{var o;n:{r:if(!(e<r)){for(var a=n+2;;){if(void 0===r){if(e<i)break r;return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,e,i)}if(n===a)break;if(i=r,e<(r=t[++n]))break t}o=t.length;break n}if(e>=i)break e;var s=t[1];e<s&&(n=2,i=s);for(a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,e,r);if(n===a)break;if(r=i,e>=(i=t[--n-1]))break t}o=n,n=0}for(;n<o;){var c=n+o>>>1;e<t[c]?o=c:n=c+1}if(r=t[n],void 0===(i=t[n-1]))return this._cachedIndex=0,this.beforeStart_(0,e,r);if(void 0===r)return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,i,e)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,e,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(e){for(var t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r,o=0;o!==r;++o)t[o]=n[i+o];return t},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),+var ln,un=function(){function e(e,t){var n=this;this.app_=e,this.authProvider_=t,this.auth_=null,this.auth_=t.getImmediate({optional:!0}),this.auth_||t.get().then((function(e){return n.auth_=e}))}return e.prototype.getToken=function(e){return this.auth_?this.auth_.getToken(e).catch((function(e){return e&&"auth/token-not-initialized"===e.code?(A("Got auth/token-not-initialized error. Treating as null token."),null):Promise.reject(e)})):Promise.resolve(null)},e.prototype.addTokenChangeListener=function(e){this.auth_?this.auth_.addAuthTokenListener(e):(setTimeout((function(){return e(null)}),0),this.authProvider_.get().then((function(t){return t.addAuthTokenListener(e)})))},e.prototype.removeTokenChangeListener=function(e){this.authProvider_.get().then((function(t){return t.removeAuthTokenListener(e)}))},e.prototype.notifyForInvalidToken=function(){var e='Provided authentication credentials for the app named "'+this.app_.name+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.app_.options?e+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.app_.options?e+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':e+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',M(e)},e}(),hn=function(){function e(){}return e.prototype.getToken=function(t){return Promise.resolve({accessToken:e.EMULATOR_AUTH_TOKEN})},e.prototype.addTokenChangeListener=function(t){t(e.EMULATOR_AUTH_TOKEN)},e.prototype.removeTokenChangeListener=function(e){},e.prototype.notifyForInvalidToken=function(){},e.EMULATOR_AUTH_TOKEN="owner",e}(),dn=function(){function e(){this.repos_={},this.useRestClient_=!1}return e.getInstance=function(){return ln||(ln=new e),ln},e.prototype.interrupt=function(){var e,t,n,r;try{for(var i=s.__values(Object.keys(this.repos_)),o=i.next();!o.done;o=i.next()){var a=o.value;try{for(var c=(n=void 0,s.__values(Object.keys(this.repos_[a]))),l=c.next();!l.done;l=c.next()){var u=l.value;this.repos_[a][u].interrupt()}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},e.prototype.resume=function(){var e,t,n,r;try{for(var i=s.__values(Object.keys(this.repos_)),o=i.next();!o.done;o=i.next()){var a=o.value;try{for(var c=(n=void 0,s.__values(Object.keys(this.repos_[a]))),l=c.next();!l.done;l=c.next()){var u=l.value;this.repos_[a][u].resume()}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},e.prototype.databaseFromApp=function(e,t,n){var i=n||e.options.databaseURL;void 0===i&&T("Can't determine Firebase Database URL. Be sure to include databaseURL option when calling firebase.initializeApp().");var o,a=X(i),s=a.repoInfo,l=void 0;void 0!==r&&(l=r.env.FIREBASE_DATABASE_EMULATOR_HOST),l?(o=!0,i="http://"+l+"?ns="+s.namespace,s=(a=X(i)).repoInfo):o=!a.repoInfo.secure;var u=c.CONSTANTS.NODE_ADMIN&&o?new hn:new un(e,t);return de("Invalid Firebase Database URL",1,a),a.path.isEmpty()||T("Database URL must point to the root of a Firebase Database (not including a child path)."),this.createRepo(s,e,u).database},e.prototype.deleteRepo=function(e){var t=c.safeGet(this.repos_,e.app.name);t&&c.safeGet(t,e.repoInfo_.toURLString())===e||T("Database "+e.app.name+"("+e.repoInfo_+") has already been deleted."),e.interrupt(),delete t[e.repoInfo_.toURLString()]},e.prototype.createRepo=function(e,t,n){var r=c.safeGet(this.repos_,t.name);r||(r={},this.repos_[t.name]=r);var i=c.safeGet(r,e.toURLString());return i&&T("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call."),i=new en(e,this.useRestClient_,t,n),r[e.toURLString()]=i,i},e.prototype.forceRestClient=function(e){this.useRestClient_=e},e}(),pn=function(){function e(e){this.repo_=e,e instanceof en||T("Don't call new Database() directly - please use firebase.database()."),this.root_=new on(e,H.Empty),this.INTERNAL=new fn(this)}return Object.defineProperty(e.prototype,"app",{get:function(){return this.repo_.app},enumerable:!1,configurable:!0}),e.prototype.ref=function(e){return this.checkDeleted_("ref"),c.validateArgCount("database.ref",0,1,arguments.length),e instanceof on?this.refFromURL(e.toString()):void 0!==e?this.root_.child(e):this.root_},e.prototype.refFromURL=function(e){var t="database.refFromURL";this.checkDeleted_(t),c.validateArgCount(t,1,1,arguments.length);var n=X(e);de(t,1,n);var r=n.repoInfo;return r.host!==this.repo_.repoInfo_.host&&T(t+": Host name does not match the current database: (found "+r.host+" but expected "+this.repo_.repoInfo_.host+")"),this.ref(n.path.toString())},e.prototype.checkDeleted_=function(e){null===this.repo_&&T("Cannot call "+e+" on a deleted database.")},e.prototype.goOffline=function(){c.validateArgCount("database.goOffline",0,0,arguments.length),this.checkDeleted_("goOffline"),this.repo_.interrupt()},e.prototype.goOnline=function(){c.validateArgCount("database.goOnline",0,0,arguments.length),this.checkDeleted_("goOnline"),this.repo_.resume()},e.ServerValue={TIMESTAMP:{".sv":"timestamp"},increment:function(e){return{".sv":{increment:e}}}},e}(),fn=function(){function e(e){this.database=e}return e.prototype.delete=function(){return s.__awaiter(this,void 0,void 0,(function(){return s.__generator(this,(function(e){return this.database.checkDeleted_("delete"),dn.getInstance().deleteRepo(this.database.repo_),this.database.repo_=null,this.database.root_=null,this.database.INTERNAL=null,this.database=null,[2]}))}))},e}(),mn=Object.freeze({__proto__:null,forceLongPolling:function(){Zt.forceDisallow(),qt.forceAllow()},forceWebSockets:function(){qt.forceDisallow()},isWebSocketsAvailable:function(){return Zt.isAvailable()},setSecurityDebugCallback:function(e,t){e.repo.persistentConnection_.securityDebugCallback_=t},stats:function(e,t){e.repo.stats(t)},statsIncrementCounter:function(e,t){e.repo.statsIncrementCounter(t)},dataUpdateCount:function(e){return e.repo.dataUpdateCount},interceptServerData:function(e,t){return e.repo.interceptServerData_(t)}}),gn=Kt;Kt.prototype.simpleListen=function(e,t){this.sendRequest("q",{p:e},t)},Kt.prototype.echo=function(e,t){this.sendRequest("echo",{d:e},t)};var yn=Xt,vn=q,bn=Object.freeze({__proto__:null,DataConnection:gn,RealTimeConnection:yn,hijackHash:function(e){var t=Kt.prototype.put;return Kt.prototype.put=function(n,r,i,o){void 0!==o&&(o=e()),t.call(this,n,r,i,o)},function(){Kt.prototype.put=t}},ConnectionTarget:vn,queryIdentifier:function(e){return e.queryIdentifier()},forceRestClient:function(e){dn.getInstance().forceRestClient(e)}}),_n=pn.ServerValue;function wn(t){!function(e){Wt=e}(t.SDK_VERSION);var n=t.INTERNAL.registerComponent(new u.Component("database",(function(e,t){var n=e.getProvider("app").getImmediate(),r=e.getProvider("auth-internal");return dn.getInstance().databaseFromApp(n,r,t)}),"PUBLIC").setServiceProps({Reference:on,Query:Ke,Database:pn,DataSnapshot:Je,enableLogging:E,INTERNAL:mn,ServerValue:_n,TEST_ACCESS:bn}).setMultipleInstances(!0));t.registerVersion("@firebase/database","0.6.11"),c.isNodeSdk()&&(e.exports=n)}wn(a),t.DataSnapshot=Je,t.Database=pn,t.OnDisconnect=fe,t.Query=Ke,t.Reference=on,t.ServerValue=_n,t.enableLogging=E,t.registerDatabase=wn}).call(this,n(2))},function(e,t,n){const r={0:0,1:.5,2:0,3:.25,4:.5,5:.75,6:0,7:.125,8:.25,9:.375,10:.5,11:.625,12:.75,13:.875};if(AFRAME.registerComponent("multiplier-ring",{dependencies:["geometry","material"],schema:{combo:{default:0},multiplier:{default:1}},init:function(){this.animationSet={from:void 0,to:void 0},this.progress=this.el.getObject3D("mesh").material.uniforms.progress,this.el.setAttribute("animation",{property:"components.material.material.uniforms.progress.value",dur:100,autoplay:!1})},update:function(){this.updateRing()},updateRing:function(){const e=this.data,t=this.el,n=this.progress;if(8===e.multiplier)return void(n.value=1);const i=this.animationSet;i.from=n.value,i.to=r[e.combo],t.setAttribute("animation",i),t.components.animation.beginAnimation()}}),window.AFRAME){const t=["multiplier-ring"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("no-frustum-cull",{init:function(){this.el.object3D.frustumCulled=!1}}),window.AFRAME){const t=["no-frustum-cull"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){"use strict";n.r(t);var r=n(0),i=n.n(r);if(AFRAME.registerShader("panelShader",{schema:{activePanel:{type:"number",is:"uniform",default:0},brightness:{type:"number",is:"uniform",default:.3},borderWidth:{type:"number",is:"uniform",default:.004},borderRadius:{type:"number",is:"uniform",default:.15},colorPrimary:{type:"color",is:"uniform",default:i.a.initial.primary},colorSecondary:{type:"color",is:"uniform",default:i.a.initial.secondary},midSection:{type:"number",is:"uniform",default:0},opacity:{type:"number",is:"uniform",default:1},ratio:{type:"number",is:"uniform",default:.5},transparent:{default:!0}},vertexShader:n(141),fragmentShader:n(142),update:function(e){this.updateVariables(e,"attribute"),this.updateVariables(e,"uniform"),this.el.sceneEl.systems.materials.registerPanel(this.material)}}),window.AFRAME){const t=[],n=["panelShader"],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t){e.exports="varying vec2 uvs;\nvoid main() {\n uvs.xy = uv.xy;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}"},function(e,t){e.exports="#if __VERSION__ == 100\n #extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform vec3 colorPrimary;\nuniform vec3 colorSecondary;\n\n#define PI 3.141592\n#define DIFF_SECTION_WIDTH 0.06\n\nuniform float borderWidth;\nuniform float borderRadius;\nuniform float brightness;\nuniform float ratio;\nuniform float midSection;\nuniform float opacity;\nuniform float activePanel;\n\nvarying vec2 uvs;\n\nfloat sdBox( in vec2 p, in vec2 b )\n{\n vec2 d = abs(p)-b;\n return length(max(d,vec2(0.0))) + min(max(d.x,d.y), 0.0);\n}\n\nvoid main()\n{\n vec2 uv = uvs;\n vec2 uv2 = uv * 2.0 - 1.0; // from -1 to 1\n uv2.x *= ratio;\n\n vec3 col = mix(colorSecondary * uv.y, colorPrimary * uv.y, uv.x) * (brightness + activePanel * 0.4);\n vec3 borderCol = mix(colorSecondary, colorPrimary, uv.y);\n\n vec2 size = vec2(0.83 * ratio, 0.86) - borderRadius;\n float grad = sdBox(uv2, size) - borderRadius;\n grad = min(grad, sdBox(uv2 - size, vec2(borderRadius)));\n grad = min(grad, sdBox(uv2 + size, vec2(borderRadius)));\n grad = -grad;\n float aa = fwidth(grad);\n\n float isShape = smoothstep(-aa, 0.0, grad);\n float alpha = clamp(isShape + smoothstep(-0.15, 0.15, grad), 0.0, 1.0);\n float isBorder = smoothstep(-aa - borderWidth, aa - borderWidth, grad) - smoothstep(-aa + borderWidth, aa + borderWidth, grad);\n float mid = clamp(midSection, 0.0, 1.0);\n col *= 1.0 - mid * (step(0.5 - DIFF_SECTION_WIDTH * mid, uv.x) - step(0.5 + DIFF_SECTION_WIDTH * midSection, uv.x)) * 0.3;\n\n gl_FragColor = vec4(mix(col * isShape, borderCol, isBorder), alpha * opacity);\n}\n"},function(e,t,n){if(AFRAME.registerComponent("pause",{schema:{isPaused:{default:!1}},update:function(){this.data.isPaused&&this.el.isPlaying?this.el.pause():this.data.isPaused||this.el.isPlaying||!this.el.sceneEl.isPlaying||this.el.play()}}),window.AFRAME){const t=["pause"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("pauser",{schema:{enabled:{default:!0}},init:function(){this.pauseGame=this.pauseGame.bind(this),document.addEventListener("keydown",e=>{27===e.keyCode&&this.pauseGame()}),this.el.sceneEl.addEventListener("controllerconnected",e=>{"vive-controls"===e.detail.name?this.el.addEventListener("menudown",this.pauseGame):(this.el.addEventListener("thumbstickdown",this.pauseGame),this.el.addEventListener("trackpaddown",this.pauseGame))}),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&this.pauseGame()})},pauseGame:function(){this.data.enabled&&this.el.sceneEl.emit("pausegame",null,!1)}}),window.AFRAME){const t=["pauser"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){var r=n(146);if(AFRAME.registerSystem("play-sound",{init:function(){this.lastSoundPlayed="",this.lastSoundPlayedTime=0,this.pools={}},createPool:function(e,t){this.pools[e]||(this.pools[e]=new r(e,t))},playSound:function(e,t){this.pools[e]||this.createPool(e,t),this.pools[e].play(),this.lastSoundPlayed=e,this.lastSoundTime=this.el.time}}),AFRAME.registerComponent("play-sound",{schema:{enabled:{default:!0},event:{type:"string"},sound:{type:"string"},volume:{type:"number",default:1}},multiple:!0,init:function(){this.el.addEventListener(this.data.event,e=>{this.data.enabled&&this.system.playSound(this.src,this.data.volume)})},update:function(){this.src=this.data.sound,this.data.sound.startsWith("#")&&(this.src=document.querySelector(this.data.sound).getAttribute("src"))}}),window.AFRAME){const t=["play-sound"],n=[],r=["play-sound"];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t){e.exports=function(e,t){var n,r=0,i=[];return(n=new Audio(e)).volume=t,i.push(n),{play:function(){0===i[r].currentTime&&i[r].ended||((n=new Audio(e)).volume=t,i.push(n),r++),(0===i[r].currentTime||i[r].ended)&&i[r].play(),r=(r+1)%i.length}}}},function(e,t,n){function r(e,t){return e-t}if(AFRAME.registerComponent("player-height",{init:function(){this.beatOffset=0,this.heights=[],this.height=0,this.el.sceneEl.addEventListener("menuchallengeselect",this.updateHeight.bind(this)),this.el.sceneEl.addEventListener("playbuttonclick",this.updateHeight.bind(this))},pause:function(){this.heights.length=0},updateHeight:function(){const e=this.heights;e.length>3&&e.shift(),e.push(this.el.object3D.position.y),this.height=function(e){e.sort(r);const t=e.length/2;return t%1?e[t-.5]:(e[t-1]+e[t])/2}(e);const t=(n=this.height,i=1.6,o=2.2,Math.min(Math.max(n,i),o));var n,i,o,a,s;this.beatOffset=(s=0)+(.2-s)*(t-(a=1.6))/(2.2-a)}}),window.AFRAME){const t=["player-height"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("plume",{schema:{color:{default:""},cutDirection:{default:""},horizontalPosition:{default:"middleleft",oneOf:["left","middleleft","middleright","right"]},songPosition:{default:0},type:{default:"arrow",oneOf:["arrow","dot","mine"]},verticalPosition:{default:"middle",oneOf:["bottom","middle","top"]}},horizontalPositions:{left:-.95,middleleft:-.6,middleright:.6,right:.95},init:function(){this.curveEl=document.getElementById("curve"),this.curveFollowRig=document.getElementById("curveFollowRig"),this.handsEls=this.el.sceneEl.querySelectorAll(".handStar"),this.handPos=new THREE.Vector3,this.verticalPositions=this.el.sceneEl.components["beat-system"].verticalPositions,this.el.sceneEl.addEventListener("cleargame",this.returnToPool.bind(this))},update:function(){"mine"===this.data.type?this.poolName="pool__plume-mine":this.poolName=`pool__plume-${this.data.type}-${this.data.color}`},onGenerate:function(e,t,n,r){this.data;const i=this.el,o=this.curveEl.components.supercurve;o.getPointAt(e,i.object3D.position),o.alignToCurve(e,i.object3D),i.object3D.position.x+=this.horizontalPositions[t],i.object3D.position.y+=this.verticalPositions[n]+r,i.object3D.rotation.z=Math.random()*Math.PI*2,this.songPosition=e},tock:function(){if(this.el.object3D.position.z>this.curveFollowRig.object3D.position.z+10)this.returnToPool();else for(let e=0;e<this.handsEls.length;e++){const t=this.handsEls[e];t.object3D.getWorldPosition(this.handPos),this.handPos.distanceToSquared(this.el.object3D.position)<.2&&t.emit("plumepulse")}},returnToPool:function(){this.el.object3D.position.set(0,0,-9999),this.el.object3D.visible=!1,this.el.isPlaying&&this.el.sceneEl.components[this.poolName].returnEntity(this.el)}}),window.AFRAME){const t=["plume"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("punch",{schema:{enabled:{default:!1}},init:function(){this.currentPos=new THREE.Vector3,this.direction=0,this.lastSample=new THREE.Vector3,this.lastSampleTime=0,this.speed=0,this.bbox=new THREE.Box3,this.bboxEl=this.el.querySelector(".punchBbox")},play:function(){this.rig=this.el.closest("#curveFollowRig")},tick:function(e,t){this.data.enabled&&(this.direction=this.currentPos.copy(this.el.object3D.position).sub(this.lastSample),this.speed=this.direction.length()/((e-this.lastSampleTime)/1e3),this.lastSample.copy(this.el.object3D.position),this.lastSampleTime=e)},tickBeatSystem:function(){this.bbox.setFromObject(this.bboxEl.getObject3D("mesh"))},checkCollision:function(){const e=new THREE.Box3,t=new THREE.Vector3(0,0,.2);return function(n){return e.copy(n.bbox).translate(n.el.object3D.position).expandByScalar(.1).expandByVector(t),this.bbox.intersectsBox(e)}}()}),window.AFRAME){const t=["punch"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){var r,i;if(AFRAME.registerComponent("raycaster-target",{schema:{bindToggle:{default:""},depth:{type:"number"},height:{type:"number"},position:{type:"vec3",default:{x:0,y:0,z:0}},rotation:{type:"vec3",default:{x:0,y:0,z:0}},useBoxTarget:{default:!1},width:{type:"number"}},init:(r={primitive:"box"},i={primitive:"plane"},function(){var e,t,n=this.data,o=this.el;(t=document.createElement("a-entity")).classList.add("raycasterTarget"),n.bindToggle?t.setAttribute("bind-toggle__raycastable",n.bindToggle):t.setAttribute("data-raycastable",""),n.useBoxTarget?((e=r).depth=n.depth,e.height=n.height,e.width=n.width):((e=i).height=n.height,e.width=n.width),t.setAttribute("geometry",e),t.object3D.visible=!1,t.object3D.position.copy(n.position),t.object3D.rotation.x=THREE.Math.degToRad(n.rotation.x),t.object3D.rotation.y=THREE.Math.degToRad(n.rotation.y),t.object3D.rotation.z=THREE.Math.degToRad(n.rotation.z),o.appendChild(t)})}),window.AFRAME){const t=["raycaster-target"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){var r,i,o,a;if(AFRAME.registerComponent("recenter",{schema:{enabled:{default:!0}},init:function(){this.el.sceneEl;this.recenter=this.recenter.bind(this),document.querySelectorAll("[tracked-controls]").forEach(e=>{e.addEventListener("menudown",this.recenter),e.addEventListener("thumbstickdown",this.recenter)}),this.el.addEventListener("recenter",this.recenter)},recenter:(r=new THREE.Euler,i=new THREE.Matrix4,o=new THREE.Matrix4,a=new THREE.Matrix4,function(){const e=this.el;if(!this.data.enabled)return;const t=e.sceneEl.camera.el.object3D;i.identity(),r.set(0,-1*t.rotation.y,0),o.makeRotationFromEuler(r),a.makeTranslation(-1*t.position.x,0,-1*t.position.z),i.multiply(o).multiply(a),i.decompose(e.object3D.position,e.object3D.quaternion,e.object3D.scale),e.object3D.updateMatrixWorld(!0),e.emit("recentered",null,!1)})}),window.AFRAME){const t=["recenter"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerShader("ring",{schema:{blur:{default:.01,is:"uniform"},color:{type:"color",is:"uniform"},progress:{default:0,is:"uniform"},radiusInner:{default:.6,is:"uniform"},radiusOuter:{default:1,is:"uniform"}},vertexShader:n(153),fragmentShader:n(154)}),window.AFRAME){const t=[],n=["ring"],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t){e.exports="varying vec2 vUv;\n\nvoid main () {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n"},function(e,t){e.exports="#if __VERSION__ == 100\n #extension GL_OES_standard_derivatives : enable\n#endif\n#define PI 3.14159265358979\nuniform float blur;\nuniform float progress;\nuniform float radiusInner;\nuniform float radiusOuter;\nuniform vec3 color;\n\nvarying vec2 vUv;\n\nvoid main () {\n // make uvs go from -1 to 1\n vec2 uv = vec2(vUv.x * 2.0 - 1.0, vUv.y * 2.0 - 1.0);\n // calculate distance of fragment to center\n float r = uv.x * uv.x + uv.y * uv.y;\n // calculate antialias\n float aa = fwidth(r);\n // make full circle (radiusOuter - radiusInner)\n float col = (1.0 - smoothstep(radiusOuter - aa, radiusOuter + blur + aa, r)) * smoothstep(radiusInner - aa, radiusInner + blur + aa, r);\n // radial gradient\n float a = smoothstep(-PI-aa, PI+aa, atan(uv.y, uv.x));\n // progress angle\n float p = 1.0 - progress - blur;\n // apply progress to full circle (1 for done part, 0 for part to go)\n col *= smoothstep(p, p + blur, a);\n // multiply by user color\n gl_FragColor = vec4(color * col, col);\n}\n"},function(e,t,n){if(AFRAME.registerComponent("score-texts",{schema:{isLoading:{default:!1}},init:function(){this.textEls=this.el.querySelectorAll("[text]");for(let e=0;e<this.textEls.length;e++)this.textEls[e].setAttribute("animation__fadein",{autoplay:!1,property:"components.text.material.uniforms.opacity.value",delay:250,dur:750,easing:"easeInOutCubic",from:0,to:1})},update:function(e){if(e.isLoading&&!this.data.isLoading){for(let e=0;e<this.textEls.length;e++)this.textEls[e].components.animation__fadein.beginAnimation();this.el.sceneEl.emit("textglownormal",null,!1)}if(!e.isLoading&&this.data.isLoading){for(let e=0;e<this.textEls.length;e++)this.textEls[e].components.text.material.uniforms.opacity.value=0;this.el.sceneEl.emit("textglowoff",null,!1)}}}),window.AFRAME){const t=["score-texts"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){"use strict";n.r(t);n(6);if(AFRAME.registerComponent("search-thumbnail-atlas",{dependencies:["geometry","material"],schema:{dummyUpdater:{type:"string"}},init:function(){const e=this.canvas=document.createElement("canvas");e.setAttribute("id","thumbnailAtlasMap"),e.height=512,e.width=64,e.style.visibility="hidden",this.ctx=e.getContext("2d"),this.clearCanvas(),document.body.appendChild(e);const t=this.alphaCanvas=document.createElement("canvas");t.setAttribute("id","thumbnailAlphaMap"),t.height=512,t.width=64,t.style.visibility="hidden",this.alphaCtx=t.getContext("2d"),document.body.appendChild(t),this.el.components.material.material.alphaMap=new THREE.CanvasTexture(t),this.el.setAttribute("material","src",e),this.images=[],this.lastNumResults=6},update:function(){const e=this.el.sceneEl.systems.state.state.searchResultsPage;for(let t=0;t<e.length;t++){let n=this.images[t]=this.images[t]||document.createElement("img");n.crossOrigin="anonymous",n.src=e[t].coverURL,n.complete?this.draw(n,t):n.onload=()=>{this.draw(n,t)}}e.length!==this.lastNumResults&&this.updateAlphaMap(e.length),this.lastNumResults=e.length},draw:function(e,t){this.ctx.drawImage(e,0,t*(512/384*64),64,512/384*64),this.el.getObject3D("mesh").material.map.needsUpdate=!0},clearCanvas:function(){const e=this.canvas;this.ctx.fillStyle="#111",this.ctx.fillRect(0,0,e.width,e.height)},updateAlphaMap:function(e){const t=this.alphaCanvas,n=this.alphaCtx;n.fillStyle="#FFF",n.fillRect(0,0,t.width,t.height),n.fillStyle="#000",n.fillRect(0,e*(512/384*64),t.width,t.height-e*(512/384*64)),this.el.getObject3D("mesh").material.alphaMap.needsUpdate=!0,this.el.getObject3D("mesh").material.needsUpdate=!0}}),window.AFRAME){const t=["search-thumbnail-atlas"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r=n(158),i=n(29),o=n(159).map(i);if(AFRAME.registerComponent("search",{schema:{difficultyFilter:{default:"All"},genre:{default:""},playlist:{default:""},query:{default:""}},init:function(){this.eventDetail={query:"",results:o,url:"",page:0},this.keyboardEl=document.getElementById("keyboard"),this.popularHits=o,function(e){for(let t=e.length-1;t>0;t--){const n=Math.floor(Math.random()*(t+1));[e[t],e[n]]=[e[n],e[t]]}}(this.popularHits),this.queryObject={hitsPerPage:0,query:""},this.el.sceneEl.addEventListener("searchclear",()=>{this.search("")})},update:function(e){this.popularHits&&(e.query&&!this.data.query&&(this.keyboardEl.components["super-keyboard"].data.value="",this.keyboardEl.components["super-keyboard"].updateTextInput("")),this.debouncedSearch=r(this.search.bind(this),1e3),(this.data.genre||this.data.playlist||this.data.query)&&this.search(this.data.query))},play:function(){this.el.sceneEl.emit("searchresults",this.eventDetail),this.search("")},events:{superkeyboardchange:function(e){e.target===this.el&&this.debouncedSearch(e.detail.value)}},search:function(e){if(!e&&"All"===this.data.difficultyFilter&&!this.data.genre&&!this.data.playlist&&this.popularHits)return this.eventDetail.results=this.popularHits,this.eventDetail.query="",void this.el.sceneEl.emit("searchresults",this.eventDetail);if(this.eventDetail.query=e,this.queryObject.query=e,this.queryObject.hitsPerPage=e?30:150,"favorites"===this.data.playlist)return this.eventDetail.results=JSON.parse(localStorage.getItem("favorites-v2")),void this.el.sceneEl.emit("searchresults",this.eventDetail);let t="https://api.beatsaver.com/search/text/CURRENT_PAGE_INDEX?sortOrder=Rating&automapper=true&q="+encodeURIComponent(e);if(this.data.playlist)t=`https://api.beatsaver.com/playlists/id/${this.data.playlist}/CURRENT_PAGE_INDEX`;else if(this.data.genre){const e={Pop:"pop","R&B":"rb",Rap:"hip-hop-rap",Rock:"rock",Soundtrack:"tv-movie-soundtrack","Video Games":"video-game-soundtrack",Electronic:"electronic","Hip Hop":"hip-hop-rap",House:"house","J-Pop":"j-pop","K-Pop":"k-pop",Meme:"comedy-meme",Alternative:"alternative",Anime:"anime",Comedy:"comedy-meme",Dubstep:"dubstep",Dance:"dance"}[this.data.genre];t="https://api.beatsaver.com/search/text/CURRENT_PAGE_INDEX?sortOrder=Rating&automapper=true&tags="+encodeURIComponent(e)}else if(e&&e.length<3)return;fetch(t.replaceAll("CURRENT_PAGE_INDEX",0)).then(e=>e.json()).then(e=>{var n=(e.docs||e.maps).map(i);this.eventDetail.results=n,this.eventDetail.url=t,this.eventDetail.urlPage=0,this.el.sceneEl.emit("searchresults",this.eventDetail)})}}),AFRAME.registerComponent("search-result-list",{init:function(){new MutationObserver(e=>{for(let t=0;t<e.length;t++)"data-index"===e[t].attributeName&&this.refreshLayout()}).observe(this.el,{attributes:!0,childList:!1,subtree:!0})},events:{click:function(e){this.el.sceneEl.emit("menuchallengeselect",e.target.closest(".searchResult").dataset.id,!1)}},refreshLayout:function(){this.el.emit("layoutrefresh",null,!1)}}),window.AFRAME){const t=["search","search-result-list"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,s="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,l=s||c||Function("return this")(),u=Object.prototype.toString,h=Math.max,d=Math.min,p=function(){return l.Date.now()};function f(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(f(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=f(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var s=i.test(e);return s||o.test(e)?a(e.slice(2),s?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,s,c,l=0,u=!1,g=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=r,o=i;return r=i=void 0,l=t,a=e.apply(o,n)}function b(e){return l=e,s=setTimeout(w,t),u?v(e):a}function _(e){var n=e-c;return void 0===c||n>=t||n<0||g&&e-l>=o}function w(){var e=p();if(_(e))return E(e);s=setTimeout(w,function(e){var n=t-(e-c);return g?d(n,o-(e-l)):n}(e))}function E(e){return s=void 0,y&&r?v(e):(r=i=void 0,a)}function A(){var e=p(),n=_(e);if(r=arguments,i=this,c=e,n){if(void 0===s)return b(c);if(g)return s=setTimeout(w,t),v(c)}return void 0===s&&(s=setTimeout(w,t)),a}return t=m(t)||0,f(n)&&(u=!!n.leading,o=(g="maxWait"in n)?h(m(n.maxWait)||0,t):o,y="trailing"in n?!!n.trailing:y),A.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=c=i=s=void 0},A.flush=function(){return void 0===s?a:E(p())},A}}).call(this,n(1))},function(e,t){e.exports=[{id:"43a25",name:"[Extra Sensory II] Porter Robinson - Lifelike",description:"// MAP 3 OF EXTRA SENSORY II\n[ https://beatsaver.com/playlists/797071 ]\n\nthis is only the beginning...*\n\nVideo:\nhttps://www.youtube.com/watch?v=dlqYqNKcLII",uploader:{id:4340055,name:"nasafrasa",avatar:"https://cdn.beatsaver.com/avatar/16a6108559271b0c0a8d254ceb5ad43f896a0a28.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4340055/playlist"},metadata:{bpm:100.72,duration:96,songName:"Lifelike",songSubName:"",songAuthorName:"Porter Robinson",levelAuthorName:"nasafrasa"},stats:{plays:0,downloads:0,upvotes:3632,downvotes:14,score:.9918,reviews:6,sentiment:"VERY_POSITIVE"},uploaded:"2025-01-26T23:35:01.030128Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"cb5470be988e526c08e1c7e98f2ba9c26ec6fbd0",state:"Published",createdAt:"2025-01-26T05:53:34.451213Z",sageScore:5,diffs:[{njs:16,offset:0,notes:123,bombs:0,obstacles:0,nps:1.564,length:132,characteristic:"Standard",difficulty:"Easy",events:77,chroma:!0,me:!1,ne:!0,cinema:!1,vivify:!0,seconds:78.634,paritySummary:{errors:0,warns:0,resets:0},maxScore:106395,label:"Nurture",environment:"BillieEnvironment"},{njs:16,offset:0,notes:145,bombs:0,obstacles:0,nps:1.844,length:132,characteristic:"Standard",difficulty:"Normal",events:77,chroma:!0,me:!1,ne:!0,cinema:!1,vivify:!0,seconds:78.634,paritySummary:{errors:0,warns:0,resets:0},maxScore:128235,label:"Lifelike",environment:"BillieEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/cb5470be988e526c08e1c7e98f2ba9c26ec6fbd0.zip",coverURL:"https://eu.cdn.beatsaver.com/cb5470be988e526c08e1c7e98f2ba9c26ec6fbd0.jpg",previewURL:"https://eu.cdn.beatsaver.com/cb5470be988e526c08e1c7e98f2ba9c26ec6fbd0.mp3"}],curator:{id:4292041,name:"symphonic",avatar:"https://cdn.beatsaver.com/avatar/2dc906ee5b78c2cb723f0eae964c2c203babf3f4.png",type:"DISCORD",admin:!0,curator:!0,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4292041/playlist"},curatedAt:"2025-01-27T00:42:00.509882Z",createdAt:"2025-01-26T05:53:34.451213Z",updatedAt:"2025-11-07T23:01:19.839738Z",lastPublishedAt:"2025-01-26T23:35:01.030128Z",tags:["accuracy","balanced","ambient","classical-orchestral"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"43a1f",name:"[Extra Sensory II] Simplifi - you",description:"// MAP 4 OF EXTRA SENSORY II\n[ https://beatsaver.com/playlists/797071 ]\n\n====================================================\n\neverything you see in this map was created (from scratch!) by me\n\nlong time coming. this map represents the end of a chapter, and the start of a new one. I've been dreaming of releasing a map with Vivify almost as long as I've been a Beat Saber creative. I was stuck for so long, but I finally had a breakthrough!\n\nand it's yours to keep.\n\n====================================================\n\nproject source: https://github.com/Swifter1243/you_map\ngameplay video: https://youtu.be/2SgLtmqxu-k \nExtra Sensory II website: https://exsii.totalbs.dev/",uploader:{id:4284246,name:"Swifter",hash:"5dcf3af29eccad0006a0b45f",avatar:"https://cdn.beatsaver.com/avatar/9473c86aef59ee6780dce3b2f091ee167e75bbc3.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4284246/playlist"},metadata:{bpm:70,duration:157,songName:"you",songSubName:"",songAuthorName:"Simplifi",levelAuthorName:"Swifter"},stats:{plays:0,downloads:0,upvotes:5380,downvotes:28,score:.9914,reviews:35,sentiment:"VERY_POSITIVE"},uploaded:"2025-01-26T23:35:01.797228Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"d265d40935983502ad6f05ddeb5417f3e37c2290",state:"Published",createdAt:"2025-01-26T04:23:47.346441Z",sageScore:3,diffs:[{njs:8,offset:-.25,notes:160,bombs:0,obstacles:0,nps:1.106,length:168.75,characteristic:"Standard",difficulty:"Normal",events:0,chroma:!0,me:!1,ne:!0,cinema:!1,vivify:!0,seconds:144.643,paritySummary:{errors:0,warns:0,resets:0},maxScore:140835,environment:"BillieEnvironment"},{njs:8,offset:-.25,notes:160,bombs:0,obstacles:0,nps:1.106,length:168.75,characteristic:"Standard",difficulty:"Hard",events:0,chroma:!0,me:!1,ne:!0,cinema:!1,vivify:!0,seconds:144.643,paritySummary:{errors:0,warns:0,resets:0},maxScore:140675,environment:"BillieEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/d265d40935983502ad6f05ddeb5417f3e37c2290.zip",coverURL:"https://eu.cdn.beatsaver.com/d265d40935983502ad6f05ddeb5417f3e37c2290.jpg",previewURL:"https://eu.cdn.beatsaver.com/d265d40935983502ad6f05ddeb5417f3e37c2290.mp3"}],curator:{id:4331555,name:"TheBlackParrot",avatar:"https://cdn.beatsaver.com/avatar/213097af5fb746f71825aad761723951ce4807ab.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/4331555/playlist"},curatedAt:"2025-01-26T23:47:25.274685Z",createdAt:"2025-01-26T04:23:47.346441Z",updatedAt:"2025-02-09T02:00:19.217070Z",lastPublishedAt:"2025-01-26T23:35:01.797228Z",tags:["electronic","accuracy"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"1a0b6",name:"[Electro Swing Pack] The Electric Swing Circus - Empires",description:"Nixie Presents: Electro Swing Pack!\n\n10 electro swing songs with expert and expert+ diffs to make your booty swing!\n\nGet The Pack: \nhttps://bsaber.com/electro-swing-pack/\n\nMap Gameplay:\nhttps://youtu.be/WJy6_2cTPYg\n\nComplete Pack Playthrough:\nhttps://youtu.be/yj9rw4MEh7s\n\n\nHuge thanks in particular to:\nMonstor, Bearly, Noxn, Bullet, Vaser888, Tocxx, Jafdy, Storm Knight and Pixelguy!\n\n\nMore Maps: https://beatsaver.com/profile/4286374\nDiscord Tag: Nixie.Korten#6944\nJoin My Server: https://discord.gg/RjxPpZtH7w\nTwitter: https://twitter.com/Nixie_Korten\nInstagram: https://www.instagram.com/nixie.korten/",uploader:{id:4286374,name:"Nixie.Korten",hash:"6096752e12772e0006e2f7e6",avatar:"https://cdn.beatsaver.com/avatar/bb97db2b49d21f5cbc1a5ba50742fa0e5c86ed3c.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4286374/playlist"},metadata:{bpm:120,duration:173,songName:"Empires",songSubName:"",songAuthorName:"The Electric Swing Circus",levelAuthorName:"Nixie.Korten"},stats:{plays:0,downloads:0,upvotes:5096,downvotes:31,score:.9905,reviews:2},uploaded:"2021-07-08T15:24:55.769Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"cecc89118b3a75ea7d65ceff5949b3ef19fea716",key:"1a0b6",state:"Published",createdAt:"2021-07-08T15:24:55.769Z",sageScore:4,diffs:[{njs:16,offset:-.5,notes:522,bombs:0,obstacles:24,nps:3.173,length:329,characteristic:"Standard",difficulty:"Expert",events:2051,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:164.5,paritySummary:{errors:0,warns:0,resets:0},maxScore:472995,environment:"PanicEnvironment"},{njs:19,offset:.25,notes:823,bombs:0,obstacles:0,nps:5.003,length:329,characteristic:"Standard",difficulty:"ExpertPlus",events:2051,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:164.5,paritySummary:{errors:0,warns:0,resets:0},maxScore:749915,environment:"PanicEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/cecc89118b3a75ea7d65ceff5949b3ef19fea716.zip",coverURL:"https://eu.cdn.beatsaver.com/cecc89118b3a75ea7d65ceff5949b3ef19fea716.jpg",previewURL:"https://eu.cdn.beatsaver.com/cecc89118b3a75ea7d65ceff5949b3ef19fea716.mp3"}],curator:{id:57657,name:"Pixelguy",hash:"5cff0b7698cc5a672c8541a8",avatar:"https://cdn.beatsaver.com/avatar/57657.jpg",type:"SIMPLE",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/57657/playlist"},curatedAt:"2021-07-08T15:24:55.769Z",createdAt:"2021-07-08T15:24:55.769Z",updatedAt:"2024-11-02T11:17:18.878282Z",lastPublishedAt:"2021-07-08T15:24:55.769Z",tags:["swing","balanced","dance-style","electronic"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"1e6ff",name:"{Modchart} acloudyskye - Somewhere Out There",description:"MAP 10. https://beatsaver.com/playlists/8713\n\nWhat can I say about this map.\n\nI feel like this is the culmination of everything thats happened for modcharting this entire year. All of the advancements I've made with environments, mawntee has made with notemods, and reddek has made with walls come together into this piece that I can only describe as the next step. \n\nI really hope everyone enjoys this one. It's one of a kind.\n\nVideo: https://www.youtube.com/watch?v=rphHsDxJbpg",uploader:{id:4284246,name:"Swifter",hash:"5dcf3af29eccad0006a0b45f",avatar:"https://cdn.beatsaver.com/avatar/9473c86aef59ee6780dce3b2f091ee167e75bbc3.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4284246/playlist"},metadata:{bpm:160,duration:323,songName:"Somewhere Out There",songSubName:"",songAuthorName:"acloudyskye",levelAuthorName:"Swifter, Mawntee, Reddek"},stats:{plays:0,downloads:0,upvotes:20023,downvotes:170,score:.9901,reviews:34,sentiment:"VERY_POSITIVE"},uploaded:"2021-11-30T01:27:30.018531Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"448d219117992026eb23c98dc920ce73a912f289",state:"Published",createdAt:"2022-09-26T15:58:45.498795Z",sageScore:1,diffs:[{njs:19,offset:-.5,notes:892,bombs:8,obstacles:3746,nps:2.973,length:800,characteristic:"Standard",difficulty:"Expert",events:38114,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:300,paritySummary:{errors:0,warns:0,resets:0},maxScore:813395,label:"Experience Recommended",environment:"BTSEnvironment"},{njs:19,offset:-.5,notes:1134,bombs:8,obstacles:3530,nps:3.78,length:800,characteristic:"Lawless",difficulty:"ExpertPlus",events:38114,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:300,paritySummary:{errors:719,warns:26,resets:1},maxScore:1036035,label:"Busier Mapping",environment:"BTSEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/448d219117992026eb23c98dc920ce73a912f289.zip",coverURL:"https://eu.cdn.beatsaver.com/448d219117992026eb23c98dc920ce73a912f289.jpg",previewURL:"https://eu.cdn.beatsaver.com/448d219117992026eb23c98dc920ce73a912f289.mp3"}],curator:{id:4284942,name:"blackjack",hash:"5e96ca3a16c96800062400fe",avatar:"https://cdn.beatsaver.com/avatar/dcd6d334252b91670180855821886983a1818f4a.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4284942/playlist"},curatedAt:"2021-11-30T01:27:30.018531Z",createdAt:"2021-11-30T01:03:02.982731Z",updatedAt:"2023-08-26T19:08:38.528705Z",lastPublishedAt:"2022-09-26T16:01:29.467930Z",tags:["pop","balanced"],bookmarked:!1,collaborators:[{id:4233941,name:"reddek",hash:"5dbfb4426dea0b0006bd328d",avatar:"https://cdn.beatsaver.com/avatar/fc462a26fa97d9b2fdadbdf5d7a45ef75026f8e9.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4233941/playlist"},{id:4285959,name:"Mawntee",hash:"5cff0b7698cc5a672c854ca6",avatar:"https://cdn.beatsaver.com/avatar/e373d502d75ed37d9cc60d2aa58b08f8ab6ebc90.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4285959/playlist"}],declaredAi:"None",blRanked:!1,blQualified:!1},{id:"d7fa",name:"Geoxor - Gloom [Wallmap]",description:"REUPLOAD due to last minute mapping error\n\nSpecial thanks to:\nNyri0 - For providing scripts that were crucial to making this map possible, and for helping me along the way.\nLayanmeta - For giving me so much encouragement throughout the final stages and making a brilliant YouTube video on this map.\nBSMG discord - For the continued support throughout the development process\nAll you people/birds - For playing my map :D\n\nBRIAN HAS BECOME SENTIENT. ALL HAIL BRIAN",uploader:{id:18761,name:"minething",hash:"5e9b4ead16c9680006287387",avatar:"https://www.gravatar.com/avatar/f9bed76044f22e33e287d984993c59797049f1315d399c641b1ea7778975c926?d=retro",type:"SIMPLE",admin:!1,curator:!1,seniorCurator:!1,playlistUrl:"https://api.beatsaver.com/users/id/18761/playlist"},metadata:{bpm:93,duration:167,songName:"Gloom",songSubName:"",songAuthorName:"Geoxor",levelAuthorName:"Mine Thing"},stats:{plays:0,downloads:0,upvotes:9917,downvotes:81,score:.9896,reviews:8,sentiment:"VERY_POSITIVE"},uploaded:"2020-08-16T19:13:40.774Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"823b4e880baac024728ae96a7c20e28026c4585d",key:"d7fa",state:"Published",createdAt:"2020-08-16T19:13:40.774Z",sageScore:3,diffs:[{njs:12,offset:6,notes:0,bombs:0,obstacles:15605,nps:0,length:0,characteristic:"Standard",difficulty:"Easy",events:144,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:0,paritySummary:{errors:0,warns:0,resets:0},maxScore:0,label:"Lightshow",environment:"RocketEnvironment"},{njs:12,offset:6,notes:202,bombs:0,obstacles:15605,nps:1.309,length:239.125,characteristic:"Standard",difficulty:"Hard",events:144,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:154.274,paritySummary:{errors:48,warns:6,resets:0},maxScore:178595,environment:"RocketEnvironment"},{njs:12,offset:6,notes:411,bombs:4,obstacles:15605,nps:2.665,length:239,characteristic:"Standard",difficulty:"Expert",events:144,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:154.194,paritySummary:{errors:0,warns:0,resets:1},maxScore:370875,environment:"RocketEnvironment"},{njs:12,offset:3,notes:411,bombs:4,obstacles:12340,nps:2.665,length:239,characteristic:"Standard",difficulty:"ExpertPlus",events:144,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:154.194,paritySummary:{errors:0,warns:0,resets:1},maxScore:370875,label:"Less Lag",environment:"RocketEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/823b4e880baac024728ae96a7c20e28026c4585d.zip",coverURL:"https://eu.cdn.beatsaver.com/823b4e880baac024728ae96a7c20e28026c4585d.jpg",previewURL:"https://eu.cdn.beatsaver.com/823b4e880baac024728ae96a7c20e28026c4585d.mp3"}],curator:{id:4316945,name:"BeastSaber",avatar:"https://cdn.beatsaver.com/avatar/4316945.jpg",type:"SIMPLE",admin:!1,curator:!0,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/4316945/playlist"},curatedAt:"2020-08-16T19:13:40.774Z",createdAt:"2020-08-16T19:13:40.774Z",updatedAt:"2020-08-16T19:13:40.774Z",lastPublishedAt:"2020-08-16T19:13:40.774Z",bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"43a24",name:"[Extra Sensory II] Andrew Prahlow - End Times",description:"// MAP 2 OF EXTRA SENSORY II\n[https://beatsaver.com/playlists/797071]\n\n=================================================\n\nFirst off, I just want to say thank you. Thank you to the entire TotalBS team (Especially Swifter and Aeroluna) for giving me a chance with this project. When I started on this map, I honestly never thought it would turn into anything like this. At first, it was just going to be something simple with the sun, stars, and you. But as I kept learning more about Unity and Vivify, the project just kept growing little by little, until it became what it is now.\n\nI’ve gotta give a special shoutout to Swifter for helping so much with the shaders, and to Aeroluna for making the custom UI possible. Without those two, this map would not have been able to become what it is now.\n\nOver the past year or so working on this, I feel like my goals and what I want in life have completely shifted. I’ve got more drive and motivation now than I’ve ever had before, and I’m so thankful for that.\n\nI'd like to also thank my closest friend, Azushii, for introducing me to Outer Wilds and encouraging me to start this map in the first place. Rest in peace buddy.. <3\n\n=================================================\nCustom Saber Model: [Coming Soon]\nCustom Note Model: [Coming Soon]\nProject Source: [Coming Soon]\nGameplay Video: https://youtu.be/YtETILVC4V4\nExtra Sensory II Website: https://exsii.totalbs.dev/",uploader:{id:70911,name:"Chaimzy",hash:"605ae0535ab13d000609b331",avatar:"https://cdn.beatsaver.com/avatar/70911.jpg",type:"SIMPLE",admin:!1,curator:!1,seniorCurator:!1,playlistUrl:"https://api.beatsaver.com/users/id/70911/playlist"},metadata:{bpm:128,duration:157,songName:"End Times",songSubName:"Outer Wilds",songAuthorName:"Andrew Prahlow",levelAuthorName:"Chaimzy"},stats:{plays:0,downloads:0,upvotes:3127,downvotes:20,score:.9889,reviews:8,sentiment:"VERY_POSITIVE"},uploaded:"2025-01-26T23:35:01.057933Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"b4acc042f6541c06e57a384fa9796a10c45ff558",state:"Published",createdAt:"2025-01-26T05:32:44.984680Z",sageScore:3,diffs:[{njs:16,offset:0,notes:32,bombs:8,obstacles:0,nps:.533,length:128,characteristic:"Standard",difficulty:"Hard",events:0,chroma:!0,me:!1,ne:!0,cinema:!1,vivify:!0,seconds:60,paritySummary:{errors:0,warns:0,resets:0},maxScore:22195,label:"There's more to explore here",environment:"DefaultEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/b4acc042f6541c06e57a384fa9796a10c45ff558.zip",coverURL:"https://eu.cdn.beatsaver.com/b4acc042f6541c06e57a384fa9796a10c45ff558.jpg",previewURL:"https://eu.cdn.beatsaver.com/b4acc042f6541c06e57a384fa9796a10c45ff558.mp3"}],curator:{id:4286182,name:"MadChase",avatar:"https://cdn.beatsaver.com/avatar/99feaf0fe97b6c67dde2ae7ba055fab744b0ac61.png",type:"DISCORD",admin:!1,curator:!0,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4286182/playlist"},curatedAt:"2025-01-27T00:06:25.521273Z",createdAt:"2025-01-26T05:32:44.984680Z",updatedAt:"2025-01-30T01:51:28.961316Z",lastPublishedAt:"2025-01-26T23:35:01.057934Z",tags:["accuracy","ambient","video-game-soundtrack"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"d4a5",name:"[FUTURE FUNK PACK] Shiawase No Monosashi (VANTAGE // Short Ver.)",description:'FUTURE FUNK MAP PACK\n2 songs uploaded everyday through August 10th - 14th!\n\n"Shiawase No Monosashi" is performed by Mariya Takeuchi. This version of the song is a short edit I made from VANTAGE //\'s edit. The original length of the song is 5 minutes long\n\nPlease look forward to the upcoming maps!\n\nDM any feedback on Discord\nETAN#8341',uploader:{id:4235140,name:"ETAN",hash:"5cff0b7798cc5a672c855775",avatar:"https://cdn.beatsaver.com/avatar/652a9b5d335007c8668b43aa727c75e84794dbe1.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4235140/playlist"},metadata:{bpm:128,duration:171,songName:"Shiawase No Monosashi",songSubName:"(VANTAGE // Short Ver.)",songAuthorName:"Mariya Takeuchi",levelAuthorName:"ETAN"},stats:{plays:0,downloads:0,upvotes:9325,downvotes:95,score:.9876,reviews:2},uploaded:"2020-08-12T18:17:44.285Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"d7cb32f23041dec272de3da0ac141dd8f91478ca",key:"d4a5",state:"Published",createdAt:"2020-08-12T18:17:44.285Z",sageScore:7,diffs:[{njs:10,offset:1,notes:168,bombs:16,obstacles:1,nps:1.029,length:348.25,characteristic:"Standard",difficulty:"Easy",events:7775,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:163.242,paritySummary:{errors:0,warns:0,resets:0},maxScore:147315,environment:"BigMirrorEnvironment"},{njs:11,offset:1,notes:255,bombs:16,obstacles:1,nps:1.562,length:348.25,characteristic:"Standard",difficulty:"Normal",events:7775,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:163.242,paritySummary:{errors:1,warns:1,resets:0},maxScore:227355,environment:"BigMirrorEnvironment"},{njs:12,offset:1,notes:358,bombs:16,obstacles:1,nps:2.193,length:348.25,characteristic:"Standard",difficulty:"Hard",events:7775,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:163.242,paritySummary:{errors:0,warns:0,resets:0},maxScore:322115,environment:"BigMirrorEnvironment"},{njs:15,offset:0,notes:557,bombs:16,obstacles:1,nps:3.335,length:356.25,characteristic:"Standard",difficulty:"Expert",events:7775,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:166.992,paritySummary:{errors:0,warns:0,resets:0},maxScore:505195,environment:"BigMirrorEnvironment"},{njs:19,offset:-.5,notes:778,bombs:16,obstacles:1,nps:4.659,length:356.25,characteristic:"Standard",difficulty:"ExpertPlus",events:7775,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:166.992,paritySummary:{errors:0,warns:0,resets:0},maxScore:708515,environment:"BigMirrorEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/d7cb32f23041dec272de3da0ac141dd8f91478ca.zip",coverURL:"https://eu.cdn.beatsaver.com/d7cb32f23041dec272de3da0ac141dd8f91478ca.jpg",previewURL:"https://eu.cdn.beatsaver.com/d7cb32f23041dec272de3da0ac141dd8f91478ca.mp3"}],curator:{id:4316945,name:"BeastSaber",avatar:"https://cdn.beatsaver.com/avatar/4316945.jpg",type:"SIMPLE",admin:!1,curator:!0,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/4316945/playlist"},curatedAt:"2020-08-12T18:17:44.285Z",createdAt:"2020-08-12T18:17:44.285Z",updatedAt:"2020-08-12T18:17:44.285Z",lastPublishedAt:"2020-08-12T18:17:44.285Z",tags:["j-pop","house"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"4968d",name:"{Vivify} Jaron - 743⁺Aether*✧ ˳ ⁎ ¹¹¹} ⁺ . ˳",description:"**Originally, this map was going to be my Extra Sensory II map.**\n\nHowever, given the insane density of this song, it demanded rapidly changing visuals that kept up with how dynamic it felt to listen to. I did not have the technical or artistic skill to pull off this song. I tried and failed, for 3 years. Finally, after executing Extra Sensory II this year, I realized it was time to tackle this behemoth of a project. This project took over ~350 hours, and 1000 repository commits. The majority of it was put together over the last 3 months.\n\nI really think that I executed on this vision to a tee, landing every single visual cue that I imagined ever since I heard the song for the first time in 2022. I hope you can feel the electricity of this experience <3\n\n✧\n\n**Special Thanks:**\n- **Frautcres** - Doing extensive technical performance investigations in order to make the map run without a hitch, as well as assisting with technical difficulties\n- **Chaimzy, Astra, HAMCORE, Mawntee, TheBlackParrot, TinyPawb, Klondike, RidgeVR, UGEcko** - Doing loads of playtesting and giving feedback to make the map feel as polished as it does\n- **SKYZA.** - Beautiful ribbon & saber textures\n- **Jaron** - Creating this incredible song, and supporting me over the years as I tried to make visuals that shaped up\n\nvideo: https://youtu.be/qZ1prxep0Wc\nproject source: https://github.com/Swifter1243/aether_map",uploader:{id:4284246,name:"Swifter",hash:"5dcf3af29eccad0006a0b45f",avatar:"https://cdn.beatsaver.com/avatar/9473c86aef59ee6780dce3b2f091ee167e75bbc3.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4284246/playlist"},metadata:{bpm:145,duration:274,songName:"743+Aether*✧ . * 111} + , .",songSubName:"",songAuthorName:"Jaron",levelAuthorName:"Swifter"},stats:{plays:0,downloads:0,upvotes:2252,downvotes:15,score:.9876,reviews:34,sentiment:"VERY_POSITIVE"},uploaded:"2025-08-14T16:00:00.354832Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"cc66335f2b8bf50fe49591dd925860b2e596018e",state:"Published",createdAt:"2025-08-14T16:13:20.156249Z",sageScore:3,diffs:[{njs:12,offset:-.5,notes:444,bombs:0,obstacles:0,nps:1.698,length:632,characteristic:"Standard",difficulty:"Expert",events:0,chroma:!0,me:!1,ne:!0,cinema:!1,vivify:!0,seconds:261.517,paritySummary:{errors:0,warns:0,resets:0},maxScore:401235,label:"✧",environment:"BillieEnvironment"},{njs:16,offset:-.5,notes:703,bombs:0,obstacles:0,nps:2.688,length:632,characteristic:"Lawless",difficulty:"ExpertPlus",events:0,chroma:!0,me:!1,ne:!0,cinema:!1,vivify:!0,seconds:261.517,paritySummary:{errors:0,warns:0,resets:0},maxScore:639515,label:"\\___*",environment:"BillieEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/cc66335f2b8bf50fe49591dd925860b2e596018e.zip",coverURL:"https://eu.cdn.beatsaver.com/cc66335f2b8bf50fe49591dd925860b2e596018e.jpg",previewURL:"https://eu.cdn.beatsaver.com/cc66335f2b8bf50fe49591dd925860b2e596018e.mp3"}],curator:{id:4285538,name:"Darkrealm7",hash:"5ffa2803f2cdd000075e24ed",avatar:"https://cdn.beatsaver.com/avatar/7b66a32ba61dcfb938aa0d2207911eb08d28a06f.png",type:"DISCORD",admin:!1,curator:!0,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4285538/playlist"},curatedAt:"2025-08-14T21:11:11.210516Z",createdAt:"2025-08-14T04:02:49.366190Z",updatedAt:"2025-08-20T16:41:30.561039Z",lastPublishedAt:"2025-08-20T16:41:30.561039Z",bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"1362d",name:"Ghost Choir - Louie Zong (modchart)",description:"This is a relaxing modchart and a technical proof of concept. If you haven't played my modchart Dondante yet, please check it out: https://beatsaver.com/beatmap/123b5\r\n\r\nThe map requires the mods Noodle Extensions and Chroma. If Noodle Extensions is not available yet on ModAssistant, you can get the latest release at https://github.com/Aeroluna/NoodleExtensions/releases/tag/v1.3.5\r\n\r\nTips for a better experience:\r\n- Disable static lights; there are no lights anyway\r\n- Hide the HUD\r\n- Turn the SFX volume down (0 or low value like 0.2)\r\n- Enable bloom post-processing\r\n\r\nPreview: https://youtu.be/XC7RY9C_EHs\r\n\r\nI adapted this from Louie Zong's original animation: https://youtu.be/kXF3VYYa5TI\r\n\r\n",uploader:{id:4288814,name:"nyri0",hash:"5e792df416c9680006086a78",avatar:"https://cdn.beatsaver.com/avatar/233323d456510756fbbc0140c1a0698caf8b096c.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,playlistUrl:"https://api.beatsaver.com/users/id/4288814/playlist"},metadata:{bpm:67,duration:90,songName:"Ghost Choir",songSubName:"",songAuthorName:"Louie Zong",levelAuthorName:"nyri0"},stats:{plays:0,downloads:0,upvotes:4478,downvotes:42,score:.987,reviews:6,sentiment:"VERY_POSITIVE"},uploaded:"2021-01-30T12:31:29.825Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"1d373506c0b2b82867411f18696a1ad53d4ea01d",key:"1362d",state:"Published",createdAt:"2021-01-30T12:31:29.825Z",sageScore:2,diffs:[{njs:14,offset:0,notes:138,bombs:0,obstacles:1460,nps:1.684,length:91.5,characteristic:"Standard",difficulty:"Hard",events:5,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:81.94,paritySummary:{errors:4,warns:3,resets:0},maxScore:119715,label:"Oooo",environment:"BigMirrorEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/1d373506c0b2b82867411f18696a1ad53d4ea01d.zip",coverURL:"https://eu.cdn.beatsaver.com/1d373506c0b2b82867411f18696a1ad53d4ea01d.jpg",previewURL:"https://eu.cdn.beatsaver.com/1d373506c0b2b82867411f18696a1ad53d4ea01d.mp3"}],createdAt:"2021-01-30T12:31:29.825Z",updatedAt:"2021-01-30T12:31:29.825Z",lastPublishedAt:"2021-01-30T12:31:29.825Z",bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"198f3",name:"Spider Dance - Toby Fox (Undertale modchart)",description:"There are countless Undertale maps on Beat Saber, but what if you could actually experience a real boss fight? It's now possible thanks to Noodle Extensions, and I'm proud to present to you the first Undertale modchart: Spider Dance, where you will confront Muffet.\r\n\r\nTips for a better experience:\r\n- Don't use static lights; there shouldn't be any lights\r\n- Hide the HUD in player settings\r\n- Enable \"bloom post-processing\"\r\n- Enable \"screen distortion effects\"\r\n\r\nInstallation instructions:\r\n- You will need Noodle Extensions and Chroma and their dependencies. All are now available on ModAssistant.\r\n- If you read this in a future where the update broke the mods and they haven't been approved on ModAssistant yet, install the basic mods from ModAssistant and get the latest releases of Noodle Extensions, Heck, and Chroma from Aeroluna's GitHub: https://github.com/Aeroluna\r\n\r\nVideo: https://youtu.be/fy8KmUor6fI\r\n\r\nI started this a while ago before Ghost Choir and then abandoned the project. But I finally decided to finish the work, so I hope you'll enjoy it :)\r\nThanks to Reaxt and Cyansnow, who testplayed and made detailed suggestions that helped me improve the quality of this map. I really appreciate it.\r\n\r\nMy social media links (please follow/subscribe): https://linktr.ee/nyri0",uploader:{id:4288814,name:"nyri0",hash:"5e792df416c9680006086a78",avatar:"https://cdn.beatsaver.com/avatar/233323d456510756fbbc0140c1a0698caf8b096c.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,playlistUrl:"https://api.beatsaver.com/users/id/4288814/playlist"},metadata:{bpm:115,duration:114,songName:"Spider Dance",songSubName:"",songAuthorName:"Toby Fox",levelAuthorName:"nyri0"},stats:{plays:0,downloads:0,upvotes:10995,downvotes:123,score:.9868,reviews:6,sentiment:"VERY_POSITIVE"},uploaded:"2021-06-25T17:47:40.296Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"09246637fa63ac55aa518718fd1eb4b876960480",key:"198f3",state:"Published",createdAt:"2021-06-25T17:47:40.296Z",sageScore:2,diffs:[{njs:16,offset:0,notes:434,bombs:88,obstacles:1153,nps:4.377,length:190.063,characteristic:"Standard",difficulty:"ExpertPlus",events:5,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:99.163,paritySummary:{errors:13,warns:13,resets:0},maxScore:392035,label:"9999G",environment:"BigMirrorEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/09246637fa63ac55aa518718fd1eb4b876960480.zip",coverURL:"https://eu.cdn.beatsaver.com/09246637fa63ac55aa518718fd1eb4b876960480.jpg",previewURL:"https://eu.cdn.beatsaver.com/09246637fa63ac55aa518718fd1eb4b876960480.mp3"}],curator:{id:73032,name:"Bytrius",hash:"5de442271dc9e8000696cd15",avatar:"https://cdn.beatsaver.com/avatar/62ed9906317427e9b14435ca144c7189b83a711a.png",type:"DISCORD",admin:!0,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/73032/playlist"},curatedAt:"2021-06-25T17:47:40.296Z",createdAt:"2021-06-25T17:47:40.296Z",updatedAt:"2021-06-25T17:47:40.296Z",lastPublishedAt:"2021-06-25T17:47:40.296Z",tags:["electronic","video-game-soundtrack","balanced"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"23f6b",name:"acloudyskye & N33T - Nothing Else (Modchart)",description:"9 months ago I created my first chroma map. At this time I didn't think I could make a map that you are about to play\nIn these 9 months, I learned a lot about walls, notes, environment enhancement, etc... but mostly how to properly polish a map.\nI wanted to make something big, something even bigger than SOT(as in scale swifter silly u) and here I am today publishing this map.\nThis map contains 7 different unique environments that connect together with seamless transitions.\nThis map is a big step in the journey of modhcarts just like SOT.\nI hope more people will see this modhcart as a place they can start and learn Noodle Extensions, You can also check the script of the modhcart on my Github. https://github.com/TzurS11/NoodleScript/tree/main/Examples/Scripts\n\nLastly, I wanna thank all the people that helped. even if you are not on this list I appreciate What you've done a lot!\n@GojiCrafter, @tall_chilis_boi, @Swifter, @Mawntee, Stick, kiwii.\n\nShowcase: https://youtu.be/qkSe0gOctEU\n\nbtw HAHA get fucked swifter! I got more environments than in SOT",uploader:{id:4284455,name:"TzurS11",hash:"6040a8135ab13d0006093512",avatar:"https://cdn.beatsaver.com/avatar/87d26d1223ba8840e9dca8d433165f717e7584e1.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,playlistUrl:"https://api.beatsaver.com/users/id/4284455/playlist"},metadata:{bpm:125,duration:291,songName:"Nothing Else",songSubName:"",songAuthorName:"acloudyskye & N33T",levelAuthorName:"TzurS11"},stats:{plays:0,downloads:0,upvotes:2949,downvotes:25,score:.9867,reviews:3},uploaded:"2022-04-10T19:30:00.565807Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"e45b69a9428505e93f73f1bdc43909d43fc844e3",state:"Published",createdAt:"2022-04-10T20:32:24.193634Z",sageScore:3,diffs:[{njs:16,offset:0,notes:919,bombs:0,obstacles:0,nps:3.298,length:580.5,characteristic:"Standard",difficulty:"ExpertPlus",events:18391,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:278.64,paritySummary:{errors:25,warns:13,resets:0},maxScore:838235,label:"You can hide away the fears you face\n\nRead Warnings!",environment:"BTSEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/e45b69a9428505e93f73f1bdc43909d43fc844e3.zip",coverURL:"https://eu.cdn.beatsaver.com/e45b69a9428505e93f73f1bdc43909d43fc844e3.jpg",previewURL:"https://eu.cdn.beatsaver.com/e45b69a9428505e93f73f1bdc43909d43fc844e3.mp3"}],curator:{id:4284947,name:"Phoenix",hash:"5fa08b5281e1d70006f1b322",avatar:"https://cdn.beatsaver.com/avatar/4284947.jpg",type:"SIMPLE",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4284947/playlist"},curatedAt:"2022-04-10T20:55:22.272218Z",createdAt:"2022-04-05T14:25:21.240039Z",updatedAt:"2022-08-25T11:32:19.554653Z",lastPublishedAt:"2022-04-10T20:32:58.830331Z",tags:["balanced","electronic","dance"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"32693",name:"Fall Out Boy - The Phoenix",description:"Might be one of my most accessible mapsets yet as a custom-lit full spread of difficulties paired with both a lawless expert+ and one saber difficulties! Made this one for a friend of mine who's a big FoB fan. Enjoy!\n\nFeedback via reviews down below is always appreciated!\n\nPreview: https://youtu.be/2LFQLJd0pOQ\n\nSocials:\nhttps://twitter.com/bytrius\nhttps://www.youtube.com/c/bytrius\nhttps://bsaber.com/members/bytrius/\nhttps://www.twitch.tv/bytrius",uploader:{id:73032,name:"Bytrius",hash:"5de442271dc9e8000696cd15",avatar:"https://cdn.beatsaver.com/avatar/62ed9906317427e9b14435ca144c7189b83a711a.png",type:"DISCORD",admin:!0,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/73032/playlist"},metadata:{bpm:138,duration:246,songName:"The Phoenix",songSubName:"",songAuthorName:"Fall Out Boy",levelAuthorName:"Bytrius"},stats:{plays:0,downloads:0,upvotes:5122,downvotes:52,score:.9865,reviews:6,sentiment:"VERY_POSITIVE"},uploaded:"2023-05-31T23:01:59.709120Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"bf2c367d29b133b66dc27f6f8e20467d0ec3301f",state:"Published",createdAt:"2023-05-31T22:51:42.410637Z",sageScore:5,diffs:[{njs:10,offset:-.95,notes:494,bombs:0,obstacles:44,nps:2.055,length:553,characteristic:"Standard",difficulty:"Easy",events:4607,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:240.435,paritySummary:{errors:0,warns:0,resets:0},maxScore:447235,blStars:2.56,environment:"NiceEnvironment"},{njs:12,offset:.3,notes:545,bombs:0,obstacles:38,nps:2.267,length:553,characteristic:"Standard",difficulty:"Normal",events:4607,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:240.435,paritySummary:{errors:0,warns:0,resets:0},maxScore:494155,blStars:3.04,environment:"NiceEnvironment"},{njs:14,offset:-.2,notes:767,bombs:0,obstacles:6,nps:3.19,length:553,characteristic:"Standard",difficulty:"Hard",events:4607,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:240.435,paritySummary:{errors:0,warns:0,resets:0},maxScore:700075,blStars:4.07,environment:"NiceEnvironment"},{njs:15,offset:-.475,notes:851,bombs:0,obstacles:9,nps:3.539,length:553,characteristic:"Standard",difficulty:"Expert",events:4607,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:240.435,paritySummary:{errors:0,warns:0,resets:0},maxScore:779035,blStars:4.86,environment:"NiceEnvironment"},{njs:17,offset:-.75,notes:1384,bombs:0,obstacles:4,nps:5.756,length:553,characteristic:"Standard",difficulty:"ExpertPlus",events:4607,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:240.435,paritySummary:{errors:0,warns:0,resets:0},maxScore:1272275,blStars:6.51,environment:"NiceEnvironment"},{njs:16,offset:-.65,notes:816,bombs:0,obstacles:29,nps:3.394,length:553,characteristic:"OneSaber",difficulty:"ExpertPlus",events:4607,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:240.435,paritySummary:{errors:0,warns:0,resets:0},maxScore:743475,blStars:8.35,environment:"NiceEnvironment"},{njs:17,offset:-.75,notes:1388,bombs:0,obstacles:4,nps:5.773,length:553,characteristic:"Lawless",difficulty:"ExpertPlus",events:4607,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:240.435,paritySummary:{errors:0,warns:0,resets:0},maxScore:1275955,label:"Double Downs",environment:"NiceEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/bf2c367d29b133b66dc27f6f8e20467d0ec3301f.zip",coverURL:"https://eu.cdn.beatsaver.com/bf2c367d29b133b66dc27f6f8e20467d0ec3301f.jpg",previewURL:"https://eu.cdn.beatsaver.com/bf2c367d29b133b66dc27f6f8e20467d0ec3301f.mp3"}],curator:{id:4284947,name:"Phoenix",hash:"5fa08b5281e1d70006f1b322",avatar:"https://cdn.beatsaver.com/avatar/4284947.jpg",type:"SIMPLE",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4284947/playlist"},curatedAt:"2023-06-01T02:16:21.699148Z",createdAt:"2023-05-16T06:12:18.475582Z",updatedAt:"2024-08-27T09:34:28.073772Z",lastPublishedAt:"2023-05-31T23:01:59.709120Z",tags:["dance-style","pop","punk"],bookmarked:!1,declaredAi:"None",blRanked:!0,blQualified:!1},{id:"1dcf4",name:"DYES IWASAKI - Bad Hatter ft. Lily Mizusaki",description:'Part of my second custom map pack!\n\nGameplay preview:\nhttps://www.youtube.com/watch?v=ZE5enFMVsv8\n\nGet the pack here:\nhttps://bsaber.com/tokyo-neo-swing/\n\nThis time around I took the extra time and made full spreads and chroma lightshows for each of the 6 songs of the album "Tokyo Neo Swing" by DYES IWASAKI & Lily Mizusaki.\n\nHuge thanks to the lovely playtesters MaybeeMae, Cocci, Monstor, Vaser888, and Kansas!\n\nAlso here is my playthrough of the entire pack on Expert Plus:\nhttps://www.youtube.com/watch?v=lgXR4sBl_kk\n\n\nMore Maps: https://beatsaver.com/profile/4286374\nDiscord Tag: Nixie.Korten#6944\nJoin My Server: https://discord.gg/RjxPpZtH7w\nTwitter: https://twitter.com/Nixie_Korten\nInstagram: https://www.instagram.com/nixie.korten/',uploader:{id:4286374,name:"Nixie.Korten",hash:"6096752e12772e0006e2f7e6",avatar:"https://cdn.beatsaver.com/avatar/bb97db2b49d21f5cbc1a5ba50742fa0e5c86ed3c.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4286374/playlist"},metadata:{bpm:122,duration:176,songName:"Bad Hatter",songSubName:"(ft. Lily Mizusaki)",songAuthorName:"DYES IWASAKI",levelAuthorName:"Nixie.Korten"},stats:{plays:0,downloads:0,upvotes:4470,downvotes:44,score:.9865,reviews:3},uploaded:"2021-11-11T13:06:30.332180Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"ebcf0c8780551bfe0feb96fbc255accad548798b",state:"Published",createdAt:"2021-11-14T11:39:03.473167Z",sageScore:6,diffs:[{njs:12,offset:1,notes:212,bombs:0,obstacles:0,nps:1.249,length:345.167,characteristic:"Standard",difficulty:"Easy",events:4454,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:169.754,paritySummary:{errors:46,warns:12,resets:0},maxScore:187795,environment:"FitBeatEnvironment"},{njs:12,offset:.5,notes:320,bombs:0,obstacles:0,nps:1.885,length:345.167,characteristic:"Standard",difficulty:"Normal",events:4454,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:169.754,paritySummary:{errors:29,warns:14,resets:0},maxScore:287155,environment:"FitBeatEnvironment"},{njs:14,offset:0,notes:491,bombs:0,obstacles:2,nps:2.89,length:345.5,characteristic:"Standard",difficulty:"Hard",events:4454,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:169.918,paritySummary:{errors:4,warns:0,resets:0},maxScore:444475,environment:"FitBeatEnvironment"},{njs:16,offset:-.5,notes:697,bombs:0,obstacles:0,nps:4.102,length:345.5,characteristic:"Standard",difficulty:"Expert",events:4454,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:169.918,paritySummary:{errors:0,warns:9,resets:0},maxScore:633995,environment:"FitBeatEnvironment"},{njs:19,offset:.25,notes:924,bombs:0,obstacles:0,nps:5.438,length:345.5,characteristic:"Standard",difficulty:"ExpertPlus",events:4454,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:169.918,paritySummary:{errors:0,warns:0,resets:0},maxScore:842835,environment:"FitBeatEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/ebcf0c8780551bfe0feb96fbc255accad548798b.zip",coverURL:"https://eu.cdn.beatsaver.com/ebcf0c8780551bfe0feb96fbc255accad548798b.jpg",previewURL:"https://eu.cdn.beatsaver.com/ebcf0c8780551bfe0feb96fbc255accad548798b.mp3"}],curator:{id:4299228,name:"tan",avatar:"https://cdn.beatsaver.com/avatar/19d0c285757c0eea70e922961581953cfd96769b.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/4299228/playlist"},curatedAt:"2021-11-11T13:06:30.332180Z",createdAt:"2021-11-10T18:01:16.390803Z",updatedAt:"2024-11-02T11:19:03.182227Z",lastPublishedAt:"2021-11-14T11:39:08.754762Z",tags:["swing","dance-style","balanced","electronic"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"b7aa",name:"Powerwolf - Venom of Venus",description:"Back to my more regular style, Powerwolf is a power-metal band that perform around the themes of werewolves and religion, a strange but interesting mixture.\r\n\r\nEx+ has a no-colours mode for those who wish to play without the custom block colours, but unfortunately I can't fit such an option for all difficulties.\r\n\r\nNormal 1.85 NPS\r\nHard 3.15 NPS\r\nExpert 4.43 NPS\r\nExpert+ 5.11 NPS\r\n\r\nThere is no easy difficulty, as that I needed the slot for the no-colour mode.",uploader:{id:4285369,name:"Cyrix",hash:"5eb6eb9a7abb000006c85add",avatar:"https://cdn.beatsaver.com/avatar/4213c7b05b9778149ae4536dd10842c6ed307ec5.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4285369/playlist"},metadata:{bpm:164,duration:211,songName:"Venom of Venus",songSubName:"",songAuthorName:"Powerwolf",levelAuthorName:"Cyrix"},stats:{plays:0,downloads:0,upvotes:8e3,downvotes:91,score:.9862,reviews:14,sentiment:"VERY_POSITIVE"},uploaded:"2020-06-29T18:24:10.081Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"f88b43c770dcd85a4ba18368853fbf062d41a09c",key:"b7aa",state:"Published",createdAt:"2020-06-29T18:24:10.081Z",sageScore:7,diffs:[{njs:12,offset:.5,notes:392,bombs:0,obstacles:63,nps:1.948,length:549.938,characteristic:"Standard",difficulty:"Easy",events:4188,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:201.197,paritySummary:{errors:44,warns:15,resets:0},maxScore:353395,label:"Normal",environment:"PanicEnvironment"},{njs:13,offset:1,notes:666,bombs:8,obstacles:36,nps:3.31,length:549.938,characteristic:"Standard",difficulty:"Normal",events:4188,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:201.197,paritySummary:{errors:1,warns:0,resets:1},maxScore:605475,label:"Hard",environment:"PanicEnvironment"},{njs:17,offset:0,notes:934,bombs:9,obstacles:7,nps:4.642,length:549.938,characteristic:"Standard",difficulty:"Hard",events:4188,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:201.197,paritySummary:{errors:0,warns:0,resets:2},maxScore:852035,label:"Ex",environment:"PanicEnvironment"},{njs:20,offset:-.25,notes:1079,bombs:4,obstacles:7,nps:5.353,length:551,characteristic:"Standard",difficulty:"Expert",events:4192,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:201.585,paritySummary:{errors:1,warns:0,resets:2},maxScore:985435,label:"Ex+ No Colour",environment:"PanicEnvironment"},{njs:20,offset:-.25,notes:1079,bombs:4,obstacles:7,nps:5.353,length:551,characteristic:"Standard",difficulty:"ExpertPlus",events:4192,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:201.585,paritySummary:{errors:1,warns:0,resets:2},maxScore:985435,label:"Ex+",environment:"PanicEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/f88b43c770dcd85a4ba18368853fbf062d41a09c.zip",coverURL:"https://eu.cdn.beatsaver.com/f88b43c770dcd85a4ba18368853fbf062d41a09c.jpg",previewURL:"https://eu.cdn.beatsaver.com/f88b43c770dcd85a4ba18368853fbf062d41a09c.mp3"}],curator:{id:4316945,name:"BeastSaber",avatar:"https://cdn.beatsaver.com/avatar/4316945.jpg",type:"SIMPLE",admin:!1,curator:!0,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/4316945/playlist"},curatedAt:"2020-06-29T18:24:10.081Z",createdAt:"2020-06-29T18:24:10.081Z",updatedAt:"2020-06-29T18:24:10.081Z",lastPublishedAt:"2020-06-29T18:24:10.081Z",tags:["metal","balanced"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"210e3",name:"[Modchart] Sarah Cothran - As The World Caves In",description:"This started out as just a simple environment animation test, and then quickly snowballed out into one of my favourite maps I've made so far!\n\nAlso big ups to Fatalution for doing the lighting on this!\nThis is our first collab together, and the first time I've collaborated on a map with someone who shared the same ideas/thought process as myself. \nThis definitely won't be our last collab :)\n\nCheck out their profile and lightshow preview here:\nhttps://beatsaver.com/profile/84945\nhttps://youtu.be/1Fh5jL_UJBc\n\n\nWARNING:\nThis map may cause mild motion sickness! \nIf you feel sick at any point, remember that you can pause and it will stop everything!\n\n(If you have frequent issues with motion sickness in VR, I recommend having a fan on, or keeping smaller carpet with a different texture in your playspace)",uploader:{id:4285959,name:"Mawntee",hash:"5cff0b7698cc5a672c854ca6",avatar:"https://cdn.beatsaver.com/avatar/e373d502d75ed37d9cc60d2aa58b08f8ab6ebc90.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4285959/playlist"},metadata:{bpm:124,duration:164,songName:"As The World Caves In",songSubName:"",songAuthorName:"Sarah Cothran",levelAuthorName:"Mawntee & Fatalution"},stats:{plays:0,downloads:0,upvotes:8562,downvotes:100,score:.986,reviews:22,sentiment:"VERY_POSITIVE"},uploaded:"2022-02-02T20:18:54.976546Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"d4d847465bff16bc936e8281b5e3c703a4ca1c93",state:"Published",createdAt:"2022-02-02T20:27:55.445283Z",sageScore:4,diffs:[{njs:18,offset:1.961111,notes:259,bombs:20,obstacles:0,nps:1.63,length:328.466,characteristic:"Standard",difficulty:"ExpertPlus",events:31028,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:158.935,paritySummary:{errors:403,warns:36,resets:11},maxScore:231035,label:"Our Final Night Alive",environment:"TimbalandEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/d4d847465bff16bc936e8281b5e3c703a4ca1c93.zip",coverURL:"https://eu.cdn.beatsaver.com/d4d847465bff16bc936e8281b5e3c703a4ca1c93.jpg",previewURL:"https://eu.cdn.beatsaver.com/d4d847465bff16bc936e8281b5e3c703a4ca1c93.mp3"}],curator:{id:4234800,name:"AllieeCute",avatar:"https://cdn.beatsaver.com/avatar/f3788635ba87f3e1144e26501fe02c26b29aaccc.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/4234800/playlist"},curatedAt:"2022-02-02T20:18:54.976546Z",createdAt:"2022-02-02T20:07:53.311141Z",updatedAt:"2023-10-16T18:16:00.863418Z",lastPublishedAt:"2023-06-06T14:03:19.315272Z",tags:["accuracy","dance-style"],bookmarked:!1,collaborators:[{id:84945,name:"fatalution",hash:"5cff0b7398cc5a672c84f30a",avatar:"https://cdn.beatsaver.com/avatar/7b7e7792dd5a8b250b5205c3a823d7d4006182f5.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/84945/playlist"}],declaredAi:"None",blRanked:!1,blQualified:!1},{id:"352d8",name:"Belle - Lend Me Your Voice [Noodle Extension, Chrom+] (Remastered!!!)",description:'If you are seasick in VR, do not play the "ALL EFFECTS" and "NO rotation (360 °)". For you, difficulty - "NO effects"\n\nIf there are performance problems disable "Mirror" in the graphics settings\n\nSong - https://music.youtube.com/watch?v=nSbhUCM5Z6s',uploader:{id:4284370,name:"hickeychan",hash:"6001ba1539ce5b000682a59f",avatar:"https://cdn.beatsaver.com/avatar/ecb540d442d3dbcd21881c32b050977d282a7438.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4284370/playlist"},metadata:{bpm:121,duration:304,songName:"Lend Me Your Voice",songSubName:"",songAuthorName:"Kaho Nakamura",levelAuthorName:"HickeyChan"},stats:{plays:0,downloads:0,upvotes:1156,downvotes:6,score:.9859,reviews:3},uploaded:"2023-08-24T10:14:50.865197Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"be0ab6e5f1b5581a9a053f4a4c144c785696d349",state:"Published",createdAt:"2023-08-24T10:12:42.966966Z",sageScore:1,diffs:[{njs:16,offset:-.7,notes:687,bombs:0,obstacles:2859,nps:2.34,length:592.155,characteristic:"Standard",difficulty:"Hard",events:25577,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:293.631,paritySummary:{errors:0,warns:0,resets:0},maxScore:624795,label:"NO effects",environment:"BTSEnvironment"},{njs:16,offset:-.7,notes:687,bombs:0,obstacles:2859,nps:2.34,length:592.155,characteristic:"Standard",difficulty:"Expert",events:25577,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:293.631,paritySummary:{errors:0,warns:0,resets:0},maxScore:624795,label:"NO rotation (360 °)",environment:"BTSEnvironment"},{njs:16,offset:-.7,notes:687,bombs:0,obstacles:2859,nps:2.34,length:592.155,characteristic:"Standard",difficulty:"ExpertPlus",events:25577,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:293.631,paritySummary:{errors:0,warns:0,resets:0},maxScore:624795,label:"ALL EFFECTS",environment:"BTSEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/be0ab6e5f1b5581a9a053f4a4c144c785696d349.zip",coverURL:"https://eu.cdn.beatsaver.com/be0ab6e5f1b5581a9a053f4a4c144c785696d349.jpg",previewURL:"https://eu.cdn.beatsaver.com/be0ab6e5f1b5581a9a053f4a4c144c785696d349.mp3"}],curator:{id:4292041,name:"symphonic",avatar:"https://cdn.beatsaver.com/avatar/2dc906ee5b78c2cb723f0eae964c2c203babf3f4.png",type:"DISCORD",admin:!0,curator:!0,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4292041/playlist"},curatedAt:"2023-08-25T06:09:54.756879Z",createdAt:"2023-08-24T10:12:42.966966Z",updatedAt:"2023-09-04T05:38:48.731043Z",lastPublishedAt:"2023-08-24T10:14:50.865197Z",tags:["accuracy","balanced","anime","classical-orchestral"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"1a0b8",name:"[Electro Swing Pack] Wolfgang Lohr & The Swinghoppers - Party Like It's 1920",description:"Nixie Presents: Electro Swing Pack!\n\n10 electro swing songs with expert and expert+ diffs to make your booty swing!\n\nGet The Pack: \nhttps://bsaber.com/electro-swing-pack/\n\nMap Gameplay:\nhttps://youtu.be/ye22W_xrXnk\n\nComplete Pack Playthrough:\nhttps://youtu.be/yj9rw4MEh7s\n\n\nHuge thanks in particular to:\nMonstor, Bearly, Noxn, Bullet, Vaser888, Tocxx, Jafdy, Storm Knight and Pixelguy!\n\n\nMore Maps: https://beatsaver.com/profile/4286374\nDiscord Tag: Nixie.Korten#6944\nJoin My Server: https://discord.gg/RjxPpZtH7w\nTwitter: https://twitter.com/Nixie_Korten\nInstagram: https://www.instagram.com/nixie.korten/",uploader:{id:4286374,name:"Nixie.Korten",hash:"6096752e12772e0006e2f7e6",avatar:"https://cdn.beatsaver.com/avatar/bb97db2b49d21f5cbc1a5ba50742fa0e5c86ed3c.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4286374/playlist"},metadata:{bpm:120,duration:187,songName:"Party Like It's 1920",songSubName:"",songAuthorName:"The Swinghoppers & Wolfgang Lohr",levelAuthorName:"Nixie.Korten"},stats:{plays:0,downloads:0,upvotes:4194,downvotes:45,score:.9855,reviews:1},uploaded:"2021-07-08T15:25:28.451Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"973bab980b568e41b0a17a772e61377b01ef85ec",key:"1a0b8",state:"Published",createdAt:"2021-07-08T15:25:28.451Z",sageScore:4,diffs:[{njs:16,offset:-.5,notes:556,bombs:0,obstacles:0,nps:3.063,length:363,characteristic:"Standard",difficulty:"Expert",events:2057,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:181.5,paritySummary:{errors:0,warns:0,resets:0},maxScore:504275,environment:"PanicEnvironment"},{njs:19,offset:.25,notes:850,bombs:0,obstacles:0,nps:4.683,length:363,characteristic:"Standard",difficulty:"ExpertPlus",events:2057,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:181.5,paritySummary:{errors:0,warns:0,resets:0},maxScore:774755,environment:"PanicEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/973bab980b568e41b0a17a772e61377b01ef85ec.zip",coverURL:"https://eu.cdn.beatsaver.com/973bab980b568e41b0a17a772e61377b01ef85ec.jpg",previewURL:"https://eu.cdn.beatsaver.com/973bab980b568e41b0a17a772e61377b01ef85ec.mp3"}],curator:{id:73032,name:"Bytrius",hash:"5de442271dc9e8000696cd15",avatar:"https://cdn.beatsaver.com/avatar/62ed9906317427e9b14435ca144c7189b83a711a.png",type:"DISCORD",admin:!0,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/73032/playlist"},curatedAt:"2021-07-08T15:25:28.451Z",createdAt:"2021-07-08T15:25:28.451Z",updatedAt:"2024-11-02T11:17:34.643709Z",lastPublishedAt:"2021-07-08T15:25:28.451Z",tags:["swing","balanced","dance-style","electronic"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"1181f",name:"Royal & the Serpent - Overwhelmed",description:"Feeling that finals crunch? Worried about the pandemic? General anxiety with the news, and just feeling overwhelmed? Don't forget to take a step back and take a breath. Maybe by dancing along to this song that perfectly captures all of those feelings! Complete with overwhelming Chroma 2.0 lights! And now the extra details:\n\nBPM: 87\nNPS: Ez - 1.71; N - 2.09; H - 2.75; Ex - 3.19; Ex+ - 4.11\nNotes: Ez - 277; N - 338; H - 444; Ex - 516; Ex+ - 664\nBombs: Ez - 0; N - 0; H - 4; Ex - 4; Ex+ - 4\nWalls: Ez - 136; N - 134; H - 144; Ex - 109; Ex+ - 109\n\nSpecial thanks to qwasyx, Smay, and Cyrix for playtesting!",uploader:{id:4285188,name:"fruhead",hash:"5cff0b7598cc5a672c852683",avatar:"https://cdn.beatsaver.com/avatar/bcfbb8e5ac8665ae28d37b76a402daf0b88a68d0.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4285188/playlist"},metadata:{bpm:87,duration:161,songName:"Overwhelmed",songSubName:"",songAuthorName:"Royal & the Serpent",levelAuthorName:"fruhead"},stats:{plays:0,downloads:0,upvotes:7135,downvotes:85,score:.9854,reviews:4},uploaded:"2020-11-29T23:09:47.309Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"b748894960a346f1568b9f4876643f1358cfa897",key:"1181f",state:"Published",createdAt:"2020-11-29T23:09:47.309Z",sageScore:6,diffs:[{njs:10,offset:0,notes:277,bombs:0,obstacles:136,nps:1.793,length:224,characteristic:"Standard",difficulty:"Easy",events:7200,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:154.483,paritySummary:{errors:43,warns:9,resets:0},maxScore:247595,environment:"PanicEnvironment"},{njs:12,offset:-.3,notes:338,bombs:0,obstacles:134,nps:2.188,length:224,characteristic:"Standard",difficulty:"Normal",events:7200,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:154.483,paritySummary:{errors:22,warns:11,resets:0},maxScore:303715,environment:"PanicEnvironment"},{njs:14,offset:.4,notes:444,bombs:4,obstacles:144,nps:2.874,length:224,characteristic:"Standard",difficulty:"Hard",events:7200,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:154.483,paritySummary:{errors:14,warns:4,resets:4},maxScore:401235,environment:"PanicEnvironment"},{njs:16,offset:.25,notes:516,bombs:4,obstacles:109,nps:3.34,length:224,characteristic:"Standard",difficulty:"Expert",events:7200,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:154.483,paritySummary:{errors:0,warns:0,resets:2},maxScore:467475,environment:"PanicEnvironment"},{njs:18,offset:.1,notes:664,bombs:4,obstacles:109,nps:4.298,length:224,characteristic:"Standard",difficulty:"ExpertPlus",events:7200,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:154.483,paritySummary:{errors:0,warns:0,resets:2},maxScore:603635,environment:"PanicEnvironment"},{njs:16,offset:0,notes:0,bombs:0,obstacles:0,nps:0,length:0,characteristic:"Lightshow",difficulty:"Expert",events:7200,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:0,paritySummary:{errors:0,warns:0,resets:0},maxScore:0,label:"Overwhelmed",environment:"PanicEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/b748894960a346f1568b9f4876643f1358cfa897.zip",coverURL:"https://eu.cdn.beatsaver.com/b748894960a346f1568b9f4876643f1358cfa897.jpg",previewURL:"https://eu.cdn.beatsaver.com/b748894960a346f1568b9f4876643f1358cfa897.mp3"}],curator:{id:76372,name:"brightknight",hash:"5f30421b8a13d900061fe595",avatar:"https://cdn.beatsaver.com/avatar/236b93ff0df8c0f0305e52b6d3d01fa3e588b7ec.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/76372/playlist"},curatedAt:"2020-11-29T23:09:47.309Z",createdAt:"2020-11-29T23:09:47.309Z",updatedAt:"2020-11-29T23:09:47.309Z",lastPublishedAt:"2020-11-29T23:09:47.309Z",tags:["balanced"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"4980",name:"(Old Version) Paradise - Coldplay",description:"\"Paradise\" is a song by the British rock band Coldplay. The song was released on 12 September 2011. I kinda like this song for relaxing on long car rides and I don't know how it will feel as a beat saber map but I'ma try mapping it anyways. So here it is :)\n\n2022 EDIT: Download the new map here: https://beatsaver.com/maps/28102",uploader:{id:58338,name:"Joetastic",hash:"5cff0b7498cc5a672c85050e",avatar:"https://cdn.beatsaver.com/avatar/91bb7b0510cea647179bc95e032f8a25608b09f1.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/58338/playlist"},metadata:{bpm:70,duration:278,songName:"Paradise",songSubName:"",songAuthorName:"Coldplay",levelAuthorName:"Joetastic"},stats:{plays:0,downloads:0,upvotes:6216,downvotes:74,score:.9852,reviews:1},uploaded:"2019-04-30T05:45:51Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"b14639af36673a43fe32bc7563619deff438d438",key:"4980",state:"Published",createdAt:"2019-04-30T05:45:51Z",sageScore:6,diffs:[{njs:13,offset:0,notes:1023,bombs:0,obstacles:35,nps:3.816,length:312.75,characteristic:"Standard",difficulty:"Expert",events:4651,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:268.071,paritySummary:{errors:28,warns:29,resets:0},maxScore:933915,environment:"TriangleEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/b14639af36673a43fe32bc7563619deff438d438.zip",coverURL:"https://eu.cdn.beatsaver.com/b14639af36673a43fe32bc7563619deff438d438.jpg",previewURL:"https://eu.cdn.beatsaver.com/b14639af36673a43fe32bc7563619deff438d438.mp3"}],curator:{id:4316945,name:"BeastSaber",avatar:"https://cdn.beatsaver.com/avatar/4316945.jpg",type:"SIMPLE",admin:!1,curator:!0,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/4316945/playlist"},curatedAt:"2019-04-30T05:45:51Z",createdAt:"2019-04-30T05:45:51Z",updatedAt:"2022-07-22T08:36:01.092595Z",lastPublishedAt:"2019-04-30T05:45:51Z",tags:["alternative","indie"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"bdc7",name:"That's Life - Frank Sinatra",description:"Here is an honest-to-goodness human-mapped version of Frank Sinatra's 1966 hit, That's Life. This song is way too good to just have a crappy beat sage map.\n\nNormal and Hard Standard levels, and Expert Standard, 90, and 360 levels. Note that the expert levels are all essentially the same, just with varying degrees of wobbles.\n\nThanks to Maybeemae for the playtests!\n\nhttps://youtu.be/QXjj2-fgK8U",uploader:{id:78593,name:"techbutterfly",hash:"5cff0b7798cc5a672c8566f7",avatar:"https://cdn.beatsaver.com/avatar/99c0065fcfac5bfcf11adc69a58a8d3251bd748e.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/78593/playlist"},metadata:{bpm:77,duration:187,songName:"That's Life",songSubName:"",songAuthorName:"Frank Sinatra",levelAuthorName:"TechButterfly"},stats:{plays:0,downloads:0,upvotes:3713,downvotes:40,score:.9851,reviews:8,sentiment:"VERY_POSITIVE"},uploaded:"2020-07-11T22:35:42.033Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"7cca8c1afecd782cfd74f158c312201b780043d8",key:"bdc7",state:"Published",createdAt:"2020-07-11T22:35:42.033Z",sageScore:4,diffs:[{njs:10,offset:-.3,notes:321,bombs:0,obstacles:6,nps:1.768,length:233,characteristic:"Standard",difficulty:"Normal",events:1086,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:181.558,paritySummary:{errors:30,warns:41,resets:0},maxScore:288075,environment:"NiceEnvironment"},{njs:12,offset:.3,notes:418,bombs:0,obstacles:8,nps:2.302,length:233,characteristic:"Standard",difficulty:"Hard",events:1086,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:181.558,paritySummary:{errors:24,warns:38,resets:0},maxScore:377315,environment:"NiceEnvironment"},{njs:13,offset:.1,notes:492,bombs:0,obstacles:8,nps:2.71,length:233,characteristic:"Standard",difficulty:"Expert",events:1086,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:181.558,paritySummary:{errors:24,warns:26,resets:0},maxScore:445395,environment:"NiceEnvironment"},{njs:13,offset:.3,notes:489,bombs:0,obstacles:8,nps:2.693,length:233,characteristic:"90Degree",difficulty:"Expert",events:1192,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:181.558,paritySummary:{errors:25,warns:27,resets:0},maxScore:442635,label:"Expert 90",environment:"GlassDesertEnvironment"},{njs:13,offset:.3,notes:489,bombs:0,obstacles:8,nps:2.693,length:233,characteristic:"360Degree",difficulty:"Expert",events:1166,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:181.558,paritySummary:{errors:25,warns:26,resets:0},maxScore:442635,label:"Expert360",environment:"GlassDesertEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/7cca8c1afecd782cfd74f158c312201b780043d8.zip",coverURL:"https://eu.cdn.beatsaver.com/7cca8c1afecd782cfd74f158c312201b780043d8.jpg",previewURL:"https://eu.cdn.beatsaver.com/7cca8c1afecd782cfd74f158c312201b780043d8.mp3"}],curator:{id:32269,name:"maybeemae",hash:"5e1123516d774b0006a953ec",avatar:"https://cdn.beatsaver.com/avatar/d2119e1ff402b2cd380caf8b074d3f7c037f0ec2.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/32269/playlist"},curatedAt:"2020-07-11T22:35:42.033Z",createdAt:"2020-07-11T22:35:42.033Z",updatedAt:"2020-07-11T22:35:42.033Z",lastPublishedAt:"2020-07-11T22:35:42.033Z",tags:["pop","jazz","dance-style"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"3bbb0",name:"[Modchart] Leslie Wai - Paradigm",description:"MAP IS NOT WORKING ON QUEST 1.37+\nMAP IS NOT WORKING ON QUEST 1.37+\nMAP IS NOT WORKING ON QUEST 1.37+\n\nNOTE: If your sabers are in the wrong position after the intro try disabling any room offset/rotation\nNOTE 2: The map is broken on some versions including 1.34 and quest, I am gonna work on report all the issues\nNOTE 3: The map should be playable now on Quest native (just a few visual bugs)\n\nMy biggest project so far!\nenjoy it\n\nMap preview: https://youtu.be/gokZx0QjqZQ\n\nReupload: Thanks for the 429 people that played the map so far! i am reuploading to fix a few bugs:\n- Fix saber positions being wrong for some people\n- Disable left handed option\n- Disable Intro Skip\n\nReupload 2: Thanks for the another 170 plays I hope this is the final reupload:\n- Fix light id errors\n- Fix cinema suggestion not needed\n- Trying another fix for sabers wrong position\n\nReupload 3: And I hope this is the last one, thanks for the 124 new plays!\n- Fix player position bug on quest\n- Fix notes position bug on quest\n- Fix gimmik part on quest\n- Added suggested colors for notes\n- Changed NJS and JD\n- Fix sabers coming from the wrong direction in the intro",uploader:{id:4284535,name:"Elecast",hash:"6069279f5ab13d000609e874",avatar:"https://cdn.beatsaver.com/avatar/4dd111a1ec473c3559cfc73caaac650be56b65a1.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4284535/playlist"},metadata:{bpm:130,duration:441,songName:"Paradigm",songSubName:"",songAuthorName:"Leslie Wai",levelAuthorName:"Elecast"},stats:{plays:0,downloads:0,upvotes:2734,downvotes:27,score:.9851,reviews:35,sentiment:"VERY_POSITIVE"},uploaded:"2024-04-13T20:59:13.608905Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"a504aafe70cf723f46503568f65813ef616d030f",state:"Published",createdAt:"2024-04-24T23:51:45.788382Z",sageScore:3,diffs:[{njs:17,offset:-.75,notes:1051,bombs:360,obstacles:249,nps:3.038,length:749.5,characteristic:"Standard",difficulty:"ExpertPlus",events:12016,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:345.923,paritySummary:{errors:0,warns:0,resets:0},maxScore:959675,label:"You can't escape",environment:"BillieEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/a504aafe70cf723f46503568f65813ef616d030f.zip",coverURL:"https://eu.cdn.beatsaver.com/a504aafe70cf723f46503568f65813ef616d030f.jpg",previewURL:"https://eu.cdn.beatsaver.com/a504aafe70cf723f46503568f65813ef616d030f.mp3"}],curator:{id:4284445,name:"Emilia",hash:"5cff0b7898cc5a672c856ed3",avatar:"https://cdn.beatsaver.com/avatar/4284445.jpg",type:"SIMPLE",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4284445/playlist"},curatedAt:"2024-04-13T23:47:05.160104Z",createdAt:"2024-04-12T23:23:24.101391Z",updatedAt:"2024-08-18T18:18:25.185313Z",lastPublishedAt:"2024-04-24T23:51:50.910171Z",tags:["balanced","electronic"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"1a0ba",name:"[Electro Swing Pack] Wolfgang Lohr & Maskarade - Hit The Road Jack",description:"Nixie Presents: Electro Swing Pack!\n\n10 electro swing songs with expert and expert+ diffs to make your booty swing!\n\nGet The Pack: \nhttps://bsaber.com/electro-swing-pack/\n\nMap Gameplay:\nhttps://youtu.be/0ObNR9n_dDs\n\nComplete Pack Playthrough:\nhttps://youtu.be/yj9rw4MEh7s\n\n\nHuge thanks in particular to:\nMonstor, Bearly, Noxn, Bullet, Vaser888, Tocxx, Jafdy, Storm Knight and Pixelguy!\n\n\nMore Maps: https://beatsaver.com/profile/4286374\nDiscord Tag: Nixie.Korten#6944\nJoin My Server: https://discord.gg/RjxPpZtH7w\nTwitter: https://twitter.com/Nixie_Korten\nInstagram: https://www.instagram.com/nixie.korten/",uploader:{id:4286374,name:"Nixie.Korten",hash:"6096752e12772e0006e2f7e6",avatar:"https://cdn.beatsaver.com/avatar/bb97db2b49d21f5cbc1a5ba50742fa0e5c86ed3c.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4286374/playlist"},metadata:{bpm:124,duration:159,songName:"Hit The Road Jack",songSubName:"",songAuthorName:"Wolfgang Lohr & Maskarade",levelAuthorName:"Nixie.Korten"},stats:{plays:0,downloads:0,upvotes:3787,downvotes:42,score:.9849},uploaded:"2021-07-08T15:26:18.072Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"75f10751d58f6f1ab0bc36e94039a144256adccb",key:"1a0ba",state:"Published",createdAt:"2021-07-08T15:26:18.072Z",sageScore:4,diffs:[{njs:16,offset:-.25,notes:475,bombs:0,obstacles:0,nps:3.089,length:317.75,characteristic:"Standard",difficulty:"Expert",events:1846,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:153.75,paritySummary:{errors:0,warns:0,resets:0},maxScore:429755,environment:"PanicEnvironment"},{njs:19,offset:.25,notes:750,bombs:0,obstacles:0,nps:4.878,length:317.75,characteristic:"Standard",difficulty:"ExpertPlus",events:1846,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:153.75,paritySummary:{errors:0,warns:0,resets:0},maxScore:682755,environment:"PanicEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/75f10751d58f6f1ab0bc36e94039a144256adccb.zip",coverURL:"https://eu.cdn.beatsaver.com/75f10751d58f6f1ab0bc36e94039a144256adccb.jpg",previewURL:"https://eu.cdn.beatsaver.com/75f10751d58f6f1ab0bc36e94039a144256adccb.mp3"}],curator:{id:73032,name:"Bytrius",hash:"5de442271dc9e8000696cd15",avatar:"https://cdn.beatsaver.com/avatar/62ed9906317427e9b14435ca144c7189b83a711a.png",type:"DISCORD",admin:!0,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/73032/playlist"},curatedAt:"2021-07-08T15:26:18.072Z",createdAt:"2021-07-08T15:26:18.072Z",updatedAt:"2024-11-02T11:17:50.904586Z",lastPublishedAt:"2021-07-08T15:26:18.072Z",tags:["swing","balanced","dance-style","electronic"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"1a0b7",name:"[Electro Swing Pack] Jamie Berry - Lost In The Rhythm (ft. Octavia Rose)",description:"Nixie Presents: Electro Swing Pack!\n\n10 electro swing songs with expert and expert+ diffs to make your booty swing!\n\nGet The Pack: \nhttps://bsaber.com/electro-swing-pack/\n\nMap Gameplay:\nhttps://youtu.be/4O8l7rq4eHI\n\nComplete Pack Playthrough:\nhttps://youtu.be/yj9rw4MEh7s\n\n\nHuge thanks in particular to:\nMonstor, Bearly, Noxn, Bullet, Vaser888, Tocxx, Jafdy, Storm Knight and Pixelguy!\n\n\nMore Maps: https://beatsaver.com/profile/4286374\nDiscord Tag: Nixie.Korten#6944\nJoin My Server: https://discord.gg/RjxPpZtH7w\nTwitter: https://twitter.com/Nixie_Korten\nInstagram: https://www.instagram.com/nixie.korten/",uploader:{id:4286374,name:"Nixie.Korten",hash:"6096752e12772e0006e2f7e6",avatar:"https://cdn.beatsaver.com/avatar/bb97db2b49d21f5cbc1a5ba50742fa0e5c86ed3c.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4286374/playlist"},metadata:{bpm:121,duration:187,songName:"Lost In The Rhythm",songSubName:"(ft. Octavia Rose)",songAuthorName:"Jamie Berry",levelAuthorName:"Nixie.Korten"},stats:{plays:0,downloads:0,upvotes:3307,downvotes:36,score:.9847,reviews:1},uploaded:"2021-07-08T15:24:57.679Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"6d006d47880a45a134844f3787f3c184881d4673",key:"1a0b7",state:"Published",createdAt:"2021-07-08T15:24:57.679Z",sageScore:5,diffs:[{njs:16,offset:-.25,notes:591,bombs:0,obstacles:8,nps:3.274,length:364,characteristic:"Standard",difficulty:"Expert",events:3271,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:180.496,paritySummary:{errors:0,warns:0,resets:0},maxScore:536475,environment:"PanicEnvironment"},{njs:19,offset:.25,notes:821,bombs:0,obstacles:8,nps:4.549,length:364,characteristic:"Standard",difficulty:"ExpertPlus",events:3271,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:180.496,paritySummary:{errors:0,warns:0,resets:0},maxScore:748075,environment:"PanicEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/6d006d47880a45a134844f3787f3c184881d4673.zip",coverURL:"https://eu.cdn.beatsaver.com/6d006d47880a45a134844f3787f3c184881d4673.jpg",previewURL:"https://eu.cdn.beatsaver.com/6d006d47880a45a134844f3787f3c184881d4673.mp3"}],curator:{id:73032,name:"Bytrius",hash:"5de442271dc9e8000696cd15",avatar:"https://cdn.beatsaver.com/avatar/62ed9906317427e9b14435ca144c7189b83a711a.png",type:"DISCORD",admin:!0,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/73032/playlist"},curatedAt:"2021-07-08T15:24:57.679Z",createdAt:"2021-07-08T15:24:57.679Z",updatedAt:"2024-11-02T11:17:26.961219Z",lastPublishedAt:"2021-07-08T15:24:57.679Z",tags:["swing","balanced","dance-style","electronic"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"77e9",name:"Jingo Jungle [Saga of Tanya the Evil Opening] - AmaLee",description:'AmaLee\'s English cover of "Jingo Jungle", the opening from Saga of Tanya the Evil (Youjo Senki). Original song by MYTH & ROID.',uploader:{id:58338,name:"Joetastic",hash:"5cff0b7498cc5a672c85050e",avatar:"https://cdn.beatsaver.com/avatar/91bb7b0510cea647179bc95e032f8a25608b09f1.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/58338/playlist"},metadata:{bpm:130,duration:226,songName:"Jingo Jungle",songSubName:"",songAuthorName:"AmaLee",levelAuthorName:"Joetastic"},stats:{plays:0,downloads:0,upvotes:4125,downvotes:48,score:.9846,reviews:1},uploaded:"2019-12-21T02:44:34.295Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"f90a2e4f8ee7b1f33543cddccb8baea660253d4a",key:"77e9",state:"Published",createdAt:"2019-12-21T02:44:34.295Z",sageScore:5,diffs:[{njs:12,offset:0,notes:581,bombs:104,obstacles:28,nps:2.647,length:475.5,characteristic:"Standard",difficulty:"Hard",events:5987,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:219.462,paritySummary:{errors:35,warns:15,resets:10},maxScore:527275,environment:"DefaultEnvironment"},{njs:15,offset:0,notes:950,bombs:78,obstacles:14,nps:4.329,length:475.5,characteristic:"Standard",difficulty:"Expert",events:5987,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:219.462,paritySummary:{errors:42,warns:48,resets:8},maxScore:866755,environment:"DefaultEnvironment"},{njs:17,offset:0,notes:1184,bombs:105,obstacles:17,nps:5.395,length:475.5,characteristic:"Standard",difficulty:"ExpertPlus",events:5987,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:219.462,paritySummary:{errors:32,warns:43,resets:16},maxScore:1082035,environment:"DefaultEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/f90a2e4f8ee7b1f33543cddccb8baea660253d4a.zip",coverURL:"https://eu.cdn.beatsaver.com/f90a2e4f8ee7b1f33543cddccb8baea660253d4a.jpg",previewURL:"https://eu.cdn.beatsaver.com/f90a2e4f8ee7b1f33543cddccb8baea660253d4a.mp3"}],createdAt:"2019-12-21T02:44:34.295Z",updatedAt:"2019-12-21T02:44:34.295Z",lastPublishedAt:"2019-12-21T02:44:34.295Z",tags:["pop","anime"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"a438",name:"Wait - M83 (wall map)",description:"I wanted to do something special for this great song, and also see the potential of Noodle Extensions. A few tips for a better experience:\r\n- disable the mirror effect in the game settings\r\n- turn the SFX volume down in the player settings\r\n- hide the HUD in the player settings\r\n\r\nVideo: https://youtu.be/oe6ThhijPy0\r\n\r\nThe map has a lot of walls, so you might not be able to run it on the lower-end hardware. I've included a version with less walls in case it helps.",uploader:{id:4288814,name:"nyri0",hash:"5e792df416c9680006086a78",avatar:"https://cdn.beatsaver.com/avatar/233323d456510756fbbc0140c1a0698caf8b096c.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,playlistUrl:"https://api.beatsaver.com/users/id/4288814/playlist"},metadata:{bpm:148,duration:336,songName:"Wait",songSubName:"",songAuthorName:"M83",levelAuthorName:"nyri0"},stats:{plays:0,downloads:0,upvotes:4116,downvotes:48,score:.9845,reviews:9,sentiment:"VERY_POSITIVE"},uploaded:"2020-05-08T23:53:02.030Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"0d8921ef06a889cbd9db13afcc43f09a1619b173",key:"a438",state:"Published",createdAt:"2020-05-08T23:53:02.030Z",sageScore:6,diffs:[{njs:8,offset:6,notes:735,bombs:0,obstacles:6684,nps:2.225,length:815,characteristic:"Standard",difficulty:"Easy",events:5,chroma:!1,me:!1,ne:!0,cinema:!1,seconds:330.405,paritySummary:{errors:93,warns:27,resets:0},maxScore:668955,label:"Hard (less lag)",environment:"BigMirrorEnvironment"},{njs:8,offset:6,notes:735,bombs:0,obstacles:10499,nps:2.225,length:815,characteristic:"Standard",difficulty:"Hard",events:5,chroma:!1,me:!1,ne:!0,cinema:!1,seconds:330.405,paritySummary:{errors:93,warns:27,resets:0},maxScore:668955,label:"Hard (original)",environment:"BigMirrorEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/0d8921ef06a889cbd9db13afcc43f09a1619b173.zip",coverURL:"https://eu.cdn.beatsaver.com/0d8921ef06a889cbd9db13afcc43f09a1619b173.jpg",previewURL:"https://eu.cdn.beatsaver.com/0d8921ef06a889cbd9db13afcc43f09a1619b173.mp3"}],curator:{id:4316945,name:"BeastSaber",avatar:"https://cdn.beatsaver.com/avatar/4316945.jpg",type:"SIMPLE",admin:!1,curator:!0,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/4316945/playlist"},curatedAt:"2020-05-08T23:53:02.030Z",createdAt:"2020-05-08T23:53:02.030Z",updatedAt:"2020-05-08T23:53:02.030Z",lastPublishedAt:"2020-05-08T23:53:02.030Z",tags:["rock","indie","techno"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"12ad1",name:"Minnesota - Colors (ft. Jackie Rain) | Chroma RGB",description:"Chroma 2.0 HIGHLY RECOMMENDED!\n\nHad this map sitting in my project folder for some months and finally got to finish it! \nIt features a Chroma RGB lightshow AND Rainbow notes, for the full COLOR experience :)\n\nPreview: https://www.youtube.com/watch?v=8Omzd7IdJt0",uploader:{id:4284201,name:"nitronik.exe",hash:"5cff0b7798cc5a672c855d84",avatar:"https://cdn.beatsaver.com/avatar/ab054640a94777ed7e92d91a505a85f8c5047be5.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4284201/playlist"},metadata:{bpm:140,duration:202,songName:"Colors",songSubName:"(ft. Jackie Rain)",songAuthorName:"Minnesota",levelAuthorName:"nitronik.exe"},stats:{plays:0,downloads:0,upvotes:4295,downvotes:51,score:.9844,reviews:7,sentiment:"VERY_POSITIVE"},uploaded:"2021-01-13T15:55:44.846Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"03fcb98091e50600d9d777251d765c53384c2735",key:"12ad1",state:"Published",createdAt:"2021-01-13T15:55:44.846Z",sageScore:4,diffs:[{njs:13,offset:.5,notes:395,bombs:0,obstacles:221,nps:2.057,length:448,characteristic:"Standard",difficulty:"Hard",events:16569,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:192,paritySummary:{errors:0,warns:0,resets:0},maxScore:356155,environment:"BigMirrorEnvironment"},{njs:16,offset:0,notes:601,bombs:0,obstacles:113,nps:3.13,length:448,characteristic:"Standard",difficulty:"Expert",events:16569,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:192,paritySummary:{errors:0,warns:0,resets:0},maxScore:545675,environment:"BigMirrorEnvironment"},{njs:19,offset:-.5,notes:911,bombs:0,obstacles:120,nps:4.745,length:448,characteristic:"Standard",difficulty:"ExpertPlus",events:16569,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:192,paritySummary:{errors:0,warns:0,resets:0},maxScore:830875,label:"Colors",environment:"BigMirrorEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/03fcb98091e50600d9d777251d765c53384c2735.zip",coverURL:"https://eu.cdn.beatsaver.com/03fcb98091e50600d9d777251d765c53384c2735.jpg",previewURL:"https://eu.cdn.beatsaver.com/03fcb98091e50600d9d777251d765c53384c2735.mp3"}],curator:{id:1096,name:"pyrowarfare",hash:"5e99c7df3f476a0006596cdf",avatar:"https://www.gravatar.com/avatar/28fcd25e8adfa72a17daa766767daf781bee89776333a3ed7a4cc84146e6a3e8?d=retro",type:"SIMPLE",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/1096/playlist"},curatedAt:"2021-01-13T15:55:44.846Z",createdAt:"2021-01-13T15:55:44.846Z",updatedAt:"2021-01-13T15:55:44.846Z",lastPublishedAt:"2021-01-13T15:55:44.846Z",tags:["dubstep","balanced"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"4a2b3",name:"[Vivify] Turret Orchestra (Cara Mia Addio) - Portal 2",description:"Portal •⩊•\n\nWork done:\nMadChase - Vivify and Standard Mapping\nRateGyro - OneSaber Mapping\nXentha - 3d Modeling \n\nAll Lawless: No Vivify difficulties \n\nThis took FAR too long to make too..... hope you enjoy this product of my sufferings as much as I do :)\n\nGo check out @rategyro, they did the mapping for all the Onesaber diffs and HUGE thanks to @Xentha for making a majority of the env used in this map, this would not have been possible without them. \n\nCredits: https://docs.google.com/document/d/1gR8x4iIk_n2i4ScYRPGEyD8OfZNsrDftmy6Z9cC5L_E/edit?usp=sharing",uploader:{id:4286182,name:"MadChase",avatar:"https://cdn.beatsaver.com/avatar/99feaf0fe97b6c67dde2ae7ba055fab744b0ac61.png",type:"DISCORD",admin:!1,curator:!0,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4286182/playlist"},metadata:{bpm:204,duration:120,songName:"Turret Orchestra",songSubName:"(Cara Mia Addio)",songAuthorName:"Portal 2",levelAuthorName:"MadChase, RateGyro, Xentha\r"},stats:{plays:0,downloads:0,upvotes:758,downvotes:3,score:.9844},uploaded:"2025-09-05T19:09:19.619055Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"3a2a0fead6eb8a8ab325aa54efdfb84bd4220375",state:"Published",createdAt:"2025-09-06T02:29:05.366Z",sageScore:4,diffs:[{njs:12,offset:0,notes:107,bombs:0,obstacles:0,nps:1.304,length:279,characteristic:"Standard",difficulty:"Hard",events:0,chroma:!0,me:!1,ne:!0,cinema:!1,vivify:!0,seconds:82.059,paritySummary:{errors:0,warns:0,resets:0},maxScore:91195,label:"Basic Bloqs",environment:"GagaEnvironment"},{njs:15,offset:-1.625,notes:149,bombs:0,obstacles:0,nps:1.816,length:279,characteristic:"Standard",difficulty:"Expert",events:0,chroma:!0,me:!1,ne:!0,cinema:!1,vivify:!0,seconds:82.059,paritySummary:{errors:0,warns:0,resets:0},maxScore:129835,label:"Bloqs",environment:"GagaEnvironment"},{njs:15,offset:-1.625,notes:714,bombs:0,obstacles:0,nps:8.701,length:279,characteristic:"Standard",difficulty:"ExpertPlus",events:0,chroma:!0,me:!1,ne:!0,cinema:!1,vivify:!0,seconds:82.059,paritySummary:{errors:0,warns:0,resets:0},maxScore:649635,label:"Poodles",environment:"GagaEnvironment"},{njs:15,offset:-1.625,notes:131,bombs:0,obstacles:0,nps:1.591,length:279.937,characteristic:"OneSaber",difficulty:"Expert",events:0,chroma:!0,me:!1,ne:!0,cinema:!1,vivify:!0,seconds:82.334,paritySummary:{errors:0,warns:0,resets:0},maxScore:113275,label:"Bloqs",environment:"GagaEnvironment"},{njs:15,offset:-1.625,notes:612,bombs:0,obstacles:0,nps:7.433,length:279.937,characteristic:"OneSaber",difficulty:"ExpertPlus",events:0,chroma:!0,me:!1,ne:!0,cinema:!1,vivify:!0,seconds:82.334,paritySummary:{errors:0,warns:0,resets:0},maxScore:555795,label:"Poodles",environment:"GagaEnvironment"},{njs:15,offset:-1.625,notes:0,bombs:0,obstacles:0,nps:0,length:0,characteristic:"Lightshow",difficulty:"ExpertPlus",events:0,chroma:!0,me:!1,ne:!0,cinema:!1,vivify:!0,seconds:0,paritySummary:{errors:0,warns:0,resets:0},maxScore:0,label:"Just Viv",environment:"GagaEnvironment"},{njs:12,offset:0,notes:111,bombs:0,obstacles:473,nps:1.343,length:281,characteristic:"Lawless",difficulty:"Easy",events:7,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:82.647,paritySummary:{errors:0,warns:0,resets:0},maxScore:94875,label:"Basic Bloqs",environment:"GagaEnvironment"},{njs:15,offset:-1.625,notes:130,bombs:0,obstacles:473,nps:1.584,length:279,characteristic:"Lawless",difficulty:"Normal",events:7,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:82.059,paritySummary:{errors:0,warns:0,resets:0},maxScore:112355,label:"One Saber Bloqs",environment:"GagaEnvironment"},{njs:15,offset:-1.625,notes:153,bombs:0,obstacles:473,nps:1.851,length:281,characteristic:"Lawless",difficulty:"Hard",events:7,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:82.647,paritySummary:{errors:0,warns:0,resets:0},maxScore:133515,label:"Bloqs",environment:"GagaEnvironment"},{njs:15,offset:-1.625,notes:611,bombs:0,obstacles:473,nps:7.446,length:279,characteristic:"Lawless",difficulty:"Expert",events:7,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:82.059,paritySummary:{errors:0,warns:0,resets:0},maxScore:554875,label:"One Saber Poodles",environment:"GagaEnvironment"},{njs:15,offset:-1.625,notes:734,bombs:0,obstacles:473,nps:8.859,length:281.688,characteristic:"Lawless",difficulty:"ExpertPlus",events:7,chroma:!1,me:!1,ne:!0,cinema:!1,seconds:82.849,paritySummary:{errors:0,warns:0,resets:0},maxScore:668035,label:"Poodles",environment:"GagaEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/3a2a0fead6eb8a8ab325aa54efdfb84bd4220375.zip",coverURL:"https://eu.cdn.beatsaver.com/3a2a0fead6eb8a8ab325aa54efdfb84bd4220375.jpg",previewURL:"https://eu.cdn.beatsaver.com/3a2a0fead6eb8a8ab325aa54efdfb84bd4220375.mp3"}],createdAt:"2025-09-05T18:27:26.937639Z",updatedAt:"2025-09-30T15:48:59.259473Z",lastPublishedAt:"2025-09-06T02:29:10.640787Z",tags:["video-game-soundtrack","balanced","poodle"],bookmarked:!1,collaborators:[{id:103109,name:"Xentha",avatar:"https://cdn.beatsaver.com/avatar/da02df6ec7f6d28e226510b3f8ecb786d24634ca.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,playlistUrl:"https://api.beatsaver.com/users/id/103109/playlist"},{id:4280701,name:"rategyro",hash:"605e50f0cd73ba00060a45e3",avatar:"https://cdn.beatsaver.com/avatar/06d29645455d6652940b240658617d968fc53d91.png",type:"DISCORD",admin:!0,curator:!0,seniorCurator:!0,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4280701/playlist"}],declaredAi:"None",blRanked:!1,blQualified:!1},{id:"14d64",name:"Try - MitiS Feat. RORY",description:"Twenty-Sixth Upload\n\nThis map means the whole world to me, so I hope everyone enjoys this map. My father passed away on Jan. 23, 2021, in the middle of making this map. I am dedicating this map for him because of how much this songs means to me now. \nPouring my heart and soul into this map took a lot out of me, making it as perfect to my little abilities I have for mapping.\n\nBig shout outs to Lonely and Jamman for lighting this beautiful song and for agreeing to light it, it means the world to me.\nBig shout outs to thelightdesigner for making such amazing and beautiful walls. Thank you for taking the time to make this, it means the world to me.\nBig shout outs to Mawntee for giving me advice on how to make this map feel and shout outs to thelitlewiseowl for modding it, showing me what I can improve in this map. \nBiggest shout outs to everyone that play tested it multiple times. I am sorry for bugging them for multiple play test. \n\nAnd Biggest shoutout to my favorite chillstep/melodic dubstep artist, MitiS and Rory for making this beautiful song. \nYou have no idea how much this song means to me, I thank you so much. Keep up the good work MitiS.\n\n**NOODLES AND CHROMA REQUIRED**\n\nI hope this map can show you the feeling in this song, as well as what it portrays. I tried my best, I hope it turns out great and everyone enjoys it. \nThank you everyone for taking the time to download and play this map. I appreciate it everyone.\n\nFeedback is always welcome!",uploader:{id:4285346,name:"remie",hash:"5f6efd989824150006d740ac",avatar:"https://cdn.beatsaver.com/avatar/736cde47222d5d00f4affea115772681d0e070eb.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,playlistUrl:"https://api.beatsaver.com/users/id/4285346/playlist"},metadata:{bpm:132,duration:273,songName:"Try",songSubName:"",songAuthorName:"MitiS Feat. RORY",levelAuthorName:"Remie & Lone"},stats:{plays:0,downloads:0,upvotes:7683,downvotes:102,score:.9843,reviews:36,sentiment:"VERY_POSITIVE"},uploaded:"2021-03-01T13:29:26.471Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"6db3d9da217b41607d250aa7a28c5dc26a082188",key:"14d64",state:"Published",createdAt:"2021-03-01T13:29:26.471Z",sageScore:3,diffs:[{njs:17,offset:-.7,notes:1447,bombs:21,obstacles:77,nps:6.217,length:512.083,characteristic:"Standard",difficulty:"ExpertPlus",events:36825,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:232.765,paritySummary:{errors:0,warns:0,resets:2},maxScore:1323995,label:"EXPERT+",environment:"OriginsEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/6db3d9da217b41607d250aa7a28c5dc26a082188.zip",coverURL:"https://eu.cdn.beatsaver.com/6db3d9da217b41607d250aa7a28c5dc26a082188.jpg",previewURL:"https://eu.cdn.beatsaver.com/6db3d9da217b41607d250aa7a28c5dc26a082188.mp3"}],curator:{id:2381,name:"bearly",hash:"5ea9efbf16c968000636dba4",avatar:"https://cdn.beatsaver.com/avatar/2381.jpg",type:"SIMPLE",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/2381/playlist"},curatedAt:"2021-03-01T13:29:26.471Z",createdAt:"2021-03-01T13:29:26.471Z",updatedAt:"2021-03-01T13:29:26.471Z",lastPublishedAt:"2021-03-01T13:29:26.471Z",tags:["balanced"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"27a13",name:"Jimmy Eat World - The Middle [Arcs][V3 Lights]",description:" - everything'll be alright, alright? \n\nYes, @Bytrius already has a great map of this song in the 2000's Rock Pack (check it out here https://beatsaver.com/maps/157fa) but I thought I'd try it with my own arc map style and provide some lower difficulties as well. \n\nGameplay video by @onespookyboi: https://youtu.be/SjiqMsMkFuU\nLIghtshow: https://streamable.com/zhomzm\n\nThank you testers!\n@maybeemae\n@swukpuff\n@onespookyboi\n@namaki_mono\nFlaemmchenFlame - https://www.twitch.tv/flaemmchenflame\n",uploader:{id:4321171,name:"tetsubeats",avatar:"https://cdn.beatsaver.com/avatar/532b0f3d23e1e795c5e1404c4a807c0dfbe1adf2.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4321171/playlist"},metadata:{bpm:162.2,duration:169,songName:"The Middle",songSubName:"",songAuthorName:"Jimmy Eat World",levelAuthorName:"TetsuBeats"},stats:{plays:0,downloads:0,upvotes:3397,downvotes:39,score:.9842,reviews:1},uploaded:"2022-07-10T05:30:32.964512Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"4b980371b6005cc176aed1b402bd104af56c31a3",state:"Published",createdAt:"2022-07-10T04:29:32.041843Z",sageScore:5,diffs:[{njs:10,offset:-1.1,notes:320,bombs:0,obstacles:0,nps:1.951,length:443.5,characteristic:"Standard",difficulty:"Easy",events:460,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:164.057,paritySummary:{errors:0,warns:0,resets:0},maxScore:287155,environment:"PyroEnvironment"},{njs:12,offset:-1.5,notes:528,bombs:0,obstacles:0,nps:3.218,length:443.5,characteristic:"Standard",difficulty:"Normal",events:460,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:164.057,paritySummary:{errors:0,warns:0,resets:0},maxScore:478515,environment:"PyroEnvironment"},{njs:14,offset:.1,notes:629,bombs:0,obstacles:0,nps:3.834,length:443.5,characteristic:"Standard",difficulty:"Hard",events:460,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:164.057,paritySummary:{errors:0,warns:0,resets:0},maxScore:571435,environment:"PyroEnvironment"},{njs:16.5,offset:-.1,notes:758,bombs:0,obstacles:0,nps:4.62,length:443.5,characteristic:"Standard",difficulty:"Expert",events:460,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:164.057,paritySummary:{errors:0,warns:0,resets:0},maxScore:690115,environment:"PyroEnvironment"},{njs:17.5,offset:-.3,notes:826,bombs:0,obstacles:0,nps:5.035,length:443.5,characteristic:"Standard",difficulty:"ExpertPlus",events:460,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:164.057,paritySummary:{errors:0,warns:0,resets:0},maxScore:752675,environment:"PyroEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/4b980371b6005cc176aed1b402bd104af56c31a3.zip",coverURL:"https://eu.cdn.beatsaver.com/4b980371b6005cc176aed1b402bd104af56c31a3.jpg",previewURL:"https://eu.cdn.beatsaver.com/4b980371b6005cc176aed1b402bd104af56c31a3.mp3"}],curator:{id:32269,name:"maybeemae",hash:"5e1123516d774b0006a953ec",avatar:"https://cdn.beatsaver.com/avatar/d2119e1ff402b2cd380caf8b074d3f7c037f0ec2.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/32269/playlist"},curatedAt:"2022-07-10T05:52:53.577094Z",createdAt:"2022-07-10T04:29:32.041843Z",updatedAt:"2022-07-10T14:14:52.319313Z",lastPublishedAt:"2022-07-10T05:30:32.964512Z",tags:["dance-style","balanced","rock","pop"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"271dc",name:"[Electro Swing Pack Vol. 2] Swingrowers - Butterfly (Wolfgang Lohr Remix)",description:"Electro Swing Pack Volume 2: Electric Boogaloo!\n\nFor the anniversary of my first pack, I am making a sequel.\n10 Electro Swing songs, 3 difficulties each + custom vanilla lights!\n\nGet the pack here:\nhttps://bsaber.com/electro-swing-pack-2/\nhttps://beatsaver.com/playlists/6572\n\nPreview this map:\nhttps://youtu.be/91zWh1dLLV4\n\nPack Preview Playlist:\nhttps://youtube.com/playlist?list=PLrVm0whzsGKL5NYTUIEzDyITjl6WuLSJ4\n\n\nThank you to all the Playtesters!\nAlice, MaybeeMae, Pixelguy, Raaknys, Namaki Mono, DeeDee, and WolfieBeat ❤️\n\n\nMore Maps: https://beatsaver.com/profile/4286374\nDiscord: Nixie.Korten#6944\nJoin My Server: https://discord.gg/RjxPpZtH7w\nTwitter: https://twitter.com/Nixie_Korten\nInstagram: https://www.instagram.com/nixie.korten/",uploader:{id:4286374,name:"Nixie.Korten",hash:"6096752e12772e0006e2f7e6",avatar:"https://cdn.beatsaver.com/avatar/bb97db2b49d21f5cbc1a5ba50742fa0e5c86ed3c.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4286374/playlist"},metadata:{bpm:126,duration:189,songName:"Butterfly",songSubName:"(Wolfgang Lohr Remix)",songAuthorName:"Swingrowers",levelAuthorName:"Nixie.Korten"},stats:{plays:0,downloads:0,upvotes:1900,downvotes:18,score:.9842},uploaded:"2022-07-08T13:00:00.564Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"8a1f9c4ddd15a7c1ab69769542c9409ce630aaa7",state:"Published",createdAt:"2022-06-25T18:10:24.485756Z",sageScore:5,diffs:[{njs:14,offset:0,notes:522,bombs:0,obstacles:9,nps:2.818,length:389,characteristic:"Standard",difficulty:"Hard",events:2570,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:185.238,paritySummary:{errors:0,warns:0,resets:0},maxScore:472995,environment:"PanicEnvironment"},{njs:16,offset:-.5,notes:752,bombs:0,obstacles:9,nps:4.06,length:389,characteristic:"Standard",difficulty:"Expert",events:2570,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:185.238,paritySummary:{errors:0,warns:0,resets:0},maxScore:684595,environment:"PanicEnvironment"},{njs:19,offset:.25,notes:903,bombs:0,obstacles:9,nps:4.875,length:389,characteristic:"Standard",difficulty:"ExpertPlus",events:2570,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:185.238,paritySummary:{errors:0,warns:0,resets:0},maxScore:823515,environment:"PanicEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/8a1f9c4ddd15a7c1ab69769542c9409ce630aaa7.zip",coverURL:"https://eu.cdn.beatsaver.com/8a1f9c4ddd15a7c1ab69769542c9409ce630aaa7.jpg",previewURL:"https://eu.cdn.beatsaver.com/8a1f9c4ddd15a7c1ab69769542c9409ce630aaa7.mp3"}],curator:{id:4284746,name:"Dee-Dee",avatar:"https://cdn.beatsaver.com/avatar/3853d99b74fe4eb9a3954df5946123f67a95da3d.png",type:"DISCORD",admin:!1,curator:!0,seniorCurator:!0,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4284746/playlist"},curatedAt:"2022-07-09T12:03:07.374428Z",createdAt:"2022-06-25T18:10:24.485756Z",updatedAt:"2024-11-09T20:31:57.830788Z",lastPublishedAt:"2022-07-08T13:00:00.559037Z",tags:["balanced","electronic","swing","dance-style"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"39624",name:"[Chroma] DNCE - Cake By The Ocean",description:"[Explicit Lyrics]\n[Flashing Lights Warning]\n\nMy first full spread map!\n\nJan 28th 2024: Reupload with fixed lighting\n-----------------------------------------------------\nSong: Cake By The Ocean by DNCE\nhttps://www.youtube.com/watch?v=vWaRiD5ym74\n\nMap Preview (Expert+):\nhttps://www.youtube.com/watch?v=UZyrFB9vKDo\n-----------------------------------------------------\nThank you to @Noveliniel for playtesting this map.\n-----------------------------------------------------\nMessage wunkoo on Discord for any feedback (must be in the BeastSaber discord).\nOr just leave a BeatSaver review",uploader:{id:4302396,name:"Koreami",avatar:"https://cdn.beatsaver.com/avatar/f5542fc9f09f21504d7e82a61b06d494389ba3d3.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,playlistUrl:"https://api.beatsaver.com/users/id/4302396/playlist"},metadata:{bpm:119,duration:221,songName:"Cake By The Ocean",songSubName:"",songAuthorName:"DNCE",levelAuthorName:"Koreami"},stats:{plays:0,downloads:0,upvotes:2819,downvotes:31,score:.9841,reviews:3},uploaded:"2024-01-27T19:00:00.269841Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"2cb2f496ef6e33a09a56d301923ade73b9a53c3d",state:"Published",createdAt:"2024-01-28T18:55:36.350370Z",sageScore:5,diffs:[{njs:12,offset:-.1,notes:431,bombs:6,obstacles:37,nps:2.021,length:423,characteristic:"Standard",difficulty:"Easy",events:2073,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:213.277,paritySummary:{errors:0,warns:0,resets:0},maxScore:389275,label:"Puddle",environment:"DragonsEnvironment"},{njs:12,offset:-.2,notes:554,bombs:0,obstacles:21,nps:2.598,length:423,characteristic:"Standard",difficulty:"Normal",events:2073,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:213.277,paritySummary:{errors:0,warns:0,resets:0},maxScore:502515,label:"Pond",environment:"DragonsEnvironment"},{njs:13,offset:-.25,notes:677,bombs:0,obstacles:31,nps:3.174,length:423,characteristic:"Standard",difficulty:"Hard",events:2073,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:213.277,paritySummary:{errors:0,warns:0,resets:0},maxScore:615595,label:"Lake",environment:"DragonsEnvironment"},{njs:16,offset:-.7,notes:800,bombs:0,obstacles:33,nps:3.751,length:423,characteristic:"Standard",difficulty:"Expert",events:2073,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:213.277,paritySummary:{errors:0,warns:0,resets:0},maxScore:728755,label:"Sea",environment:"DragonsEnvironment"},{njs:16,offset:-.7,notes:971,bombs:4,obstacles:41,nps:4.553,length:423,characteristic:"Standard",difficulty:"ExpertPlus",events:2073,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:213.277,paritySummary:{errors:0,warns:0,resets:0},maxScore:886075,label:"Ocean",environment:"DragonsEnvironment"},{njs:16,offset:0,notes:0,bombs:0,obstacles:0,nps:0,length:0,characteristic:"Lightshow",difficulty:"Normal",events:2073,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:0,paritySummary:{errors:0,warns:0,resets:0},maxScore:0,label:"Fluorescent Coral",environment:"DragonsEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/2cb2f496ef6e33a09a56d301923ade73b9a53c3d.zip",coverURL:"https://eu.cdn.beatsaver.com/2cb2f496ef6e33a09a56d301923ade73b9a53c3d.jpg",previewURL:"https://eu.cdn.beatsaver.com/2cb2f496ef6e33a09a56d301923ade73b9a53c3d.mp3"}],curator:{id:169636,name:"Duffelsalat",avatar:"https://cdn.beatsaver.com/avatar/42f17c520f53b67cf400a66f65e49038263042de.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/169636/playlist"},curatedAt:"2024-01-28T15:09:46.809093Z",createdAt:"2024-01-27T18:49:42.362618Z",updatedAt:"2025-05-27T05:59:37.010902Z",lastPublishedAt:"2024-01-28T18:55:43.801969Z",tags:["accuracy","balanced","pop","dance"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"9a0c",name:"Thnks fr th Mmrs - Fall Out Boy",description:"Thnks fr th Mmrs (or Thanks for the Memories) from Fall Out Boy.\nSo far the map that I have put the most work into (and which probably made me age by 3 years). Hope you enjoy it!\n\nThe map has Chroma lighting but can also be played without the Chroma mod.\nExpert+ contains single saber sections and polyrhythm parts. Just so you are warned ;)\n\nBig thanks to Sorukun for playtesting this map and especially to Timeweaver for pointing out all issues it had during its creation!",uploader:{id:21367,name:"hamsta",hash:"5de27451fffaa600066f2842",avatar:"https://www.gravatar.com/avatar/36e8d99105e1e9c1d2173853194691e2b2d5c0552b6e96bfd7a2fd8108310685?d=retro",type:"SIMPLE",admin:!1,curator:!1,seniorCurator:!1,playlistUrl:"https://api.beatsaver.com/users/id/21367/playlist"},metadata:{bpm:154.791,duration:198,songName:"Thnks fr th Mmrs",songSubName:"",songAuthorName:"Fall Out Boy",levelAuthorName:"Hamsta"},stats:{plays:0,downloads:0,upvotes:10577,downvotes:148,score:.984,reviews:2},uploaded:"2020-04-12T09:50:46.516Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"0e8ef3006db854c67f04fe72322bccea410f69ee",key:"9a0c",state:"Published",createdAt:"2020-04-12T09:50:46.516Z",sageScore:5,diffs:[{njs:14,offset:0,notes:580,bombs:0,obstacles:51,nps:3.092,length:484,characteristic:"Standard",difficulty:"Hard",events:2597,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:187.355,paritySummary:{errors:0,warns:0,resets:0},maxScore:526355,environment:"PanicEnvironment"},{njs:14,offset:0,notes:637,bombs:0,obstacles:51,nps:3.395,length:484,characteristic:"Standard",difficulty:"Expert",events:2597,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:187.355,paritySummary:{errors:0,warns:0,resets:0},maxScore:578795,environment:"PanicEnvironment"},{njs:16,offset:0,notes:844,bombs:0,obstacles:39,nps:4.499,length:484,characteristic:"Standard",difficulty:"ExpertPlus",events:2597,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:187.355,paritySummary:{errors:1,warns:2,resets:0},maxScore:769235,environment:"PanicEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/0e8ef3006db854c67f04fe72322bccea410f69ee.zip",coverURL:"https://eu.cdn.beatsaver.com/0e8ef3006db854c67f04fe72322bccea410f69ee.jpg",previewURL:"https://eu.cdn.beatsaver.com/0e8ef3006db854c67f04fe72322bccea410f69ee.mp3"}],curator:{id:4299228,name:"tan",avatar:"https://cdn.beatsaver.com/avatar/19d0c285757c0eea70e922961581953cfd96769b.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/4299228/playlist"},curatedAt:"2020-04-12T09:50:46.516Z",createdAt:"2020-04-12T09:50:46.516Z",updatedAt:"2020-04-12T09:50:46.516Z",lastPublishedAt:"2020-04-12T09:50:46.516Z",tags:["pop","dance-style"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"11b7a",name:"Still Alive - Portal",description:"I've wanted to map this song for a while now. And since this one's probably the last Portal song I'll map, I gave it my best. \r\n\r\nP.S. - I'm so glad to be back mapping this month. I had to take a break due to overwhelming stress, but now I'm feeling ready again.\r\nI hope you enjoy.\r\n\r\nPortal on Steam:\r\nhttps://store.steampowered.com/app/400/Portal/",uploader:{id:4284694,name:"Jokidum",hash:"5e15518d47f1600006e912cc",avatar:"https://cdn.beatsaver.com/avatar/da6133c71c7c84b75622f59dd2fce215f8c444f3.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,playlistUrl:"https://api.beatsaver.com/users/id/4284694/playlist"},metadata:{bpm:120,duration:176,songName:"Still Alive",songSubName:"- Portal",songAuthorName:"Jonathan Coulton",levelAuthorName:"Jokidum"},stats:{plays:0,downloads:0,upvotes:6908,downvotes:92,score:.984,reviews:2},uploaded:"2020-12-04T20:30:44.132Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"8c03b43484b0dd1fc7d8a3104a82f0992a001c6c",key:"11b7a",state:"Published",createdAt:"2020-12-04T20:30:44.132Z",sageScore:4,diffs:[{njs:12,offset:0,notes:490,bombs:0,obstacles:13,nps:2.853,length:343.5,characteristic:"Standard",difficulty:"Expert",events:1060,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:171.75,paritySummary:{errors:0,warns:0,resets:0},maxScore:443555,environment:"TriangleEnvironment"},{njs:16,offset:0,notes:0,bombs:0,obstacles:0,nps:0,length:0,characteristic:"Lightshow",difficulty:"Easy",events:1060,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:0,paritySummary:{errors:0,warns:0,resets:0},maxScore:0,label:"Lightshow",environment:"TriangleEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/8c03b43484b0dd1fc7d8a3104a82f0992a001c6c.zip",coverURL:"https://eu.cdn.beatsaver.com/8c03b43484b0dd1fc7d8a3104a82f0992a001c6c.jpg",previewURL:"https://eu.cdn.beatsaver.com/8c03b43484b0dd1fc7d8a3104a82f0992a001c6c.mp3"}],createdAt:"2020-12-04T20:30:44.132Z",updatedAt:"2020-12-04T20:30:44.132Z",lastPublishedAt:"2020-12-04T20:30:44.132Z",bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"24227",name:"DADDY! DADDY! DO! (TV Size) (2022 Remaster) [Kaguya-sama: Love Is War Season 2 Opening] - Masayuki Suzuki ft. Airi Suzuki ",description:"Just a small remaster of my old daddy daddy do map from 2020, fixed a few parity errors and updated the NJS. There's also 2 additional down maps now. \n\nThanks to https://twitter.com/WicKedBassline for the special request!\n\nDADDY! DADDY! DO! is opening theme for the second season of the Kaguya-sama: Love Is War anime adaptation.\n\nKeep up to date on my maps: https://twitter.com/Joetastic_\nMy mapper's profile: https://bsaber.com/members/joetastic/\nContact me on discord: @Joetastic#2501",uploader:{id:58338,name:"Joetastic",hash:"5cff0b7498cc5a672c85050e",avatar:"https://cdn.beatsaver.com/avatar/91bb7b0510cea647179bc95e032f8a25608b09f1.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/58338/playlist"},metadata:{bpm:138,duration:91,songName:"DADDY! DADDY! DO! (TV Size) (2022 Remaster)",songSubName:"ft. Airi Suzuki",songAuthorName:"Masayuki Suzuki",levelAuthorName:"Joetastic"},stats:{plays:0,downloads:0,upvotes:3282,downvotes:38,score:.984,reviews:1},uploaded:"2022-04-09T06:56:40.572610Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"9eb5c6cc6e55bc17ee7833a5e8b67f8793a3ed17",state:"Published",createdAt:"2022-04-09T06:56:26.910837Z",sageScore:4,diffs:[{njs:12,offset:0,notes:205,bombs:4,obstacles:23,nps:2.352,length:200.5,characteristic:"Standard",difficulty:"Hard",events:1053,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:87.174,paritySummary:{errors:0,warns:0,resets:0},maxScore:181355,environment:"PanicEnvironment"},{njs:15,offset:-.3,notes:306,bombs:4,obstacles:23,nps:3.51,length:200.5,characteristic:"Standard",difficulty:"Expert",events:1053,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:87.174,paritySummary:{errors:0,warns:0,resets:0},maxScore:274275,environment:"PanicEnvironment"},{njs:18,offset:-.6,notes:381,bombs:0,obstacles:23,nps:4.371,length:200.5,characteristic:"Standard",difficulty:"ExpertPlus",events:1053,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:87.174,paritySummary:{errors:0,warns:0,resets:0},maxScore:343275,environment:"PanicEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/9eb5c6cc6e55bc17ee7833a5e8b67f8793a3ed17.zip",coverURL:"https://eu.cdn.beatsaver.com/9eb5c6cc6e55bc17ee7833a5e8b67f8793a3ed17.jpg",previewURL:"https://eu.cdn.beatsaver.com/9eb5c6cc6e55bc17ee7833a5e8b67f8793a3ed17.mp3"}],curator:{id:4285122,name:"Lasso-Catsidy",avatar:"https://cdn.beatsaver.com/avatar/1daf0e4ecc153a86d14ec7913800a38fd0f0187d.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/4285122/playlist"},curatedAt:"2022-04-11T06:44:59.068414Z",createdAt:"2022-04-09T06:56:26.910837Z",updatedAt:"2022-04-11T06:44:59.068414Z",lastPublishedAt:"2022-04-09T06:56:40.572610Z",tags:["dance-style","anime","j-pop"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"291b9",name:"BLOODY STREAM (TV Size) (2022 Remaster) [JoJo's Bizarre Adventure 2nd Opening] - Coda",description:'---------Map uses the new 1.20 Note mechanics (eg: arc and chains) and won\'t work on any versions of Beat Saber below 1.20---------\n\nThanks to https://twitter.com/EuclaseW for the special request!\n\nThis map is a remap of my old Bloody Stream map. Changes include:\n- Parity fixes\n- Additional difficulties\n- Custom colors!\n- Addition of Arcs and Chains!\n\n"BLOODY STREAM" is the second opening of the JoJo\'s Bizarre Adventure by Japanese musician Kazuso Oda under the stage name "Coda".\n\nKeep up to date on my maps: https://twitter.com/Joetastic_\nMy mapper\'s profile: https://bsaber.com/members/joetastic/\nContact me on discord: @Joetastic#2501',uploader:{id:58338,name:"Joetastic",hash:"5cff0b7498cc5a672c85050e",avatar:"https://cdn.beatsaver.com/avatar/91bb7b0510cea647179bc95e032f8a25608b09f1.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/58338/playlist"},metadata:{bpm:132,duration:93,songName:"BLOODY STREAM (TV Size) (2022 Remaster)",songSubName:"",songAuthorName:"Coda",levelAuthorName:"Joetastic"},stats:{plays:0,downloads:0,upvotes:4309,downvotes:54,score:.9838},uploaded:"2022-08-21T14:25:59.776857Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"2c6a5186b7e3f4a3b453065ee8ad042d72947102",state:"Published",createdAt:"2022-08-21T14:25:52.329353Z",sageScore:2,diffs:[{njs:12,offset:0,notes:326,bombs:29,obstacles:16,nps:3.659,length:196,characteristic:"Standard",difficulty:"Hard",events:1780,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:89.091,paritySummary:{errors:0,warns:0,resets:0},maxScore:292915,environment:"BigMirrorEnvironment"},{njs:15,offset:-.3,notes:446,bombs:18,obstacles:13,nps:5.006,length:196,characteristic:"Standard",difficulty:"Expert",events:1780,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:89.091,paritySummary:{errors:0,warns:0,resets:0},maxScore:403315,environment:"BigMirrorEnvironment"},{njs:18,offset:-.6,notes:561,bombs:22,obstacles:15,nps:6.297,length:196,characteristic:"Standard",difficulty:"ExpertPlus",events:1780,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:89.091,paritySummary:{errors:0,warns:0,resets:0},maxScore:510715,environment:"BigMirrorEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/2c6a5186b7e3f4a3b453065ee8ad042d72947102.zip",coverURL:"https://eu.cdn.beatsaver.com/2c6a5186b7e3f4a3b453065ee8ad042d72947102.jpg",previewURL:"https://eu.cdn.beatsaver.com/2c6a5186b7e3f4a3b453065ee8ad042d72947102.mp3"}],curator:{id:4285122,name:"Lasso-Catsidy",avatar:"https://cdn.beatsaver.com/avatar/1daf0e4ecc153a86d14ec7913800a38fd0f0187d.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/4285122/playlist"},curatedAt:"2022-09-09T02:00:15.130726Z",createdAt:"2022-08-21T14:25:52.329353Z",updatedAt:"2022-09-09T02:00:15.130726Z",lastPublishedAt:"2022-08-21T14:25:59.776857Z",tags:["dance-style","anime","j-pop","balanced"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"2ab5b",name:"Handclap - fitz and the tantrums",description:"twitch : https://www.twitch.tv/emiru_milk\ntwitter : https://twitter.com/EmirTart\ndiscord : https://discord.gg/DHwuND8K7K\nEmiru#9999",uploader:{id:4284894,name:"emiru",hash:"5d3dac6586729100069260cc",avatar:"https://cdn.beatsaver.com/avatar/59d2538aa7b938cbd28629073dc6d9be2357bee9.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4284894/playlist"},metadata:{bpm:139.867,duration:196,songName:"Handclap",songSubName:"",songAuthorName:"Fitz and the Tantrums",levelAuthorName:"Emir"},stats:{plays:0,downloads:0,upvotes:5631,downvotes:75,score:.9836,reviews:3},uploaded:"2022-10-08T08:58:23.778044Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"3da135c11207f5f4f2dfe7b18a6416931f66936e",state:"Published",createdAt:"2022-10-08T09:11:55.226599Z",sageScore:3,diffs:[{njs:16,offset:0,notes:196,bombs:0,obstacles:58,nps:1.078,length:423.891,characteristic:"Standard",difficulty:"Easy",events:5218,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:181.841,paritySummary:{errors:0,warns:0,resets:0},maxScore:173075,environment:"FitBeatEnvironment"},{njs:13,offset:.152,notes:302,bombs:0,obstacles:66,nps:1.655,length:425.39,characteristic:"Standard",difficulty:"Normal",events:5218,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:182.483,paritySummary:{errors:0,warns:0,resets:0},maxScore:270595,environment:"FitBeatEnvironment"},{njs:14,offset:-.168,notes:546,bombs:0,obstacles:184,nps:2.992,length:425.39,characteristic:"Standard",difficulty:"Hard",events:5221,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:182.483,paritySummary:{errors:0,warns:0,resets:0},maxScore:495075,environment:"FitBeatEnvironment"},{njs:15,offset:-.368,notes:739,bombs:0,obstacles:130,nps:3.894,length:442.374,characteristic:"Standard",difficulty:"Expert",events:5218,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:189.769,paritySummary:{errors:0,warns:0,resets:0},maxScore:672635,environment:"FitBeatEnvironment"},{njs:16,offset:-.543,notes:925,bombs:8,obstacles:315,nps:5.057,length:426.389,characteristic:"Standard",difficulty:"ExpertPlus",events:4390,chroma:!0,me:!1,ne:!1,cinema:!1,seconds:182.912,paritySummary:{errors:0,warns:0,resets:8},maxScore:843755,environment:"FitBeatEnvironment"},{njs:12,offset:.526,notes:350,bombs:0,obstacles:34,nps:1.844,length:442.374,characteristic:"Lawless",difficulty:"Easy",events:5219,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:189.769,paritySummary:{errors:43,warns:22,resets:0},maxScore:314755,label:"Lawless Tutorial",environment:"FitBeatEnvironment"},{njs:13,offset:.152,notes:657,bombs:0,obstacles:2,nps:3.462,length:442.374,characteristic:"Lawless",difficulty:"Normal",events:5219,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:189.769,paritySummary:{errors:623,warns:0,resets:0},maxScore:597195,label:"Down Notes",environment:"FitBeatEnvironment"},{njs:14,offset:-.002,notes:670,bombs:0,obstacles:2,nps:3.531,length:442.374,characteristic:"Lawless",difficulty:"Hard",events:5219,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:189.769,paritySummary:{errors:635,warns:16,resets:0},maxScore:609155,label:"Up Notes",environment:"FitBeatEnvironment"},{njs:15,offset:-.29,notes:1050,bombs:0,obstacles:2,nps:5.533,length:442.374,characteristic:"Lawless",difficulty:"Expert",events:5218,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:189.769,paritySummary:{errors:0,warns:78,resets:0},maxScore:958755,label:"90°Directions",environment:"FitBeatEnvironment"},{njs:16,offset:-.543,notes:1260,bombs:0,obstacles:246,nps:6.625,length:443.373,characteristic:"Lawless",difficulty:"ExpertPlus",events:5218,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:190.198,paritySummary:{errors:0,warns:6,resets:0},maxScore:1151955,label:"Dodge Walls",environment:"FitBeatEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/3da135c11207f5f4f2dfe7b18a6416931f66936e.zip",coverURL:"https://eu.cdn.beatsaver.com/3da135c11207f5f4f2dfe7b18a6416931f66936e.jpg",previewURL:"https://eu.cdn.beatsaver.com/3da135c11207f5f4f2dfe7b18a6416931f66936e.mp3"}],curator:{id:58338,name:"Joetastic",hash:"5cff0b7498cc5a672c85050e",avatar:"https://cdn.beatsaver.com/avatar/91bb7b0510cea647179bc95e032f8a25608b09f1.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/58338/playlist"},curatedAt:"2022-10-08T09:19:15.538197Z",createdAt:"2022-10-08T08:57:08.316867Z",updatedAt:"2022-10-08T09:19:15.538197Z",lastPublishedAt:"2022-10-08T09:12:01.774147Z",tags:["dance-style","balanced","rock","pop"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"212cf",name:"Someone Else's Hat - David Maxim Micic (modchart)",description:"David Maxim Micic is a prog rock genius. I wish I had the courage to map the 8 minutes of Mbinguni Amina but a few minutes of Someone Else's Hat will have to do. I really encourage you to check his stuff, because it's so good: https://open.spotify.com/artist/0wQa1N4q3HmLwxqkpVcYhs?si=aB4m1yonTg2qk5ounpOEUw\n\nThis modchart was an opportunity for me to have fun with environment animations, and push animations to a new level. The first scene is based on the album cover that Yelka made for Who Bit the Moon, and the rest is random ideas that I thought would be cool with this music.\n\nHuge thanks to the playtesters and in particular Mawntee and Aggrogahu, who took time to give detailed feedback. I appreciate.\n\nPreview: https://youtu.be/RX-payaVsKU\n\nThe map should work on Quest too, though it won't look as good due to the difference in how walls look.\n\nIf you like what I create, tell me, I love to hear from you:\n- YouTube: https://youtube.com/c/nyri0\n- Twitter: https://twitter.com/nyri0z\n- Ko-Fi: https://ko-fi.com/nyri0",uploader:{id:4288814,name:"nyri0",hash:"5e792df416c9680006086a78",avatar:"https://cdn.beatsaver.com/avatar/233323d456510756fbbc0140c1a0698caf8b096c.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,playlistUrl:"https://api.beatsaver.com/users/id/4288814/playlist"},metadata:{bpm:130,duration:207,songName:"Someone Else's Hat",songSubName:"",songAuthorName:"David Maxim Micic",levelAuthorName:"nyri0"},stats:{plays:0,downloads:0,upvotes:3304,downvotes:40,score:.9835,reviews:3},uploaded:"2022-02-04T23:50:20.027446Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"3662e733501d7a77850c20f0fcea792ed2187943",state:"Published",createdAt:"2022-02-04T23:05:01.786046Z",sageScore:1,diffs:[{njs:16,offset:0,notes:465,bombs:12,obstacles:1460,nps:2.38,length:423.333,characteristic:"Standard",difficulty:"Expert",events:875,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:195.385,paritySummary:{errors:83,warns:0,resets:0},maxScore:420555,label:"haut-de-forme",environment:"BTSEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/3662e733501d7a77850c20f0fcea792ed2187943.zip",coverURL:"https://eu.cdn.beatsaver.com/3662e733501d7a77850c20f0fcea792ed2187943.jpg",previewURL:"https://eu.cdn.beatsaver.com/3662e733501d7a77850c20f0fcea792ed2187943.mp3"}],curator:{id:4284947,name:"Phoenix",hash:"5fa08b5281e1d70006f1b322",avatar:"https://cdn.beatsaver.com/avatar/4284947.jpg",type:"SIMPLE",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4284947/playlist"},curatedAt:"2022-02-04T23:50:20.027446Z",createdAt:"2022-02-04T23:05:01.786046Z",updatedAt:"2022-02-04T23:52:36.995020Z",lastPublishedAt:"2022-02-04T23:50:20.027446Z",tags:["balanced","rock"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"2c785",name:"[Arc/Chain] Let's Groove - Earth, Wind & Fire",description:"I've been wanting to do a lower tempo dance map for a while and I knew this would be the perfect song. \n\nThanks to @dolledupchaos for playtesting!",uploader:{id:4232648,name:"ramenator05",hash:"60ecf439686b9f0006a67a41",avatar:"https://cdn.beatsaver.com/avatar/4232648.jpg",type:"SIMPLE",admin:!1,curator:!1,seniorCurator:!1,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4232648/playlist"},metadata:{bpm:124,duration:236,songName:"[Arc/Chain] Let's Groove - Earth Wind & Fire",songSubName:"",songAuthorName:"Earth Wind & Fire",levelAuthorName:"ramenator05"},stats:{plays:0,downloads:0,upvotes:3479,downvotes:43,score:.9834,reviews:3},uploaded:"2022-11-28T23:00:29.688269Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"bf86263deda5f2e09867f3ddad625dfc269709be",state:"Published",createdAt:"2022-11-28T22:59:23.889170Z",sageScore:2,diffs:[{njs:15,offset:.2,notes:550,bombs:0,obstacles:0,nps:2.39,length:480,characteristic:"Standard",difficulty:"Hard",events:115,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:232.258,paritySummary:{errors:0,warns:0,resets:0},maxScore:500755,environment:"LizzoEnvironment"},{njs:17,offset:-.2,notes:708,bombs:0,obstacles:0,nps:3.076,length:480,characteristic:"Standard",difficulty:"Expert",events:115,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:232.258,paritySummary:{errors:0,warns:0,resets:0},maxScore:646195,environment:"LizzoEnvironment"},{njs:19,offset:.5,notes:715,bombs:0,obstacles:0,nps:3.107,length:480,characteristic:"Standard",difficulty:"ExpertPlus",events:115,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:232.258,paritySummary:{errors:0,warns:0,resets:0},maxScore:652635,environment:"LizzoEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/bf86263deda5f2e09867f3ddad625dfc269709be.zip",coverURL:"https://eu.cdn.beatsaver.com/bf86263deda5f2e09867f3ddad625dfc269709be.jpg",previewURL:"https://eu.cdn.beatsaver.com/bf86263deda5f2e09867f3ddad625dfc269709be.mp3"}],curator:{id:4292041,name:"symphonic",avatar:"https://cdn.beatsaver.com/avatar/2dc906ee5b78c2cb723f0eae964c2c203babf3f4.png",type:"DISCORD",admin:!0,curator:!0,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/4292041/playlist"},curatedAt:"2022-11-29T21:39:24.794532Z",createdAt:"2022-11-28T22:59:23.889170Z",updatedAt:"2022-11-29T21:39:24.794532Z",lastPublishedAt:"2022-11-28T23:00:29.688269Z",tags:["dance-style","soul","dance"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"21bf8",name:"Marina and the Diamonds - Are You Satisfied?",description:"Thanks, Cryston!\n\nSocials: \nhttps://twitter.com/bytrius\nhttps://www.youtube.com/c/bytrius\nhttps://bsaber.com/members/bytrius/\nhttps://www.twitch.tv/bytrius",uploader:{id:73032,name:"Bytrius",hash:"5de442271dc9e8000696cd15",avatar:"https://cdn.beatsaver.com/avatar/62ed9906317427e9b14435ca144c7189b83a711a.png",type:"DISCORD",admin:!0,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/73032/playlist"},metadata:{bpm:124,duration:200,songName:"Are You Satisfied?",songSubName:"",songAuthorName:"Marina and the Diamonds",levelAuthorName:"Bytrius"},stats:{plays:0,downloads:0,upvotes:604,downvotes:2,score:.9832,reviews:1},uploaded:"2022-02-15T21:07:43.593089Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"7fe7f6e0f0f1687b6821891b42f3ae080d6e1270",state:"Published",createdAt:"2022-02-15T20:59:06.806428Z",sageScore:4,diffs:[{njs:15,offset:-.55,notes:459,bombs:4,obstacles:124,nps:2.585,length:367,characteristic:"Standard",difficulty:"Hard",events:4532,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:177.581,paritySummary:{errors:0,warns:0,resets:2},maxScore:415035,environment:"DefaultEnvironment"},{njs:17,offset:-.725,notes:679,bombs:16,obstacles:122,nps:3.508,length:400,characteristic:"Standard",difficulty:"Expert",events:4532,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:193.548,paritySummary:{errors:0,warns:0,resets:4},maxScore:617435,environment:"DefaultEnvironment"},{njs:19,offset:.125,notes:944,bombs:24,obstacles:122,nps:4.877,length:400,characteristic:"Standard",difficulty:"ExpertPlus",events:4532,chroma:!1,me:!1,ne:!1,cinema:!1,seconds:193.548,paritySummary:{errors:0,warns:0,resets:4},maxScore:861235,environment:"DefaultEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/7fe7f6e0f0f1687b6821891b42f3ae080d6e1270.zip",coverURL:"https://eu.cdn.beatsaver.com/7fe7f6e0f0f1687b6821891b42f3ae080d6e1270.jpg",previewURL:"https://eu.cdn.beatsaver.com/7fe7f6e0f0f1687b6821891b42f3ae080d6e1270.mp3"}],curator:{id:32269,name:"maybeemae",hash:"5e1123516d774b0006a953ec",avatar:"https://cdn.beatsaver.com/avatar/d2119e1ff402b2cd380caf8b074d3f7c037f0ec2.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,playlistUrl:"https://api.beatsaver.com/users/id/32269/playlist"},curatedAt:"2022-02-15T21:07:43.593089Z",createdAt:"2022-02-15T20:59:06.806428Z",updatedAt:"2024-08-27T09:23:17.201003Z",lastPublishedAt:"2022-02-15T21:07:43.593089Z",tags:["dance-style","pop","electronic"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1},{id:"b514",name:"[[Wall Show + Chroma]] GAS GAS GAS | Manuel",description:"This wall map is a bit more intense than my others, you will need a very hefty pc to run and record this. Have Fun!\n\nHere's a playthrough: https://www.youtube.com/watch?v=hlS6r-Usnro\nHere's a playthrough by Nico (HQ Version): https://youtu.be/F_3qRxDdQc0\n\nREQUIREMENTS: \n -Noodle Extensions\n -Chroma/ChromaLite\n(fixed formatting + removed stupid metadata ;)",uploader:{id:73008,name:"thelightdesigner",hash:"5cff0b7798cc5a672c85627a",avatar:"https://cdn.beatsaver.com/avatar/fa1a30d2b4146dd93cb42537759669dcf961cf29.png",type:"DISCORD",admin:!1,curator:!1,seniorCurator:!1,playlistUrl:"https://api.beatsaver.com/users/id/73008/playlist"},metadata:{bpm:154,duration:108,songName:"GAS GAS GAS",songSubName:"(Short Ver.)",songAuthorName:"Manuel",levelAuthorName:"KyleT"},stats:{plays:0,downloads:0,upvotes:9158,downvotes:134,score:.9832,reviews:4},uploaded:"2020-06-22T20:02:06.271Z",automapper:!1,ranked:!1,qualified:!1,versions:[{hash:"95e11f39b2898a38e3b5e61d2156ef5f5835f40f",key:"b514",state:"Published",createdAt:"2020-06-22T20:02:06.271Z",sageScore:3,diffs:[{njs:16.5,offset:0,notes:390,bombs:13,obstacles:13898,nps:3.832,length:261.25,characteristic:"Standard",difficulty:"Expert",events:1462,chroma:!0,me:!1,ne:!0,cinema:!1,seconds:101.786,paritySummary:{errors:0,warns:0,resets:2},maxScore:351555,label:"GAS GAS GAS!!!!!",environment:"NiceEnvironment"}],downloadURL:"https://r2cdn.beatsaver.com/95e11f39b2898a38e3b5e61d2156ef5f5835f40f.zip",coverURL:"https://eu.cdn.beatsaver.com/95e11f39b2898a38e3b5e61d2156ef5f5835f40f.jpg",previewURL:"https://eu.cdn.beatsaver.com/95e11f39b2898a38e3b5e61d2156ef5f5835f40f.mp3"}],curator:{id:1096,name:"pyrowarfare",hash:"5e99c7df3f476a0006596cdf",avatar:"https://www.gravatar.com/avatar/28fcd25e8adfa72a17daa766767daf781bee89776333a3ed7a4cc84146e6a3e8?d=retro",type:"SIMPLE",admin:!1,curator:!1,seniorCurator:!1,curatorTab:!0,verifiedMapper:!0,playlistUrl:"https://api.beatsaver.com/users/id/1096/playlist"},curatedAt:"2020-06-22T20:02:06.271Z",createdAt:"2020-06-22T20:02:06.271Z",updatedAt:"2020-06-22T20:02:06.271Z",lastPublishedAt:"2020-06-22T20:02:06.271Z",tags:["anime","electronic","house"],bookmarked:!1,declaredAi:"None",blRanked:!1,blQualified:!1}]},function(e,t,n){if(AFRAME.registerComponent("song-info-positioner",{schema:{victory:{default:!1}},update:function(){this.data.victory?this.el.object3D.position.y=-1.2:this.el.object3D.position.y=-1}}),window.AFRAME){const t=["song-info-positioner"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){n(6);if(AFRAME.registerComponent("song-preview-system",{schema:{selectedChallengeId:{type:"string"},selectedChallengeVersion:{type:"string"}},init:function(){this.audio=document.createElement("audio"),this.audio.volume=.5},update:function(e){const t=this.data;console.log("update-song",e,t),t.selectedChallengeId&&e.selectedChallengeId!==t.selectedChallengeId?(this.audio.pause(),this.audio.setAttribute("src","https://cdn.beatsaver.com/"+t.selectedChallengeVersion+".mp3"),this.audio.currentTime=0,this.audio.play()):t.selectedChallengeId||this.audio.pause()}}),window.AFRAME){const t=["song-preview-system"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("song-progress-info",{dependencies:["geometry","material"],schema:{enabled:{default:!1}},init:function(){this.tick=AFRAME.utils.throttleTick(this.tick.bind(this),1e3),this.progress=this.el.getObject3D("mesh"),this.progress.geometry.translate(.285,0,0),this.el.sceneEl.addEventListener("cleargame",()=>{this.progress.scale.x=1e-4})},update:function(e){this.progress.scale.x=1e-4},updateInfo:function(){const e=this.el.sceneEl.components.song.source;if(!e||!e.buffer)return;const t=this.el.sceneEl.components.song.getCurrentTime()/e.buffer.duration;t&&(this.progress.scale.x=t)},tick:function(){this.data.enabled&&this.updateInfo()}}),window.AFRAME){const t=["song-progress-info"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){n(6);const r={once:!0};let i=AFRAME.utils.getUrlParameter("skip");if(i=i?parseInt(i)/1e3:0,AFRAME.registerComponent("song",{schema:{audio:{type:"string"},analyserEl:{type:"selector",default:"#audioAnalyser"},challengeId:{default:""},isBeatsPreloaded:{default:!1},isGameOver:{default:!1},isLoading:{default:!1},isPlaying:{default:!1},isVictory:{default:!1}},init:function(){this.analyserSetter={buffer:!0},this.audioAnalyser=this.data.analyserEl.components.audioanalyser,this.context=this.audioAnalyser.context,this.isAudioPlaying=!1,this.songStartTime=0,this.onSongComplete=this.onSongComplete.bind(this),this.audioAnalyser.gainNode.gain.value=.5,this.el.addEventListener("gamemenurestart",this.onRestart.bind(this)),this.el.addEventListener("wallhitstart",this.onWallHitStart.bind(this)),this.el.addEventListener("wallhitend",this.onWallHitEnd.bind(this))},update:function(e){const t=this.data;if(!e.isLoading&&t.isLoading&&t.audio)this.processAudio();else if(!e.audio&&t.audio&&t.isLoading)this.processAudio();else if(e.isGameOver||!t.isGameOver){if(e.isGameOver&&!t.isGameOver&&(this.audioAnalyser.gainNode.value=.5),!e.isVictory&&t.isVictory)return this.data.analyserEl.addEventListener("audioanalyserbuffersource",e=>{this.audioAnalyser.resumeContext();const t=this.audioAnalyser.gainNode.gain;t.cancelScheduledValues(0),t.setValueAtTime(.05,0),this.source=e.detail,this.source.start(),this.el.emit("victory")},r),void this.audioAnalyser.refreshSource();!e.isBeatsPreloaded&&this.data.isBeatsPreloaded&&this.source&&this.startAudio(),!e.challengeId||t.challengeId?(e.isPlaying&&!t.isPlaying&&(this.audioAnalyser.suspendContext(),this.isAudioPlaying=!1),!e.isPlaying&&t.isPlaying&&this.source&&(this.audioAnalyser.resumeContext(),this.isAudioPlaying=!0)):this.stopAudio()}else this.onGameOver()},processAudio:function(){this.el.sceneEl.emit("songprocessstart",null,!1),this.getAudio().then(e=>{this.el.sceneEl.emit("songprocessfinish",null,!1)}).catch(console.error)},getAudio:function(){const e=this.data;return this.source&&this.stopAudio(),this.isAudioPlaying=!1,new Promise(t=>{e.analyserEl.addEventListener("audioanalyserbuffersource",e=>{this.source=e.detail,t(this.source)},r),this.analyserSetter.src=this.data.audio,e.analyserEl.setAttribute("audioanalyser",this.analyserSetter)})},stopAudio:function(){this.source?(this.source.onended=null,this.isAudioPlaying&&this.source.stop(),this.source.disconnect(),this.source=null,this.isAudioPlaying=!1):console.warn("[song] Tried to stopAudio, but not playing.")},onSongComplete:function(){this.data.isPlaying&&this.el.emit("songcomplete")},onGameOver:function(){this.isAudioPlaying=!1;const e=this.source.playbackRate;e.setValueAtTime(e.value,this.context.currentTime),e.linearRampToValueAtTime(0,this.context.currentTime+3.5);const t=this.audioAnalyser.gainNode.gain;t.setValueAtTime(t.value,this.context.currentTime),t.linearRampToValueAtTime(0,this.context.currentTime+3.5),setTimeout(()=>{this.data.isGameOver&&this.stopAudio()},3500)},onRestart:function(){this.isAudioPlaying=!1,this.source&&this.source.disconnect();this.audioAnalyser.gainNode.gain.cancelScheduledValues(0),this.data.analyserEl.addEventListener("audioanalyserbuffersource",e=>{this.source=e.detail,this.el.sceneEl.emit("songloadfinish",null,!1)},r),this.audioAnalyser.refreshSource()},onWallHitStart:function(){this.audioAnalyser.gainNode.gain.linearRampToValueAtTime(.1,this.context.currentTime+.1)},onWallHitEnd:function(){this.audioAnalyser.gainNode.gain.linearRampToValueAtTime(.5,this.context.currentTime+.1)},startAudio:function(){this.audioAnalyser.gainNode.gain.setValueAtTime(.5,this.context.currentTime),this.songStartTime=this.context.currentTime,this.source.onended=this.onSongComplete,this.source.start(0,i||0),this.isAudioPlaying=!0},getCurrentTime:function(){return this.context.currentTime-this.songStartTime}}),window.AFRAME){const t=["song"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){"use strict";n.r(t);var r=n(0),i=n.n(r);const o=[{name:"bgcolor",property:"backglow.color"},{name:"leftglow",property:"leftsideglow.color"},{name:"rightglow",property:"rightsideglow.color"}],a=[{id:"off",dur:500,to:"off"},{id:"primary",dur:5,to:"primary"},{id:"primarybright",dur:500,from:"tertiary",to:"primarybright"},{id:"secondary",dur:5,to:"secondary"},{id:"secondarybright",dur:500,from:"tertiary",to:"secondarybright"}],s=["off","secondary","secondary","secondarybright","","primary","primary","primarybright","primarybright"];AFRAME.registerComponent("stage-colors",{schema:{colorScheme:{default:"default"}},init:function(){this.el.addEventListener("cleargame",this.resetColors.bind(this)),this.el.sceneEl.addEventListener("playbuttonclick",this.resetColors.bind(this)),function(e,t){for(let n=0;n<o.length;n++){const r=o[n];for(let n=0;n<a.length;n++){const o=a[n];e.setAttribute(`animation__${r.name}${o.id}`,{property:"systems.materials."+r.property,type:"color",isRawProperty:!0,easing:"linear",dur:o.dur,from:o.from?i.a.schemes[t][o.from]:"",startEvents:`${r.name}${o.id}`,to:i.a.schemes[t][o.to]})}}}(this.el.sceneEl,this.data.colorScheme)},update:function(e){e.colorScheme&&this.data.colorScheme!==e.colorScheme&&function(e,t){for(let n=0;n<o.length;n++){const r=o[n];for(let n=0;n<a.length;n++){const o=a[n],s=`animation__${r.name}${o.id}`;o.from&&e.setAttribute(s,"from",i.a.schemes[t][o.from]),e.setAttribute(s,"to",i.a.schemes[t][o.to])}}}(this.el.sceneEl,this.data.colorScheme)},play:function(){this.el.emit("bgcolorsecondary",null,!1)},setColor:function(e,t){s[t]||(t=5),e.startsWith("curve")?this.el.emit(e+"stageeventcolor",s[t].replace("bright",""),!1):this.el.emit(`${e}color${s[t]}`,null,!1)},setColorInstant:function(e,t){const n=this.el.sceneEl.systems.materials;if("stars"===e){let e;return e=0===t?i.a.schemes[this.data.colorScheme].secondarybright:i.a.schemes[this.data.colorScheme].secondary,void l(n.stars,"color",e)}const r=i.a.schemes[this.data.colorScheme][s[t]];"moon"===e&&l(n.moon,"tint",r)},resetColors:function(){this.el.emit("bgcolorsecondary",null,!1),this.el.emit("curveevenstageeventcolor","off",!1),this.el.emit("curveoddstageeventcolor","off",!1)}});const c=new THREE.Color;function l(e,t,n){c.set(n),e.uniforms?(e.uniforms[t].value.x=c.r,e.uniforms[t].value.y=c.g,e.uniforms[t].value.z=c.b):e[t].set(n)}if(window.AFRAME){const t=["stage-colors"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("stage-lasers",{schema:{enabled:{default:!0}},init:function(){this.speed=0,this.lasers=[this.el.children[0].object3D,this.el.children[1].object3D,this.el.children[2].object3D]},pulse:function(e){this.speed=e/8},tick:function(e,t){0!==this.speed&&(t/=1e3,!this.data.enabled&&(this.speed*=.97,Math.abs(this.speed)<.01)?this.speed=0:(this.lasers[0].rotation.z+=this.speed*t,this.lasers[1].rotation.z-=this.speed*t*1.01,this.lasers[2].rotation.z+=this.speed*t*1.02))}}),window.AFRAME){const t=["stage-lasers"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r=n(0);if(AFRAME.registerComponent("stars",{schema:{color:{type:"color",default:r.initial.secondary},count:{default:500},radius:{default:300}},init:function(){const e=()=>(Math.random()-.5)*this.data.radius*2,t=new THREE.BufferGeometry;this.material=this.el.sceneEl.systems.materials.stars;const n=[];for(let t=0;t<this.data.count;t++)n.push(e(),e(),4*e());t.setAttribute("position",new THREE.Float32BufferAttribute(n,3)),t.computeBoundingSphere();const r=new THREE.Points(t,this.material);this.el.setObject3D("stars",r)},update:function(){this.material.color.setStyle(this.data.color)}}),window.AFRAME){const t=["stars"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("stats-param",{init:function(){"true"===AFRAME.utils.getUrlParameter("stats")&&this.el.setAttribute("stats","")}}),window.AFRAME){const t=["stats-param"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("stepback",{init:function(){this.message=document.getElementById("stepback"),this.camera=document.getElementById("camera"),this.lastTime=0,this.limit=-.9,this.throttling=300},tick:function(e,t){if(!(e-this.lastTime<this.throttling)){var n=this.camera.object3D.position,r=this.message.object3D.position;n.z<this.limit?(this.throttling=10,this.message.object3D.visible=!0,this.message.getObject3D("mesh").material.opacity=1-Math.abs(n.z-r.z),r.x=n.x,r.y=n.y):(this.message.object3D.visible=!1,this.throttling=500),this.lastTime=e}}}),window.AFRAME){const t=["stepback"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("sub-object",{schema:{from:{type:"selector"},name:{type:"string"}},init:function(){var e=this.el,t=this.data;t.from.addEventListener("model-loaded",n=>{const r=n.detail.model.getObjectByName(t.name);e.setObject3D("mesh",r.clone()),e.setAttribute("material","shader","flat"),e.emit("subobjectloaded",null,!1)})}}),window.AFRAME){const t=["sub-object"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){var r={superkeyboard:{wrapCount:30,inputOffsetY:.008,inputOffsetX:.08,img:"keyboard.png",hoverImg:"keyboard-hover.png",layout:[{key:"1",x:.013,y:.03,w:.093,h:.176},{key:"2",x:.106,y:.03,w:.088,h:.176},{key:"3",x:.194,y:.03,w:.077,h:.176},{key:"4",x:.271,y:.03,w:.085,h:.176},{key:"5",x:.356,y:.03,w:.081,h:.176},{key:"6",x:.437,y:.03,w:.081,h:.176},{key:"8",x:.603,y:.03,w:.082,h:.176},{key:"7",x:.519,y:.03,w:.084,h:.176},{key:"9",x:.685,y:.03,w:.076,h:.176},{key:"0",x:.76,y:.03,w:.088,h:.176},{key:"Delete",x:.867,y:.03,w:.124,h:.176},{key:"q",x:.013,y:.213,w:.098,h:.186},{key:"w",x:.111,y:.213,w:.107,h:.186},{key:"e",x:.218,y:.213,w:.096,h:.186},{key:"r",x:.313,y:.213,w:.095,h:.186},{key:"t",x:.408,y:.213,w:.094,h:.186},{key:"y",x:.503,y:.213,w:.099,h:.186},{key:"u",x:.602,y:.213,w:.097,h:.186},{key:"i",x:.701,y:.213,w:.085,h:.186},{key:"o",x:.786,y:.213,w:.099,h:.186},{key:"p",x:.885,y:.213,w:.097,h:.186},{key:"a",x:.063,y:.408,w:.1,h:.182},{key:"s",x:.163,y:.408,w:.097,h:.182},{key:"d",x:.26,y:.408,w:.098,h:.182},{key:"f",x:.358,y:.408,w:.094,h:.182},{key:"g",x:.452,y:.408,w:.1,h:.182},{key:"h",x:.552,y:.408,w:.105,h:.182},{key:"j",x:.657,y:.408,w:.085,h:.182},{key:"k",x:.743,y:.408,w:.105,h:.182},{key:"l",x:.848,y:.408,w:.1,h:.182},{key:"z",x:.107,y:.596,w:.106,h:.197},{key:"x",x:.213,y:.596,w:.1,h:.197},{key:"c",x:.313,y:.596,w:.093,h:.197},{key:"v",x:.406,y:.596,w:.096,h:.197},{key:"b",x:.502,y:.596,w:.093,h:.197},{key:"n",x:.595,y:.596,w:.099,h:.197},{key:"m",x:.694,y:.596,w:.106,h:.197},{key:" ",x:.372,y:.798,w:.249,h:.169},{key:"Insert",x:.017,y:-.001,w:.038,h:.018}]}};if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");var i={roboto:17,aileronsemibold:20,dejavu:20.5,exo2bold:20,exo2semibold:20.3,kelsonsans:22.8,monoid:19.5,mozillavr:9.5,sourcecodepro:20.3};function o(e,t){for(var n=0;n<e.length;n++)if(e[n].id===t)return e[n];return null}if(AFRAME.registerComponent("super-keyboard",{schema:{align:{default:"left",oneOf:["left","center","right"]},blinkingSpeed:{type:"int",default:400},filters:{type:"array"},font:{default:"aileronsemibold"},hand:{type:"selector"},imagePath:{default:"."},injectToRaycasterObjects:{default:!0},inputColor:{type:"color",default:"#6699ff"},interval:{type:"int",default:50},keyBgColor:{type:"color",default:"#000"},keyColor:{type:"color",default:"#6699ff"},keyHoverColor:{type:"color",default:"#1A407F"},keyPressColor:{type:"color",default:"#5290F6"},label:{type:"string",default:""},labelColor:{type:"color",default:"#aaa"},maxLength:{type:"int",default:0},model:{default:"basic"},show:{default:!0},multipleInputs:{default:!1},value:{type:"string",default:""},width:{default:.8}},init:function(){this.el.addEventListener("click",this.click.bind(this)),this.changeEventDetail={},this.textInputObject={},this.keys=null,this.focused=!1,this.keyHover=null,this.prevCheckTime=null,this.shift=!1,this.rawValue=this.data.value,this.defaultValue=this.data.value,this.userFilterFunc=null,this.intervalId=0,this.kbImg=document.createElement("a-entity"),this.kbImg.classList.add("keyboardRaycastable"),this.kbImg.classList.add("superKeyboardImage"),this.kbImg.addEventListener("raycaster-intersected",this.hover.bind(this)),this.kbImg.addEventListener("raycaster-intersected-cleared",this.blur.bind(this)),this.el.appendChild(this.kbImg),this.label=document.createElement("a-entity"),this.label.setAttribute("text",{align:"center",font:this.data.font,baseline:"bottom",lineHeight:40,shader:"msdf",negate:!0,value:this.data.label,color:this.data.labelColor,width:this.data.width,wrapCount:30}),this.el.appendChild(this.label),this.textInput=document.createElement("a-entity"),this.textInput.setAttribute("mixin","superKeyboardTextInput"),this.textInput.setAttribute("text",{align:this.data.align,font:this.data.font,lineHeight:35,shader:"msdf",value:this.data.value,color:this.data.inputColor,width:this.data.width}),this.el.appendChild(this.textInput),this.cursor=document.createElement("a-entity"),this.cursor.object3D.position.set(0,0,.001),this.cursor.setAttribute("material",{shader:"flat",color:this.data.inputColor}),this.textInput.appendChild(this.cursor),this.cursorUpdated=!1,this.keyBgColor=new THREE.Color,this.keyHoverColor=new THREE.Color,this.keyPressColor=new THREE.Color;var e=this;document.addEventListener("keydown",(function(t){if("t"===t.key){for(var n="",r="abcdefghijklmopqrstuvQWIEUTGASDLIGKBXACQWETL102394676457",i=Math.floor(20*Math.random()),o=0;o<i;o++)n+=r[Math.floor(Math.random()*r.length)];e.el.setAttribute("super-keyboard",{value:n})}})),document.addEventListener("show",this.open.bind(this)),this.hand=null,this.handListenersSet=!1,this.raycaster=null},update:function(e){var t=r[this.data.model],n=this.data.width,i=this.data.width/2;if(void 0!==t){e&&this.defaultValue===e.defaultValue?this.updateTextInput(this.filter(this.rawValue)):(this.rawValue=this.data.value,this.defaultValue=this.data.value,this.updateTextInput(this.filter(this.data.value))),this.data.width===e.width&&this.data.height===e.height&&this.data.keyColor===e.keyColor||(this.kbImg.setAttribute("geometry",{primitive:"plane",width:n,height:i}),this.kbImg.setAttribute("material",{shader:"flat",src:this.data.imagePath+"/"+t.img,color:this.data.keyColor,transparent:!0})),this.data.label===e.label&&this.data.labelColor===e.labelColor&&this.data.width===e.width||(this.label.setAttribute("text",{value:this.data.label,color:this.data.labelColor,width:this.data.width}),this.label.object3D.position.set(0,.3*n,-.02)),this.data.width===e.width&&this.data.keyBgColor===e.keyBgColor||this.initKeyColorPlane();var o="center"!==this.data.align?t.inputOffsetX*n:0;"right"===this.data.align&&(o*=-1),this.data.font===e.font&&this.data.inputColor===e.inputColor&&this.data.width===e.width&&this.data.align===e.align||this.textInput.setAttribute("text",{font:this.data.font,color:this.data.inputColor,width:n,wrapCount:t.wrapCount,align:this.data.align});for(var a=0;a<t.layout.length;a++){var s=t.layout[a];"Insert"===s.key&&(this.inputRect=s)}this.textInput.object3D.position.set(o,n/4-(this.inputRect.y+this.inputRect.h/2)*n/2+t.inputOffsetY*n,.002),this.data.width!==e.width&&this.cursor.setAttribute("geometry",{primitive:"plane",width:.03*n,height:.01*n}),this.updateCursorPosition(),this.setupHand(),this.keyBgColor.set(this.data.keyBgColor),this.keyHoverColor.set(this.data.keyHoverColor),this.keyPressColor.set(this.data.keyPressColor),this.data.show?this.open():this.close()}else console.error('super-keyboard ERROR: model "'+this.data.model+'" undefined.')},tick:function(e){var t;if(!(this.prevCheckTime&&e-this.prevCheckTime<this.data.interval))if(this.prevCheckTime){if(this.raycaster&&this.focused&&(t=this.raycaster.getIntersection(this.kbImg)))for(var n=t.uv,i=r[this.data.model].layout,o=0;o<i.length;o++){var a=i[o];if(n.x>a.x&&n.x<a.x+a.w&&1-n.y>a.y&&1-n.y<a.y+a.h){this.keyHover!==a&&(this.keyHover=a,this.updateKeyColorPlane(this.keyHover.key,this.keyHoverColor));break}}}else this.prevCheckTime=e},play:function(){this.cursorUpdated&&this.startBlinking()},pause:function(){this.stopBlinking()},initKeyColorPlane:function(){var e=this.keyColorPlane=document.createElement("a-entity");e.classList.add("superKeyboardKeyColorPlane"),e.object3D.position.z=.001,e.object3D.visible=!1,e.setAttribute("geometry",{primitive:"plane"}),e.setAttribute("material",{shader:"flat",color:this.data.keyBgColor,transparent:!0}),e.addEventListener("componentinitialized",(function(e){"material"===e.detail.name&&(this.getObject3D("mesh").material.blending=THREE.AdditiveBlending)})),this.el.appendChild(e)},updateKeyColorPlane:function(e,t){var n=r[this.data.model],i=this.keyColorPlane;if(e){for(var o=0;o<n.layout.length;o++){var a=n.layout[o];if(a.key===e){var s=this.data.width,c=this.data.width/2,l=s/2,u=c/2,h=a.w*s,d=a.h*c;i.object3D.scale.x=h,i.object3D.scale.y=d,i.object3D.position.x=a.x*s-l+h/2,i.object3D.position.y=(1-a.y)*c-u-d/2,i.getObject3D("mesh").material.color.copy(t);break}}i.object3D.visible=!0}else i.object3D.visible=!1},setupHand:function(){if(this.hand&&this.hand.ownRaycaster&&this.hand.removeAttribute("raycaster"),this.data.hand?this.hand=this.data.hand:this.hand=document.querySelector(["[cursor]","[vive-controls]","[tracked-controls]","[gearvr-controls]","[oculus-go-controls]","[oculus-touch-controls]","[windows-motion-controls]","[hand-controls]","[daydream-controls] [cursor] > [raycaster]"].join(",")),this.hand){if(!this.hand.hasLoaded)return void this.hand.addEventListener("loaded",this.setupHand.bind(this));var e=this.hand.components.raycaster,t={};if(e){if(this.hand.ownRaycaster=!1,this.data.injectToRaycasterObjects){var n=e.data.objects.split(",");-1===n.indexOf(".keyboardRaycastable")&&n.push(".keyboardRaycastable"),t.objects=n.join(",").replace(/^,/,""),this.hand.setAttribute("raycaster",t)}}else this.hand.ownRaycaster=!0,t.showLine=this.data.show,t.enabled=this.data.show,this.data.injectToRaycasterObjects&&(t.objects=".keyboardRaycastable"),this.hand.setAttribute("raycaster",t);this.raycaster=this.hand.components.raycaster}else console.error('super-keyboard: no controller found. Add <a-entity> with controller or specify with super-keyboard="hand: #selectorToController".')},filter:function(e){if(""===e)return"";for(var t=0;t<this.data.filters.length;t++)switch(this.data.filters[t]){case"custom":this.userFilterFunc&&(e=this.userFilterFunc(e));break;case"allupper":e=e.toUpperCase();break;case"alllower":e=e.toLowerCase();break;case"title":e=e.split(" ").map((function(e){return e[0].toUpperCase()+e.substr(1)})).join(" ");break;case"numbers":e=e.split("").filter((function(e){return!isNaN(parseInt(e))||"."===e})).join("");break;case"first":e=e[0].toUpperCase()+e.substr(1);break;case"trim":e=e.trim()}return this.data.maxLength>0?e.substr(0,this.data.maxLength):e},click:function(e){if(this.keyHover){switch(this.keyHover.key){case"Enter":this.accept();break;case"Insert":return;case"Delete":this.rawValue=this.rawValue.substr(0,this.rawValue.length-1);var t=this.filter(this.rawValue);this.el.setAttribute("super-keyboard","value",t),this.updateTextInput(t),this.changeEventDetail.value=t,this.el.emit("superkeyboardchange",this.changeEventDetail);break;case"Shift":this.shift=!this.shift,this.keyHover.el.setAttribute("material","color",this.shift?this.data.keyHoverColor:this.data.keyBgColor);break;case"Escape":this.dismiss();break;default:if(this.data.maxLength>0&&this.rawValue.length>this.data.maxLength)break;this.rawValue+=this.shift?this.keyHover.key.toUpperCase():this.keyHover.key;t=this.filter(this.rawValue);this.el.setAttribute("super-keyboard","value",t),this.updateTextInput(t),this.changeEventDetail.value=t,this.el.emit("superkeyboardchange",this.changeEventDetail)}this.updateKeyColorPlane(this.keyHover.key,this.keyPressColor);var n=this;setTimeout((function(){n.updateKeyColorPlane(n.keyHover.key,n.keyHoverColor)}),100),this.updateCursorPosition()}},open:function(){this.el.object3D.visible=!0,this.hand&&this.hand.ownRaycaster&&this.hand.setAttribute("raycaster",{showLine:!0,enabled:!0})},close:function(){this.el.object3D.visible=!1,this.hand&&this.hand.ownRaycaster&&this.hand.setAttribute("raycaster",{showLine:!1,enabled:!1})},accept:function(){this.el.emit("superkeyboardinput",{value:this.data.value}),this.data.multipleInputs?(this.rawValue="",this.data.value="",this.updateTextInput("")):(this.el.object3D.visible=!1,this.hand&&this.hand.ownRaycaster&&this.hand.setAttribute("raycaster",{showLine:!1,enabled:!1}),this.data.show=!1)},dismiss:function(){this.data.value=this.defaultValue,this.updateTextInput(),this.el.object3D.visible=!1,this.hand&&this.hand.ownRaycaster&&this.hand.setAttribute("raycaster",{showLine:!1,enabled:!1}),this.el.emit("superkeyboarddismiss"),this.data.show=!1},blur:function(e){this.focused=!1,this.keyHover&&"Shift"!==this.keyHover.key&&this.updateKeyColorPlane(this.keyHover.key,this.keyBgColor),this.keyHover=null},hover:function(e){this.focused=!0},startBlinking:function(){this.stopBlinking(),this.intervalId=window.setInterval(this.blink.bind(this),this.data.blinkingSpeed)},stopBlinking:function(){window.clearInterval(this.intervalId),this.intervalId=0},blink:function(){this.cursor.object3D.visible=!this.cursor.object3D.visible},setCustomFilter:function(e){this.userFilterFunc=e},addCustomModel:function(e,t){e&&(r[e]=t)},updateCursorPosition:function(){var e=this.textInput.components.text.currentFont;if(!e){var t=this;return this.cursor.object3D.visible=!1,void window.setTimeout((function(){t.updateCursorPosition(),t.startBlinking()}),700)}var n=this.data.width,a=r[this.data.model],s=-this.inputRect.h/2*n/2.4+a.inputOffsetY*n,c=this.data.width/this.textInput.components.text.data.wrapCount,l=0,u=i[this.textInput.components.text.data.font];void 0===u&&(u=20);for(var h=0;h<this.data.value.length;h++){var d=o(e.chars,this.data.value.charCodeAt(h));l+=d.width+d.xadvance*(32===d.id?2:1)}"center"===this.data.align?l=l*c*u*.0011/2+.02*n:"left"===this.data.align?(l=l*c*u*.0011+.02*n,l-=n/2):"right"===this.data.align&&(l=-l*c*u*.0011-.02*n,l+=n/2),this.cursor.object3D.position.set(l,s,.001),this.cursorUpdated=!0},updateTextInput:function(e){this.textInputObject.value=e||this.data.value,this.textInput.setAttribute("text",this.textInputObject)}}),window.AFRAME){const t=["super-keyboard"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r=new THREE.Color;if(AFRAME.registerComponent("supercurve-color",{init:function(){const e=this.el;e.sceneEl.addEventListener("curveevenstageeventcolor",e=>{e.detail&&"off"!==e.detail?this.setColor("color1",e.detail):this.setColor("color1","primary")}),e.sceneEl.addEventListener("curveoddstageeventcolor",e=>{e.detail&&"off"!==e.detail?this.setColor("color2",e.detail):this.setColor("color2","secondary")})},setColor:function(e,t){const n=this.el.components.material.material.uniforms[e].value,i=this.el.sceneEl.systems.materials.scheme[t];r.set(i),n.x=r.r,n.y=r.g,n.z=r.b}}),window.AFRAME){const t=["supercurve-color"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){"use strict";n.r(t);var r=n(0),i=n.n(r);if(AFRAME.registerShader("supercurve",{schema:{cameraPercent:{type:"number",is:"uniform"},color1:{type:"color",is:"uniform",default:i.a.initial.primary},color2:{type:"color",is:"uniform",default:i.a.initial.secondary},fogColor:{type:"color",is:"uniform",default:i.a.initial.primary},side:{default:"double"},transparent:{default:!0}},fragmentShader:n(173),vertexShader:n(174),update:function(e){this.updateVariables(e,"attribute"),this.updateVariables(e,"uniform"),this.el.sceneEl.systems.materials.registerCurve(this.material)}}),window.AFRAME){const t=[],n=["supercurve"],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t){e.exports="varying vec2 vUvs;\nvarying vec3 vWorldPos;\nuniform vec3 color1;\nuniform vec3 color2;\nuniform vec3 fogColor;\nuniform float opacity;\n\n#define BLACK vec3(0.0)\n#define YELLOW vec3(250.0 / 255.0, 244.0 / 255.0, 180.0 / 255.0)\n\nvoid main() {\n vec3 col;\n\n // Lines.\n float f1 = clamp(sin(vUvs.x * 12.9 + 1.4) - 0.99, 0.0, 1.0) * 80.0;\n float f2 = clamp(sin(3.1416 + vUvs.x * 12.9 + 1.45) - 0.99, 0.0, 1.0) * 80.0;\n\n // Gradients.\n f1 += sin(vWorldPos.y - vWorldPos.x - vWorldPos.z * 0.4 + 1.4) * 0.1 + 0.1;\n f2 += sin(vWorldPos.y - vWorldPos.x - vWorldPos.z * 0.3 + 5.5) * 0.1 + 0.1;\n float f3 = sin(vWorldPos.y - vWorldPos.x - vWorldPos.z * 0.1 + 10.3) * 0.1 + 0.1;\n\n // Build color.\n col = mix(BLACK, color1, f1);\n col = mix(col, color2, f2);\n col = mix(col, YELLOW, f3);\n\n // Fog.\n float far = 100.0;\n float fog = 1.0 - clamp(length(vWorldPos - cameraPosition) / 400.0, 0.0, 1.0);\n\n col = mix(fogColor, col, fog);\n\n // fade beginning and end\n float alpha = 0.0;\n alpha += smoothstep(0.0, 0.003, vUvs.y);\n alpha -= smoothstep(0.997, 1.0, vUvs.y);\n\n gl_FragColor = vec4(col, alpha * (fog * fog));\n}\n"},function(e,t){e.exports="varying vec2 vUvs;\nvarying vec3 vWorldPos;\n\nvoid main() {\n vWorldPos = (modelMatrix * vec4(position, 1.0)).xyz;\n vUvs = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n"},function(e,t,n){n(176),n(177);const r=new THREE.Vector3,i=new THREE.Vector3;if(AFRAME.registerComponent("supercurve",{schema:{debug:{default:!1}},init:function(){this.buffers={},this.curve=null,this.fullLength=null,this.indexes={},this.length=null,this.points=[]},play:function(){this.generateCurve(1500)},generateCurve:function(e){this.length=e,e+=200,this.fullLength=e,this.points.length=0,this.points.push(new THREE.Vector3(0,0,0)),this.points.push(new THREE.Vector3(0,0,-100));let t,n=100;for(let r=2;r<=Math.ceil(e/100)-1;r++)t=this.points[r-1],n+=100,this.points.push(new THREE.Vector3(t.x+(10*Math.random()*2-10),t.y+(10*Math.random()*2-10),-1*n));const r=new THREE.CatmullRomCurve3(this.points),i=e-r.getLength(),o=r.getTangent(1,new THREE.Vector3),a=this.points[this.points.length-1].clone().add(o.multiplyScalar(i));this.points.push(a),this.setCurve(this.points),this.el.emit("supercurvegenerate")},setCurve:function(e){const t=this.buffers,n=(this.data,this.el),o=this.indexes;this.points=e;const a=this.curve=new THREE.CatmullRomCurve3(e),s=a.getLength(),c=a.getSpacedPoints(350),l=s/350,u=new THREE.BufferGeometry;t.position=new Float32Array(2106),t.normal=new Float32Array(2106),t.uvs=new Float32Array(1404),o.position=0,o.normal=0,o.uvs=0;const h=new THREE.Vector3(-1.5,0,-1*l/2),d=new THREE.Vector3(1.5,0,-1*l/2);for(let e=0;e<c.length;e++){const a=e/(c.length-1),s=c[e];if(0===c[e].x&&0===c[e].y&&0===c[e].z?(c[e].set(.001,0,.001),i.y=-1*Math.abs(i.y)):(i.copy(r).cross(c[e]).normalize(),i.y=-1*i.y),this.getPositionRelativeToTangent(a,h,r),t.position[o.position++]=r.x,t.position[o.position++]=r.y,t.position[o.position++]=r.z,t.normal[o.normal++]=i.x,t.normal[o.normal++]=i.y,t.normal[o.normal++]=i.z,t.uvs[o.uvs++]=0,t.uvs[o.uvs++]=a,this.getPositionRelativeToTangent(a,d,r),t.position[o.position++]=r.x,t.position[o.position++]=r.y,t.position[o.position++]=r.z,t.normal[o.normal++]=i.x,t.normal[o.normal++]=i.y,t.normal[o.normal++]=i.z,t.uvs[o.uvs++]=1,t.uvs[o.uvs++]=a,this.data.debug){const e=document.createElement("a-box");e.setAttribute("geometry",{width:.1,height:.1,depth:.1}),e.setAttribute("material",{shader:"flat",color:"#333"}),e.object3D.position.copy(s),e.object3D.position.y+=.1,n.appendChild(e)}}if(u.setAttribute("normal",new THREE.BufferAttribute(t.normal,3)),u.setAttribute("position",new THREE.BufferAttribute(t.position,3)),u.setAttribute("uv",new THREE.BufferAttribute(t.uvs,2)),n.getObject3D("mesh"))n.getObject3D("mesh").geometry=THREE.BufferGeometryUtils.toTrianglesDrawMode(u,THREE.TriangleStripDrawMode);else{const e=new THREE.Mesh(THREE.BufferGeometryUtils.toTrianglesDrawMode(u,THREE.TriangleStripDrawMode));n.setObject3D("mesh",e)}},getPointAt:function(e,t){e=this.songProgressToCurveProgress(e),this.curve.getPointAt(e,t)},getTangentAt:function(e,t){e=this.songProgressToCurveProgress(e),this.curve.getTangentAt(e,t)},getPositionRelativeToTangent:function(){const e=new THREE.Object3D,t=new THREE.Vector3,n=new THREE.Vector3;return function(r,i,o,a){this.curve;return e.parent||this.el.sceneEl.object3D.add(e),r<0?(this.getPointAt(0,e.position),this.getTangentAt(0,n),e.position.addScaledVector(n,r)):r>1?(this.getPointAt(1,e.position),this.getTangentAt(1,n),e.position.addScaledVector(n,r)):(this.getPointAt(r,e.position),this.getTangentAt(r,n)),a?e.lookAt(t.copy(e.position).sub(n)):e.lookAt(t.copy(e.position).add(n)),e.updateMatrixWorld(),o.copy(i),e.localToWorld(o),o}}(),alignToCurve:function(){new THREE.Vector3,new THREE.Vector3;const e=new THREE.Vector3(0,0,-.01),t=new THREE.Vector3;return function(n,r){this.getPositionRelativeToTangent(n,e,t),r.lookAt(t),r.position.y+=.01}}(),songProgressToCurveProgress:function(e){return e*this.length/this.fullLength},curveProgressToSongProgress:function(e){return e*this.fullLength/this.length}}),AFRAME.registerComponent("supercurve-follow",{schema:{enabled:{default:!1},speed:{type:"number"},target:{type:"selector"}},init:function(){this.curveProgress=0,this.songProgress=0},update:function(){this.supercurve=this.data.target.components.supercurve},tick:function(){new THREE.Vector3(0,0,1),new THREE.Vector3;return function(e,t){const n=this.data;this.el;if(!n.enabled||!t)return;if(this.curveProgress>=1)return;const r=this.supercurve,i=r.curve;if(!i)return;this.curveProgress=this.curveProgress||0;const o=n.speed*(t/1e3);if(this.curveProgress+=o/this.supercurve.fullLength,this.data.target.components.material.material.uniforms.cameraPercent.value=this.curveProgress,this.curveProgress>=1)return this.curveProgress=1,void(this.data.target.components.material.material.uniforms.cameraPercent.value=this.curveProgress);i.getPointAt(this.curveProgress,this.el.object3D.position),this.songProgress=r.curveProgressToSongProgress(this.curveProgress),r.alignToCurve(this.songProgress,this.el.object3D)}}()}),window.AFRAME){const t=["supercurve","supercurve-follow"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t){const n=THREE.Math,r=THREE.Vector3,i=THREE.Matrix4;function o(){this.type="Curve",this.arcLengthDivisions=200}var a,s,c;Object.assign(o.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(e,t){var n=this.getUtoTmapping(e);return this.getPoint(n,t)},getPoints:function(e,t){var n;void 0===e&&(e=5),t?(n=t).length=0:n=[];for(var r=0;r<=e;r++)n.push(this.getPoint(r/e));return n},getSpacedPoints:function(e,t){var n;void 0===e&&(e=5),t?(n=t).length=0:n=[];for(var r=0;r<=e;r++)n.push(this.getPointAt(r/e));return n},getLength:(c=[],function(){var e=this.getLengths(void 0,c);return e[e.length-1]}),getLengths:function(e,t){if(void 0===e&&(e=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1,t&&(t.length=0);var n,r,i=t||[],o=this.getPoint(0),a=0;for(i.push(0),r=1;r<=e;r++)a+=(n=this.getPoint(r/e)).distanceTo(o),i.push(a),o=n;return this.cacheArcLengths=i,i},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(e,t){var n,r=this.getLengths(),i=0,o=r.length;n=t||e*r[o-1];for(var a,s=0,c=o-1;s<=c;)if((a=r[i=Math.floor(s+(c-s)/2)]-n)<0)s=i+1;else{if(!(a>0)){c=i;break}c=i-1}if(r[i=c]===n)return i/(o-1);var l=r[i];return(i+(n-l)/(r[i+1]-l))/(o-1)},getTangent:(a=new THREE.Vector3,s=new THREE.Vector3,function(e,t){var n,r=e-1e-4,i=e+1e-4;return r<0&&(r=0),i>1&&(i=1),this.getPoint(r,a),this.getPoint(i,s),t?(n=t).copy(s).sub(a):n=s.clone().sub(a),n.normalize()}),getTangentAt:function(e,t){var n=this.getUtoTmapping(e);return this.getTangent(n,t)},computeFrenetFrames:function(e,t){var o,a,s,c=new r,l=[],u=[],h=[],d=new r,p=new i;for(o=0;o<=e;o++)a=o/e,l[o]=this.getTangentAt(a),l[o].normalize();u[0]=new r,h[0]=new r;var f=Number.MAX_VALUE,m=Math.abs(l[0].x),g=Math.abs(l[0].y),y=Math.abs(l[0].z);for(m<=f&&(f=m,c.set(1,0,0)),g<=f&&(f=g,c.set(0,1,0)),y<=f&&c.set(0,0,1),d.crossVectors(l[0],c).normalize(),u[0].crossVectors(l[0],d),h[0].crossVectors(l[0],u[0]),o=1;o<=e;o++)u[o]=u[o-1].clone(),h[o]=h[o-1].clone(),d.crossVectors(l[o-1],l[o]),d.length()>Number.EPSILON&&(d.normalize(),s=Math.acos(n.clamp(l[o-1].dot(l[o]),-1,1)),u[o].applyMatrix4(p.makeRotationAxis(d,s))),h[o].crossVectors(l[o],u[o]);if(!0===t)for(s=Math.acos(n.clamp(u[0].dot(u[e]),-1,1)),s/=e,l[0].dot(d.crossVectors(u[0],u[e]))>0&&(s=-s),o=1;o<=e;o++)u[o].applyMatrix4(p.makeRotationAxis(l[o],s*o)),h[o].crossVectors(l[o],u[o]);return{tangents:l,normals:u,binormals:h}},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this},toJSON:function(){var e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e},fromJSON:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}),THREE.Curve=o},function(e,t){const n=THREE.Vector3,r=THREE.Curve;function i(){var e=0,t=0,n=0,r=0;function i(i,o,a,s){e=i,t=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(e,t,n,r,o){i(t,n,o*(n-e),o*(r-t))},initNonuniformCatmullRom:function(e,t,n,r,o,a,s){var c=(t-e)/o-(n-e)/(o+a)+(n-t)/a,l=(n-t)/a-(r-t)/(a+s)+(r-n)/s;i(t,n,c*=a,l*=a)},calc:function(i){var o=i*i;return e+t*i+n*o+r*(o*i)}}}var o=new n,a=new i,s=new i,c=new i;function l(e,t,n,i){r.call(this),this.type="CatmullRomCurve3",this.points=e||[],this.closed=t||!1,this.curveType=n||"centripetal",this.tension=i||.5}l.prototype=Object.create(r.prototype),l.prototype.constructor=l,l.prototype.isCatmullRomCurve3=!0,l.prototype.getPoint=function(e,t){var r,i,l,u,h=t||new n,d=this.points,p=d.length,f=(p-(this.closed?0:1))*e,m=Math.floor(f),g=f-m;if(this.closed?m+=m>0?0:(Math.floor(Math.abs(m)/p)+1)*p:0===g&&m===p-1&&(m=p-2,g=1),this.closed||m>0?r=d[(m-1)%p]:(o.subVectors(d[0],d[1]).add(d[0]),r=o),i=d[m%p],l=d[(m+1)%p],this.closed||m+2<p?u=d[(m+2)%p]:(o.subVectors(d[p-1],d[p-2]).add(d[p-1]),u=o),"centripetal"===this.curveType||"chordal"===this.curveType){var y="chordal"===this.curveType?.5:.25,v=Math.pow(r.distanceToSquared(i),y),b=Math.pow(i.distanceToSquared(l),y),_=Math.pow(l.distanceToSquared(u),y);b<1e-4&&(b=1),v<1e-4&&(v=b),_<1e-4&&(_=b),a.initNonuniformCatmullRom(r.x,i.x,l.x,u.x,v,b,_),s.initNonuniformCatmullRom(r.y,i.y,l.y,u.y,v,b,_),c.initNonuniformCatmullRom(r.z,i.z,l.z,u.z,v,b,_)}else"catmullrom"===this.curveType&&(a.initCatmullRom(r.x,i.x,l.x,u.x,this.tension),s.initCatmullRom(r.y,i.y,l.y,u.y,this.tension),c.initCatmullRom(r.z,i.z,l.z,u.z,this.tension));return h.set(a.calc(g),s.calc(g),c.calc(g)),h},l.prototype.copy=function(e){r.prototype.copy.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var i=e.points[t];this.points.push(i.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},l.prototype.toJSON=function(){var e=r.prototype.toJSON.call(this);e.points=[];for(var t=0,n=this.points.length;t<n;t++){var i=this.points[t];e.points.push(i.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e},l.prototype.fromJSON=function(e){r.prototype.fromJSON.call(this,e),this.points=[];for(var t=0,i=e.points.length;t<i;t++){var o=e.points[t];this.points.push((new n).fromArray(o))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},THREE.CatmullRomCurve3=l},function(e,t,n){if(AFRAME.registerShader("superCutFxShader",{schema:{startTime:{type:"float",is:"uniform"},timeMs:{type:"time",is:"uniform"},color:{type:"color",is:"uniform"}},vertexShader:"\n varying vec2 uvs;\n varying vec3 worldPos;\n void main() {\n uvs.xy = uv.xy;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }\n ",fragmentShader:"\n uniform float startTime;\n uniform float timeMs;\n uniform vec3 color;\n varying vec2 uvs;\n varying vec3 worldPos;\n\n void main() {\n float time = (timeMs - startTime) / 2000.0;\n vec2 p = uvs.xy - 0.5;\n float r = p.x * p.x + p.y * p.y;\n float alpha = 1.0 - smoothstep(time - 0.01, time, r);\n alpha *= smoothstep(time - 0.1, time, r);\n alpha *= 1.0 - time * 5.5;\n gl_FragColor = vec4(color, alpha);\n }\n "}),window.AFRAME){const t=[],n=["superCutFxShader"],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r=new THREE.Color;if(AFRAME.registerComponent("supercutfx",{schema:{colorPrimary:{type:"string"},colorSecondary:{type:"string"}},init:function(){this.rigEl=document.getElementById("curveFollowRig"),this.startTime=-1100},createSuperCut:function(e,t){const n=this.el,i=this.el.getObject3D("mesh");i.material.transparent=!0,this.rigEl.object3D.worldToLocal(n.object3D.position.copy(e.position)),n.object3D.position.z-=.25,n.object3D.visible=!0,this.startTime=n.sceneEl.time,r.set("red"===t?this.data.colorPrimary:this.data.colorSecondary);const o=i.material.uniforms.color.value;o.x=r.r,o.y=r.g,o.z=r.b,i.material.uniforms.startTime.value=this.startTime-50,n.play()},tick:function(e){e>this.startTime+1e3&&(this.el.object3D.visible=!1,this.el.pause())}}),window.AFRAME){const t=["supercutfx"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("tail",{schema:{height:{default:.1},segments:{default:10,type:"int"},target:{type:"selector"},width:{default:1}},init:function(){const e=this.data,t=this.geometry=new THREE.PlaneBufferGeometry(e.width,e.height,e.segments,1);t.deleteAttribute("normal"),t.translate(e.width/2,0,0);const n=this.el.sceneEl.systems.materials.handStarTrail,r=new THREE.Mesh(t,n);r.frustumCulled=!1,this.el.setObject3D("mesh",r),this.positions=t.attributes.position.array,this.numVerts=2*e.segments+2,this.geometry=t,this.target=e.target.object3D,this.targetPos=new THREE.Vector3},tick:function(e,t){const n=this.positions,r=this.targetPos;let i,o=this.numVerts/2*3,a=this.data.height/2;for(let e=this.numVerts/2-1;e>0;e--)i=3*e,n[i]=n[i-3],n[i+1]=n[i-2],n[i+2]=n[i-1],i+=o,n[i]=n[i-3],n[i+1]=n[i-2],n[i+2]=n[i-1];this.target.getWorldPosition(r),n[0]=r.x,n[1]=r.y+a,n[2]=r.z-.1,n[o+0]=r.x,n[o+1]=r.y-a,n[o+2]=r.z-.1,this.geometry.attributes.position.needsUpdate=!0}}),window.AFRAME){const t=["tail"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("text-counter",{dependencies:["text"],schema:{decimals:{default:0},dur:{default:2e3,type:"int"},enabled:{default:!1},emit:{default:!1},prefix:{default:""},suffix:{default:""},value:{default:0,type:"float"}},init:function(){this.currentValue=0,this.hasCompleted=!1,this.textValue={value:""}},update:function(e){this.currentValue=0,this.textValue.value=`${this.data.prefix}${this.decimals(0)}${this.data.suffix}`,this.el.setAttribute("text",this.textValue),this.hasCompleted=!1},tick:function(e,t){this.data.enabled&&!this.hasCompleted&&(this.currentValue+=this.data.value*(t/this.data.dur),this.currentValue>=this.data.value&&(this.currentValue=this.data.value,this.data.emit&&this.el.emit("textcounterdone",null,!1),this.hasCompleted=!0),this.textValue.value=`${this.data.prefix}${this.decimals(this.currentValue)}${this.data.suffix}`,this.el.setAttribute("text",this.textValue))},decimals:function(e){var t=Math.pow(10,this.data.decimals);return(parseInt(e*t)/t).toFixed(this.data.decimals)}}),window.AFRAME){const t=["text-counter"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("text-truncate",{schema:{value:{type:"string"},length:{type:"int",default:10}},update:function(){this.el.setAttribute("text","value",function(e,t){if(!e)return"";if(e.length>=t)return e.substring(0,t-3)+"...";return e}(this.data.value,this.data.length))}}),window.AFRAME){const t=["text-truncate"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("text-uppercase",{schema:{value:{type:"string"}},update:function(){this.el.setAttribute("text","value",this.data.value.toUpperCase())}}),window.AFRAME){const t=["text-uppercase"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("toggle-pause-play",{schema:{isPlaying:{default:!1}},update:function(){const e=this.data.isPlaying?"pause":"play";parent.postMessage(JSON.stringify({verify:"game-action",action:e}),"*")}}),window.AFRAME){const t=["toggle-pause-play"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){"use strict";n.r(t);var r=n(0),i=n.n(r);if(AFRAME.registerComponent("trail",{schema:{color:{default:"primary"},colorScheme:{default:"default"},enabled:{default:!1},hand:{type:"string"}},init:function(){const e=this.geometry=new THREE.BufferGeometry,t=this.maxPoints=12,n=this.vertices=new Float32Array(36*t),r=this.colors=new Float32Array(48*t);this.bladeColor={alpha:1},this.rigContainer=document.getElementById("rigContainer"),this.bladeEl=this.el.querySelector(".blade"),this.layers=0,this.bladeTrajectory=[{top:new THREE.Vector3(-.5,0,0),center:new THREE.Vector3(0,0,0),bottom:new THREE.Vector3(.5,0,0)},{top:new THREE.Vector3(-.5,.5,0),center:new THREE.Vector3(0,.5,0),bottom:new THREE.Vector3(.5,.5,0)},{top:new THREE.Vector3(-.5,1,0),center:new THREE.Vector3(0,1,0),bottom:new THREE.Vector3(.5,1,0)}],this.newSample=null,e.setAttribute("position",new THREE.BufferAttribute(n,3).setUsage(THREE.DynamicDrawUsage)),e.setAttribute("vertexColor",new THREE.BufferAttribute(r,4).setUsage(THREE.DynamicDrawUsage));const i=new THREE.ShaderMaterial({side:THREE.DoubleSide,vertexColors:THREE.VertexColors,transparent:!0,depthTest:!1,blending:THREE.AdditiveBlending,vertexShader:["varying vec4 vColor;","attribute vec4 vertexColor;","void main() {","vec4 modelViewPosition = modelViewMatrix * vec4(position, 1.0);","vColor = vertexColor;","gl_Position = projectionMatrix * modelViewPosition;","}"].join(""),fragmentShader:["varying vec4 vColor;","uniform float pulse;","void main() {","gl_FragColor = vec4(vColor.xyz, vColor.a + pulse);","}"].join(""),uniforms:{pulse:{value:0}}}),o=this.mesh=new THREE.Mesh(e,i);o.frustumCulled=!1,o.vertices=n,this.rigContainer.setObject3D("trail__"+this.data.hand,o)},update:function(e){if(this.mesh.visible=this.data.enabled,!e.enabled&&this.data.enabled&&(this.enabledTime=this.el.sceneEl.time),e.colorScheme!==this.data.colorScheme){this.bladeColor=new THREE.Color(i.a.schemes[this.data.colorScheme][this.data.color]);this.bladeColor.red=this.bladeColor.r,this.bladeColor.green=this.bladeColor.g,this.bladeColor.blue=this.bladeColor.b}},tock:function(e,t){this.data.enabled&&(!this.mesh.visible&&e>this.enabledTime+250&&(this.mesh.visible=!0),this.mesh.material.uniforms.pulse.value*=.9,this.sampleBladePosition())},pulse:function(){this.mesh.material.uniforms.pulse.value=1},addLayer:function(e){const t=this.bladeColor,n=this.colors,r=this.segments,i=this.vertices;let o=2/r;this.layers>=this.maxLayers&&(this.layers=0);const a=this.layers*e;e=a+e;const s=this.layers*r*18,c=this.layers*r*24;for(let l=0;l<r;++l)i[s+18*l]=l*o-1,i[s+18*l+1]=a,i[s+18*l+2]=0,n[c+24*l]=t.red,n[c+24*l+1]=t.green,n[c+24*l+2]=t.blue,n[c+24*l+3]=t.alpha,i[s+18*l+3]=l*o-1,i[s+18*l+4]=e,i[s+18*l+5]=0,n[c+24*l+4]=t.red,n[c+24*l+5]=t.green,n[c+24*l+6]=t.blue,n[c+24*l+7]=t.alpha,i[s+18*l+6]=l*o-1+o,i[s+18*l+7]=e,i[s+18*l+8]=0,n[c+24*l+8]=t.red,n[c+24*l+9]=t.green,n[c+24*l+10]=t.blue,n[c+24*l+11]=t.alpha,i[s+18*l+9]=l*o-1+o,i[s+18*l+10]=a,i[s+18*l+11]=0,n[c+24*l+12]=t.red,n[c+24*l+13]=t.green,n[c+24*l+14]=t.blue,n[c+24*l+15]=t.alpha,i[s+18*l+12]=l*o-1,i[s+18*l+13]=a,i[s+18*l+14]=0,n[c+24*l+16]=t.red,n[c+24*l+17]=t.green,n[c+24*l+18]=t.blue,n[c+24*l+19]=t.alpha,i[s+18*l+15]=l*o-1+o,i[s+18*l+16]=e,i[s+18*l+17]=0,n[c+24*l+20]=t.red,n[c+24*l+21]=t.green,n[c+24*l+22]=t.blue,n[c+24*l+23]=t.alpha;this.layers++,this.geometry.attributes.position.needsUpdate=!0,this.geometry.attributes.vertexColor.needsUpdate=!0,this.geometry.attributes.uv.needsUpdate=!0},initGeometry:function(){const e=this.bladeColor,t=this.geometry.attributes.vertexColor.array,n=this.geometry.attributes.position.array,r=this.bladeTrajectory;let i,o,a;for(let s=1;s<r.length;s++){1===s&&(o=i),i=1-(r.length-s)/r.length;const c=r[s];a=r[s-1],n[36*s]=a.center.x,n[36*s+1]=a.center.y,n[36*s+2]=a.center.z,t[48*s]=e.red,t[48*s+1]=e.green,t[48*s+2]=e.blue,t[48*s+3]=.2*o,n[36*s+3]=c.top.x,n[36*s+4]=c.top.y,n[36*s+5]=c.top.z,t[48*s+4]=e.red,t[48*s+5]=e.green,t[48*s+6]=e.blue,t[48*s+7]=i,n[36*s+6]=a.top.x,n[36*s+7]=a.top.y,n[36*s+8]=a.top.z,t[48*s+8]=e.red,t[48*s+9]=e.green,t[48*s+10]=e.blue,t[48*s+11]=o,n[36*s+9]=a.center.x,n[36*s+10]=a.center.y,n[36*s+11]=a.center.z,t[48*s+12]=e.red,t[48*s+13]=e.green,t[48*s+14]=e.blue,t[48*s+15]=.2*o,n[36*s+12]=c.center.x,n[36*s+13]=c.center.y,n[36*s+14]=c.center.z,t[48*s+16]=e.red,t[48*s+17]=e.green,t[48*s+18]=e.blue,t[48*s+19]=.2*i,n[36*s+15]=c.top.x,n[36*s+16]=c.top.y,n[36*s+17]=c.top.z,t[48*s+20]=e.red,t[48*s+21]=e.green,t[48*s+22]=e.blue,t[48*s+23]=i,n[36*s+18]=a.bottom.x,n[36*s+19]=a.bottom.y,n[36*s+20]=a.bottom.z,t[48*s+24]=e.red,t[48*s+25]=e.green,t[48*s+26]=e.blue,t[48*s+27]=0,n[36*s+21]=c.center.x,n[36*s+22]=c.center.y,n[36*s+23]=c.center.z,t[48*s+28]=e.red,t[48*s+29]=e.green,t[48*s+30]=e.blue,t[48*s+31]=.2*i,n[36*s+24]=a.center.x,n[36*s+25]=a.center.y,n[36*s+26]=a.center.z,t[48*s+32]=e.red,t[48*s+33]=e.green,t[48*s+34]=e.blue,t[48*s+35]=.2*o,n[36*s+27]=a.bottom.x,n[36*s+28]=a.bottom.y,n[36*s+29]=a.bottom.z,t[48*s+36]=e.red,t[48*s+37]=e.green,t[48*s+38]=e.blue,t[48*s+39]=0,n[36*s+30]=c.bottom.x,n[36*s+31]=c.bottom.y,n[36*s+32]=c.bottom.z,t[48*s+40]=e.red,t[48*s+41]=e.green,t[48*s+42]=e.blue,t[48*s+43]=0,n[36*s+33]=c.center.x,n[36*s+34]=c.center.y,n[36*s+35]=c.center.z,t[48*s+44]=e.red,t[48*s+45]=e.green,t[48*s+46]=e.blue,t[48*s+47]=.2*i,o=i}this.geometry.attributes.position.needsUpdate=!0,this.geometry.attributes.vertexColor.needsUpdate=!0},sampleBladePosition:function(){let e;this.bladeTrajectory.length===this.maxPoints?(e=this.newSample=this.bladeTrajectory.shift(),e.top.set(0,-.5,0),e.center.set(0,0,0),e.bottom.set(0,.5,0)):this.newSample?(this.newSample.top.set(0,-.5,0),this.newSample.center.set(0,0,0),this.newSample.bottom.set(0,.5,0),e=this.newSample):e={top:new THREE.Vector3(0,-.5,0),center:new THREE.Vector3(0,0,0),bottom:new THREE.Vector3(0,.5,0)};const t=this.bladeEl.object3D;t.localToWorld(e.top),t.localToWorld(e.center),t.localToWorld(e.bottom),this.rigContainer.object3D.worldToLocal(e.top),this.rigContainer.object3D.worldToLocal(e.center),this.rigContainer.object3D.worldToLocal(e.bottom),this.bladeTrajectory.push(e),this.initGeometry()}}),window.AFRAME){const t=["trail"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("tunnels",{dependencies:["pool_tunnels"],schema:{isPlaying:{default:!1},songDuration:{default:0}},init:function(){this.addTunnel=this.addTunnel.bind(this),this.clearTunnels=this.clearTunnels.bind(this),this.curveEl=document.getElementById("curve"),this.curveFollowRig=document.getElementById("curveFollowRig"),this.timeout=0,this.tunnels=[],this.tick=AFRAME.utils.throttleTick(this.tick.bind(this),1e3),this.el.addEventListener("cleargame",this.clearTunnels),this.el.addEventListener("gamemenuexit",this.clearTunnels),this.el.addEventListener("gamemenurestart",this.clearTunnels)},update:function(e){!e.isPlaying&&this.data.isPlaying&&this.requestTunnel(),e.isPlaying&&!this.data.isPlaying&&this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},play:function(){this.pool=this.el.components.pool__tunnels},requestTunnel:function(){this.timeout=setTimeout(this.addTunnel,Math.floor(3e3+1e4*Math.random()))},addTunnel:function(){const e=this.pool.requestEntity();if(!e)return;e.setAttribute("render-order","tunnel"),e.object3D.visible=!0;const t=this.curveEl.components.supercurve;let n=(this.el.components.song.getCurrentTime()+20)/this.data.songDuration;n>1&&(n=1),t.getPointAt(n,e.object3D.position),t.alignToCurve(n,e.object3D),e.play(),this.tunnels.push(e),this.requestTunnel()},clearTunnels:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null);for(let e=0;e<this.tunnels.length;e++)this.tunnels[e].object3D.visible=!1,this.pool.returnEntity(this.tunnels[e]);this.tunnels.length=0},tick:function(e,t){if(0!=this.tunnels.length)for(let e=0;e<this.tunnels.length;e++){if(!(this.tunnels[e].object3D.position.z>this.curveFollowRig.object3D.position.z+5))return;{const t=this.tunnels.splice(e,1)[0];t.object3D.visible=!1,this.pool.returnEntity(t)}}}}),window.AFRAME){const t=["tunnels"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){var r=new THREE.Color;if(AFRAME.registerComponent("vertex-colors-buffer",{schema:{baseColor:{type:"color"},itemSize:{default:3}},update:function(e){var t,n,i,o,a=this.data,s=this.el,c=this;if((o=this.el.getObject3D("mesh"))&&o.geometry)if((i=o.geometry).attributes.position){for(i.attributes.color||i.setAttribute("color",new THREE.BufferAttribute(new Float32Array(i.attributes.position.array.length),3)),t=i.attributes.color.array,r.set(a.baseColor),n=0;n<t.length;n+=a.itemSize)t[n]=r.r,t[n+1]=r.g,t[n+2]=r.b;i.attributes.color.needsUpdate=!0}else console.warn("Geometry has no vertices",s);else s.addEventListener("object3dset",(function t(n){"mesh"===n.detail.type&&(s.removeEventListener("object3dset",t),c.update(e))}))}}),window.AFRAME){const t=["vertex-colors-buffer"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("victory-accuracy-ring",{dependencies:["geometry","material"],schema:{accuracy:{default:0}},update:function(){this.el.getObject3D("mesh").material.uniforms.progress.value=0,this.el.setAttribute("animation","to",this.data.accuracy/100),this.el.components.animation.beginAnimation()}}),window.AFRAME){const t=["victory-accuracy-ring"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r={sphericalEnvMap:"",roughness:.8,metalness:.4},i={sphericalEnvMap:"#envmapImg",roughness:.2,metalness:.6};if(AFRAME.registerComponent("victory-rank",{schema:{isVictory:{default:!1},rank:{type:"string"}},update:function(e){const t=this.el,n=this.data.rank;if(e.isVictory&&!this.data.isVictory&&this.el.object3D.scale.set(.001,.001,.001),n)switch(t.setAttribute("text-geometry","value",n),n[0]){case"S":t.setAttribute("material",Object.assign({color:"#F0e077"},i));break;case"A":t.setAttribute("material",Object.assign({color:"#6FF9EA"},i));break;case"B":t.setAttribute("material",Object.assign({color:"#F8d"},i));break;case"C":t.setAttribute("material",Object.assign({color:"#F971C3"},r));break;case"D":t.setAttribute("material",Object.assign({color:"#1E6269"},r));break;case"F":t.setAttribute("material",Object.assign({color:"#e3170a"},r))}}}),window.AFRAME){const t=["victory-rank"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){if(AFRAME.registerComponent("visible-raycastable",{schema:{default:!0},update:function(){this.el.object3D.visible=this.data,this.data?this.el.setAttribute("raycastable",""):this.el.removeAttribute("raycastable","")}}),window.AFRAME){const t=["visible-raycastable"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r=n(0);if(AFRAME.registerShader("wallShader",{schema:{colorTertiary:{type:"color",is:"uniform",default:r.initial.tertiary},environment:{type:"map",is:"uniform",default:"#envmapImg"},hitLeft:{type:"vec3",is:"uniform",default:{x:0,y:9e3,z:0}},hitRight:{type:"vec3",is:"uniform",default:{x:0,y:9e3,z:0}},iTime:{type:"time",is:"uniform"},opacity:{type:"number",is:"uniform"}},vertexShader:n(192),fragmentShader:n(193)}),window.AFRAME){const t=[],n=["wallShader"],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t){e.exports="varying vec2 uvs;\nvarying vec3 nrml;\nvarying vec3 worldPos;\n\nvoid main() {\n uvs.xy = uv.xy;\n nrml.xyz = normal.xyz;\n vec4 p = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n worldPos = (modelMatrix * vec4( position, 1.0 )).xyz;\n gl_Position = p;\n}\n"},function(e,t){e.exports="uniform float iTime;\nuniform float opacity;\nuniform sampler2D environment;\nuniform vec3 colorTertiary;\nuniform vec3 hitLeft;\nuniform vec3 hitRight;\nvarying vec2 uvs;\nvarying vec3 nrml;\nvarying vec3 worldPos;\n\n#define SEED 19.1252\n#define time (3.0 + iTime) / 1000.0\n\nfloat noise(vec3 uv) {\n return fract(sin(uv.x*123243. + uv.y*424. + uv.z*642. + SEED) * 1524.);\n}\n\nvec4 drawHit(vec3 p, vec3 center, vec3 color) {\n center.z -= 0.1;\n float dist = 1.0 - smoothstep(0.0, 0.3, length(p - center));\n float glitch = noise(floor(p*3.0)) * 0.06 - 0.03;\n float alpha = 1.0 - smoothstep(0.0, 0.01, abs(p.z-center.z + glitch));\n alpha += 1.0 - smoothstep(0.0, 0.01, abs(p.y-center.y + glitch));\n return vec4(color * dist, alpha * dist + alpha);\n}\n\nvoid main() {\n vec2 uv1 = uvs.xy-0.5;\n float alpha = 0.0;\n // border\n alpha += smoothstep(0.44, 0.50, abs(uv1.x));\n alpha += smoothstep(0.44, 0.50, abs(uv1.y));\n alpha += smoothstep(0.486, 0.49, abs(uv1.x));\n alpha += smoothstep(0.486, 0.49, abs(uv1.y));\n alpha = min(1.0, alpha * 0.5);\n\n // weapon collision\n vec4 hit;\n hit = drawHit(worldPos, hitRight, colorTertiary);\n hit += drawHit(worldPos, hitLeft, colorTertiary);\n\n // reflection\n vec3 ray = reflect(normalize(cameraPosition - worldPos + sin(worldPos.z) * 0.1 + cos(worldPos.z * 0.3) * 0.3), nrml);\n float m = 2.0 * sqrt(pow(ray.x, 2.0) + pow(ray.y, 2.0) + pow(ray.z, 2.0));\n vec2 uv = ray.xy / m + 0.5;\n vec3 col = texture2D(environment, uv).rgb * 0.3;\n\n gl_FragColor = vec4(mix(col, colorTertiary, alpha) + hit.rgb, (alpha * 0.2 + 0.8) * opacity + hit.a);\n}\n"},function(e,t,n){"use strict";n.r(t);n(24);if(AFRAME.registerComponent("wall",{dependencies:["material"],init:function(){this.curveEl=document.getElementById("curve"),this.curveFollowRig=document.getElementById("curveFollowRig"),this.el.setObject3D("mesh",new THREE.Mesh),this.geometry=null,this.isCeiling=!1,this.isRaycastable=!1,this.localPosition=new THREE.Vector3,this.songPosition=void 0,this.tick=AFRAME.utils.throttleTick(this.tick.bind(this),1e3)},play:function(){this.el.object3D.visible=!0},tick:function(e,t){const n=this.curveFollowRig.components["supercurve-follow"].songProgress;!this.isRaycastable&&n+.01>=this.songPosition&&(this.isRaycastable=!0,this.el.setAttribute("data-wall-active",""),this.isCeiling||(this.el.setAttribute("data-weapon-particles",""),this.el.setAttribute("raycastable-game",""))),n>=this.backPosition+.01&&this.returnToPool()},onGenerate:function(e,t,n,r,i,o){const a=this.el;this.isCeiling=i,this.backPosition=o,this.songPosition=e,this.setWallGeometry(e,t,n,r,i),a.getObject3D("mesh").material.uniforms.opacity.value=0,a.object3D.position.y=-5,a.components.animation__fadein.beginAnimation(),a.components.animation__scalein.beginAnimation()},setWallGeometry:function(){const e=new THREE.Vector3,t=new THREE.Vector3,n=new THREE.Vector3;return function(r,i,o,a,s){const c=this.el.sceneEl.components["beat-system"],l=this.curveEl.components.supercurve,u=r,h=r+a/l.length,d=s?1.5:2.5,p=-1*c.horizontalPositions[i]-o/2+.25;t.x=p-o/2,n.x=p+o/2;const f=(this.geometry=new THREE.BoxBufferGeometry(o,d,1,1,1,30)).attributes.position.array;for(let r=0;r<f.length;r+=3){const i=f[r+2]+.5;l.getPositionRelativeToTangent(u+i*(h-u),f[r]<0?t:n,e),f[r]=e.x,f[r+1]+=e.y+d/2,f[r+2]=e.z}let m=c.verticalPositions.middle+c.size/2;"punch"===c.data.gameMode&&(m-=.1),this.el.getObject3D("mesh").geometry=this.geometry,this.el.getObject3D("mesh").position.y=s?m:.1}}(),returnToPool:function(){this.el.object3D.visible=!1,this.el.removeAttribute("data-weapon-particles"),this.el.removeAttribute("data-wall-active"),this.el.removeAttribute("raycastable-game"),this.isCeiling=!1,this.isRaycastable=!1,this.el.isPlaying&&this.el.sceneEl.components.pool__wall.returnEntity(this.el),this.geometry&&this.geometry.dispose()}}),window.AFRAME){const t=["wall"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){const r={direction:{x:0,y:-.25,z:-1}},i={direction:{x:0,y:1,z:-1}};if(AFRAME.registerComponent("weapon-particles",{schema:{enabled:{default:!1},gameMode:{default:""},hand:{type:"string"}},init:function(){this.hiddenIntersection={x:999,y:0,z:0},this.intersectedEl=null,this.weaponEnter=this.weaponEnter.bind(this),this.weaponLeave=this.weaponLeave.bind(this)},update:function(e){e.gameMode!==this.data.gameMode&&this.el.setAttribute("raycaster__game","punch"===this.data.gameMode?r:i)},pause:function(){this.el.removeEventListener("mouseenter",this.weaponEnter),this.el.removeEventListener("mouseleave",this.weaponLeave)},play:function(){this.el.addEventListener("mouseenter",this.weaponEnter),this.el.addEventListener("mouseleave",this.weaponLeave)},weaponEnter:function(e){this.data.enabled&&e.target===this.el&&e.detail.intersectedEl.hasAttribute("data-weapon-particles")&&(this.intersectedEl=e.detail.intersectedEl)},weaponLeave:function(e){if(e.detail.target===this.el){if(this.intersectedEl.components.wall||"floor"===this.intersectedEl.id){const e=this.data.hand===RIGHT?"hitRight":"hitLeft";this.intersectedEl.getObject3D("mesh").material.uniforms[e].value=this.hiddenIntersection}this.intersectedEl=null}},tick:function(e,t){if(!this.data.enabled||!this.intersectedEl)return;const n=this.el.components.raycaster__game.getIntersection(this.intersectedEl);if(n&&(this.intersectedEl.components.wall||"floor"===this.intersectedEl.id)){const e="right"===this.data.hand?"hitRight":"hitLeft";this.intersectedEl.getObject3D("mesh").material.uniforms[e].value=n.point}}}),window.AFRAME){const t=["weapon-particles"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){AFRAME.registerComponent("zip-loader",{schema:{difficulties:{type:"array"},isLoading:{default:"false"},version:{type:"string"},directDownload:{type:"string"},bpm:{type:"number"}},init:function(){this.loadingIndicator=document.getElementById("zipLoaderIndicator"),this.cachedZip=null,this.cachedVersion=null,this.message={},this.worker=new Worker("build/zip.js"),this.worker.onmessage=this.onMessage.bind(this),this.worker.onerror=console.error},update:function(e){const t=this.data;e.version&&e.version!==t.version&&this.cachedVersion!==t.version&&(this.message.abort=!0,this.message.difficulties=JSON.stringify(this.data.difficulties),this.message.version=e.version,this.message.directDownload=this.data.directDownload,this.message.bpm=this.data.bpm,this.message.hash=this.data.hash,this.worker.postMessage(this.message)),t.version&&e.version!==t.version&&(this.cachedVersion=null,this.cachedZip=null,this.fetchZip(t.version)),e.isLoading||!this.data.isLoading||this.cachedVersion!==this.data.version||this.cachedZip||this.el.emit("songloaderror")},fetchZip:function(e){this.el.emit("ziploaderstart",null,!1),this.message.abort=!1,this.message.difficulties=JSON.stringify(this.data.difficulties),this.message.version=e,this.message.directDownload=this.data.directDownload,this.message.bpm=this.data.bpm,this.message.hash=this.data.hash,this.worker.postMessage(this.message)},onMessage:function(e){switch(e.data.message){case"error":this.el.emit("songloaderror");break;case"progress":if(e.data.version!==this.data.version)return;this.loadingIndicator.setAttribute("material","progress",e.data.progress);break;case"load":{let t;this.cachedVersion=e.data.version,this.cachedZip=e.data.data;const n=e.data.data.beats;for(t in n)break;if(!t)return this.cachedZip=null,void(e.data.version===this.data.version&&this.el.emit("songloaderror"));e.data.version===this.data.version&&this.el.emit("ziploaderend",e.data.data,!1);break}}}});if(window.AFRAME){const t=["zip-loader"],n=[],r=[];if(e.hot.dispose(e=>{e.needsReplace=!0,t.forEach(e=>{delete AFRAME.components[e];const t=AFRAME.scenes[0].querySelectorAll(`[${e}]`);for(let n=0;n<t.length;n++)t[n].isEntity&&(t[n].setAttribute("data-__hot-"+e,JSON.stringify(t[n].getDOMAttribute(e))),t[n].removeAttribute(e))}),n.forEach(e=>{delete AFRAME.shaders[e];const t=AFRAME.scenes[0].querySelectorAll("[material]");for(let n=0;n<t.length;n++)t[n].isEntity&&t[n].getAttribute("material").shader===e&&(t[n].setAttribute("data-__hot-material",JSON.stringify(t[n].getDOMAttribute("material"))),t[n].removeAttribute("material"))}),r.forEach(e=>{delete AFRAME.systems[e],delete AFRAME.scenes[0].systems[e]})}),e.hot.data&&e.hot.data.needsReplace){t.forEach(e=>{const t="data-__hot-"+e,n=document.querySelectorAll(`[${t}]`);for(let r=0;r<n.length;r++)n[r].setAttribute(e,JSON.parse(n[r].getAttribute(t)),!0),n[r].removeAttribute(t)});const e="data-__hot-material",n=document.querySelectorAll(`[${e}]`);for(let t=0;t<n.length;t++)n[t].setAttribute("material",JSON.parse(n[t].getAttribute(e)),!0),n[t].removeAttribute(e)}e.hot.accept()}},function(e,t,n){var r={"./index.js":198};function i(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=197},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r);n(6);const a=n(29),s={};let c=!1;const l={Easy:"Easy",Expert:"Expert",ExpertPlus:"Expert+",Hard:"Hard",Normal:"Normal"},u={},h={author:"Juancho Pancho",difficulty:"Expert",id:"31",image:"assets/img/molerat.jpg",songDuration:100,songName:"Friday",songLength:100,songSubName:"Rebecca Black"},d="true"===AFRAME.utils.getUrlParameter("skipintro"),p=localStorage.getItem("colorScheme")||"blue";let f=localStorage.getItem("favorites-v2");if(f)try{f=JSON.parse(f)}catch(e){f=[]}else f=[];function m(e){let t=Math.ceil(e.search.results.length/6);e.search.hasPrev=e.search.page>0,e.search.hasNext=e.search.page<t-1,e.search.songNameTexts="",e.search.songSubNameTexts="",e.searchResultsPage.length=0,e.searchResultsPage.__dirty=!0;for(let t=6*e.search.page;t<6*e.search.page+6;t++){const n=e.search.results[t];if(!n)break;e.searchResultsPage.push(n),e.search.songNameTexts+=g(n.metadata.songName,22).toUpperCase()+"\n",e.search.songSubNameTexts+=g(n.metadata.songSubName||n.metadata.songAuthorName||"Unknown Artist",32)+"\n"}for(let t=0;t<e.searchResultsPage.length;t++)e.searchResultsPage[t].index=t;E(e)}function g(e,t){return e?e.length>=t?e.substring(0,t-3)+"...":e:""}AFRAME.registerState({nonBindedStateKeys:["genres"],initialState:{activeHand:localStorage.getItem("hand")||"right",challenge:{audio:"",author:"",difficulty:"",beatmapCharacteristic:"",id:AFRAME.utils.getUrlParameter("challenge"),image:"",isBeatsPreloaded:!1,numBeats:void 0,songDuration:0,songName:"",songNameShort:"",songSubName:"",metadata:{}},colorPrimary:o.a.schemes[p].primary,colorScheme:p,colorSecondary:o.a.schemes[p].secondary,colorSecondaryBright:o.a.schemes[p].secondarybright,colorTertiary:o.a.schemes[p].tertiary,controllerType:"",damage:0,difficultyFilter:"All",difficultyFilterMenuOpen:!1,favorites:f,gameMode:"ride",genre:"",genres:n(199),genreMenuOpen:!1,has3DOFVR:!1,has6DOFVR:!1,hasSongLoadError:!1,hasVR:AFRAME.utils.device.checkHeadsetConnected()||"true"===AFRAME.utils.getUrlParameter("debugvr"),introActive:!d,inVR:"true"===AFRAME.utils.getUrlParameter("debugvr"),isIOS:AFRAME.utils.device.isIOS(),isGameOver:!1,isLoading:!1,isMenuOpening:!d,isPaused:!1,isPlaying:!1,isSearching:!1,isSongProcessing:!1,isVictory:!1,isZipFetching:!1,leaderboard:[],leaderboardFetched:!1,leaderboardQualified:!1,leaderboardNames:"",leaderboardScores:"",mainMenuActive:!1,menuActive:d,multiplayer:{active:!1,lobbyOpen:!1,roomCode:"",shareUrl:"",shareCopied:!1,isHost:!1,uid:"",status:"idle",players:[],playerCount:0,readyCount:0,everyoneReady:!1,myReady:!1,myRank:0,myRankText:"",leaderName:"",leaderScore:0,scoreDelta:0,scoreDeltaText:"",opponentText:"",opponentScores:"",hostName:"",hostUid:"",songName:"",lastError:"",joinCodeInput:"",countdownText:"",countdownActive:!1,keyboardOpen:!1,nameKeyboardOpen:!1,nameInput:"",row0Name:"",row0Score:"",row0Visible:!1,row0IsMe:!1,row0IsHost:!1,row0Ready:!1,row1Name:"",row1Score:"",row1Visible:!1,row1IsMe:!1,row1IsHost:!1,row1Ready:!1,row2Name:"",row2Score:"",row2Visible:!1,row2IsMe:!1,row2IsHost:!1,row2Ready:!1,row3Name:"",row3Score:"",row3Visible:!1,row3IsMe:!1,row3IsHost:!1,row3Ready:!1,resultsText:"",resultsScores:"",winnerName:""},menuDifficulties:[],menuDifficultiesIds:[],menuSelectedChallenge:{author:"",difficulty:"",beatmapCharacteristic:"",downloads:"",downloadsText:"",genre:"",id:"",index:-1,image:"",isFavorited:!1,numBeats:void 0,songDuration:0,songInfoText:"",songLength:void 0,numBeats:void 0,songName:"",songSubName:"",version:"",metadata:{}},optionsMenuOpen:!1,playlist:"",playlists:n(200),playlistMenuOpen:!1,playlistTitle:"",score:{accuracy:100,accuracyScore:0,accuracyInt:100,activePanel:!1,beatsHit:0,beatsMissed:0,beatsText:"",combo:0,finalAccuracy:100,maxCombo:0,rank:"",score:0},search:{activePanel:!0,page:0,hasError:!1,hasNext:!1,hasPrev:!1,query:"",queryText:"",results:[],songNameTexts:"",songSubNameTexts:"",url:"",urlPage:0},searchResultsPage:[],speed:10},handlers:{activehandswap:e=>{e.activeHand="right"===e.activeHand?"left":"right",localStorage.setItem("activeHand",e.activeHand)},beathit:(e,t)=>{e.damage>.25&&(e.damage-=.25),e.score.beatsHit++,e.score.combo++,e.score.combo>e.score.maxCombo&&(e.score.maxCombo=e.score.combo),t.score=isNaN(t.score)?100:t.score,e.score.accuracyScore+=t.percent,e.score.score+=Math.floor(t.score),T(e)},beatmiss:e=>{e.score.beatsMissed++,_(e),T(e)},beatwrong:e=>{e.score.beatsMissed++,_(e),T(e)},beatloaderpreloadfinish:e=>{e.menuActive||(e.challenge.isBeatsPreloaded=!0)},colorschemechange:(e,t)=>{e.colorScheme=t,e.colorPrimary=o.a.schemes[t].primary,e.colorSecondary=o.a.schemes[t].secondary,e.colorSecondaryBright=o.a.schemes[t].secondarybright,e.colorTertiary=o.a.schemes[t].tertiary,localStorage.setItem("colorScheme",t)},controllerconnected:(e,t)=>{e.controllerType=t.name,e.has6DOFVR=-1!==["oculus-quest-controls","oculus-touch-controls","vive-controls","windows-motion-controls","generic-tracked-controller-controls"].indexOf(e.controllerType),e.has3DOFVR=-1!==["oculus-go-controls","daydream-controls"].indexOf(e.controllerType)},debugbeatpositioning:e=>{e.gameMode="classic",e.introActive=!1,e.menuActive=!1},debuggameplay:e=>{w(e),Object.assign(e.challenge,e.menuSelectedChallenge),e.menuActive=!1,e.menuSelectedChallenge.id="",e.isSearching=!1,e.isLoading=!1},debuggameover:e=>{e.isGameOver=!0,e.menuActive=!1},debugloading:e=>{h.id="-1",Object.assign(e.menuSelectedChallenge,h),Object.assign(e.challenge,h),e.menuActive=!1,e.isSongProcessing=!0},debugvictory:e=>{Object.assign(e.menuSelectedChallenge,h),Object.assign(e.challenge,h),e.isVictory=!0,e.leaderboardQualified=!0,e.menuActive=!1,e.score.accuracy=74.99,e.score.beatsHit=125,e.score.beatsMissed=125,e.score.maxCombo=123,e.score.rank="A",e.score.score=9001,e.introActive=!1,A(e)},difficultyfilter:(e,t)=>{e.difficultyFilter=t,e.difficultyFilterMenuOpen=!1,e.menuSelectedChallenge.id=""},difficultyfiltermenuclose:e=>{e.difficultyFilterMenuOpen=!1},difficultyfiltermenuopen:e=>{e.difficultyFilterMenuOpen=!0},displayconnected:e=>{if(e.hasVR=!0,!c)try{"getVRDisplays"in navigator&&navigator.getVRDisplays().then(e=>{e.length&&(c=!0)})}catch(e){}},favoritetoggle:e=>{const t=e.menuSelectedChallenge.id,n=s[t];if(n)if(e.menuSelectedChallenge.isFavorited){e.menuSelectedChallenge.isFavorited=!1;for(let n=0;n<e.favorites.length;n++)if(e.favorites[n].id===t)return e.favorites.splice(n,1),void localStorage.setItem("favorites-v2",JSON.stringify(e.favorites))}else{if(e.menuSelectedChallenge.isFavorited=!0,e.favorites.filter(e=>e.id===t).length)return;e.favorites.push(n),localStorage.setItem("favorites-v2",JSON.stringify(e.favorites))}},gamemenuresume:e=>{e.isPaused=!1},gamemenurestart:e=>{w(e),e.challenge.isBeatsPreloaded=!1,e.isGameOver=!1,e.isPaused=!1,e.isLoading=!0,e.isVictory=!1,e.leaderboardQualified=!1},gamemenuexit:e=>{w(e),e.challenge.isBeatsPreloaded=!1,e.isGameOver=!1,e.isPaused=!1,e.isVictory=!1,e.menuActive=!0,e.menuSelectedChallenge.id=e.challenge.id,e.menuSelectedChallenge.difficulty=e.challenge.difficulty,e.menuSelectedChallenge.beatmapCharacteristic=e.challenge.beatmapCharacteristic,e.menuSelectedChallenge.difficultyId=e.challenge.difficultyId,e.challenge.id="",e.leaderboardQualified=!1,e.multiplayer.active&&(e.multiplayer.lobbyOpen=!0)},gamemode:(e,t)=>{e.gameMode=t},genreclear:e=>{e.genre="",e.menuSelectedChallenge.id=""},genreselect:(e,t)=>{e.genre=t,e.genreMenuOpen=!1,e.menuSelectedChallenge.id="",e.playlist="",e.search.query=""},genremenuclose:e=>{e.genreMenuOpen=!1},genremenuopen:e=>{e.genreMenuOpen=!0},keyboardclose:e=>{e.isSearching=!1},keyboardopen:e=>{e.isSearching=!0,e.menuSelectedChallenge.id=""},leaderboard:(e,t)=>{e.leaderboard.length=0,e.leaderboardFetched=!0,e.leaderboardNames="",e.leaderboardScores="";for(let n=0;n<t.scores.length;n++){let r=t.scores[n];e.leaderboard.push(r),e.leaderboardNames+=`#${n+1} ${g(r.username,18)} (${Math.round(r.accuracy||0)}%)\n`,e.leaderboardScores+=r.score+"\n"}e.leaderboardLoading=!1},leaderboardqualify:e=>{e.has6DOFVR&&(e.leaderboardQualified=!0)},leaderboardscoreadded:(e,t)=>{for(let n=0;n<e.leaderboard.length;n++)if(t.scoreData.score>=e.leaderboard[n].score||n>=e.leaderboard.length-1){e.leaderboard.splice(n,0,t.scoreData);break}e.leaderboardNames="",e.leaderboardScores="";for(let t=0;t<e.leaderboard.length;t++){let n=e.leaderboard[t];e.leaderboardNames+=`${n.username} (${n.accuracy||0}%)\n`,e.leaderboardScores+=n.score+"\n"}},leaderboardsubmit:e=>{e.leaderboardQualified=!1},menuback:e=>{e.difficultyFilterMenuOpen=!1,e.genreMenuOpen=!1,e.isSearching=!1,e.optionsMenuOpen=!1,e.playlistMenuOpen=!1},menuchallengeselect:(e,t)=>{let n=s[t];if(!n)return;Object.assign(e.menuSelectedChallenge,n),e.menuSelectedChallenge.songName=g(n.metadata.songName,24),e.menuDifficulties.length=0,e.menuDifficultiesIds.length=0;const r=JSON.parse(n.metadata.characteristics);for(const t of Object.keys(r))if(!["90Degree","360Degree"].includes(t))for(const n of Object.keys(r[t])){if(null===r[t][n])continue;let i=l[n],o=i;"Standard"!==t&&(o=t+"\n"+o),e.menuDifficulties.unshift({id:t+"-"+n,filename:n+t,difficultyName:i,renderName:o,beatmapCharacteristic:t,difficulty:n})}e.menuDifficulties.sort(b);for(const t of e.menuDifficulties)e.menuDifficultiesIds.push(t.id);const i=e.menuDifficulties[0];e.menuSelectedChallenge.difficulty=i.difficulty,e.menuSelectedChallenge.beatmapCharacteristic=i.beatmapCharacteristic,e.menuSelectedChallenge.difficultyId=i.id,e.menuSelectedChallenge.image=e.menuSelectedChallenge.coverURL,S(e,n),e.challenge.audio="",E(e),e.isSearching=!1;const o=!!e.favorites.filter(e=>e.id===t).length;e.menuSelectedChallenge.isFavorited=o,x(e),e.leaderboardLoading=!0,e.hasSongLoadError=!1,u[t]&&(e.hasSongLoadError=!0)},menuchallengeunselect:e=>{e.menuSelectedChallenge.id="",e.menuSelectedChallenge.difficultyId="",e.menuSelectedChallenge.difficulty="",e.menuSelectedChallenge.beatmapCharacteristic="",x(e)},menudifficultyselect:(e,t)=>{let n;for(const r of e.menuDifficulties)if(r.id===t){n=r;break}e.menuSelectedChallenge.difficultyId=t,e.menuSelectedChallenge.difficulty=n.difficulty,e.menuSelectedChallenge.beatmapCharacteristic=n.beatmapCharacteristic,S(e,e.menuSelectedChallenge),x(e),e.leaderboardLoading=!0},menuopeningend:e=>{e.isMenuOpening=!1},minehit:e=>{_(e)},optionsmenuopen:e=>{e.optionsMenuOpen=!0},mpopen:e=>{e.multiplayer.lobbyOpen=!0,e.multiplayer.active=!0,e.multiplayer.status="idle",e.multiplayer.lastError="","ride"===e.gameMode&&(e.gameMode="classic")},mpclose:e=>{e.multiplayer.lobbyOpen=!1,e.multiplayer.active=!1,e.multiplayer.status="idle"},mpcodeinput:(e,t)=>{const n="string"==typeof t?t:t&&t.value||"";e.multiplayer.joinCodeInput=n.toUpperCase().slice(0,4)},mpnameinput:(e,t)=>{const n="string"==typeof t?t:t&&t.value||"";e.multiplayer.nameInput=n.slice(0,14)},mpkeyboardopen:e=>{e.multiplayer.keyboardOpen=!0},mpkeyboardclose:e=>{e.multiplayer.keyboardOpen=!1},mpnamekeyboardopen:e=>{e.multiplayer.nameKeyboardOpen=!0,e.multiplayer.nameInput=localStorage.getItem("threewsusername")||""},mpnamekeyboardclose:e=>{e.multiplayer.nameKeyboardOpen=!1},mpconnecting:e=>{e.multiplayer.status="connecting",e.multiplayer.lastError=""},mproomjoined:(e,t)=>{e.multiplayer.roomCode=t.code,e.multiplayer.isHost=!!t.isHost,e.multiplayer.status="lobby",e.multiplayer.lobbyOpen=!0,e.multiplayer.active=!0},mproomleft:e=>{e.multiplayer.roomCode="",e.multiplayer.isHost=!1,e.multiplayer.status="idle",e.multiplayer.players.length=0,e.multiplayer.players.__dirty=!0,e.multiplayer.playerCount=0,e.multiplayer.readyCount=0,e.multiplayer.everyoneReady=!1,e.multiplayer.opponentText="",e.multiplayer.opponentScores=""},mperror:(e,t)=>{e.multiplayer.lastError=t&&t.message||"Error","connecting"===e.multiplayer.status&&(e.multiplayer.status="idle")},mproomupdate:(e,t)=>{e.multiplayer.uid=t.uid,e.multiplayer.isHost=!!t.isHost,e.multiplayer.hostUid=t.hostUid||"",e.multiplayer.status=t.status||e.multiplayer.status,e.multiplayer.songName=t.song&&t.song.songName||"",e.multiplayer.players.length=0,e.multiplayer.players.__dirty=!0;const n=t.players.slice(),r=n.slice().sort((e,t)=>(0|t.score)-(0|e.score)),i={};r.forEach((e,t)=>{i[e.uid]=t+1});let a=0,s=!1,c=0,l=r[0]||null,u="",h="",d="",p="",f="";for(let r=0;r<n.length;r++){const i=n[r];e.multiplayer.players.push(i),i.ready&&a++,i.uid===t.uid&&(s=!!i.ready),i.uid===t.hostUid&&(u=i.name)}c=i[t.uid]||0;for(let e=0;e<r.length;e++){const n=r[e],i=Math.round(n.accuracy||0)+"%",o=n.uid===t.uid?" (YOU)":"",a=n.finished?" ✓":"";n.uid!==t.uid&&(h+=`#${e+1} ${g(n.name,12)} ${i}${a}\n`,d+=(0|n.score)+"\n"),p+=`#${e+1} ${g(n.name,14)}${o} ${i}\n`,f+=(0|n.score)+"\n"}for(let r=0;r<4;r++){const i=n[r],a="row"+r;if(!i){e.multiplayer[a+"Name"]="",e.multiplayer[a+"Score"]="",e.multiplayer[a+"Visible"]=!1,e.multiplayer[a+"IsMe"]=!1,e.multiplayer[a+"IsHost"]=!1,e.multiplayer[a+"Ready"]=!1,e.multiplayer[a+"NameColor"]="#ffffff",e.multiplayer[a+"ScoreColor"]="#ffffff",e.multiplayer[a+"BgOpacity"]=0;continue}const s=i.uid===t.uid,c=i.uid===t.hostUid,l=(c?"★ ":"")+g(i.name,14)+(s?" (YOU)":""),u="lobby"===e.multiplayer.status?i.ready?"READY":"...":(0|i.score)+" "+Math.round(i.accuracy||0)+"%"+(i.finished?" ✓":"");e.multiplayer[a+"Name"]=l,e.multiplayer[a+"Score"]=u,e.multiplayer[a+"Visible"]=!0,e.multiplayer[a+"IsMe"]=s,e.multiplayer[a+"IsHost"]=c,e.multiplayer[a+"Ready"]=!!i.ready,e.multiplayer[a+"NameColor"]=s?o.a.schemes[e.colorScheme].secondarybright:"#ffffff",e.multiplayer[a+"ScoreColor"]=i.ready?"#5dff80":"#ffffff",e.multiplayer[a+"BgOpacity"]=s?.18:.06}e.multiplayer.playerCount=n.length,e.multiplayer.readyCount=a,e.multiplayer.everyoneReady=n.length>=2&&a===n.length,e.multiplayer.myReady=s,e.multiplayer.myRank=c,e.multiplayer.myRankText=c?"#"+c+" / "+n.length:"",e.multiplayer.leaderName=l?l.name:"",e.multiplayer.leaderScore=l?0|l.score:0;const m=n.find(e=>e.uid===t.uid),y=(m?0|m.score:0)-(l?0|l.score:0);e.multiplayer.scoreDelta=y,e.multiplayer.scoreDeltaText=l&&l.uid!==t.uid?(y>=0?"+"+y:String(y))+" vs leader":l&&l.uid===t.uid&&n.length>1?"LEADING":"",e.multiplayer.opponentText=h,e.multiplayer.opponentScores=d,e.multiplayer.resultsText=p,e.multiplayer.resultsScores=f,e.multiplayer.winnerName=r.length&&r[0].score>0?r[0].name:"",e.multiplayer.hostName=u},mpcountdown:(e,t)=>{e.multiplayer.countdownText=t&&t.value||"",e.multiplayer.countdownActive=!(!t||!t.active)},mpsharelinkcopied:e=>{e.multiplayer.shareCopied=!0},mpsharelinkcleared:e=>{e.multiplayer.shareCopied=!1},mpremotesongselect:(e,t)=>{Object.assign(e.menuSelectedChallenge,{id:t.id,difficulty:t.difficulty,beatmapCharacteristic:t.beatmapCharacteristic,difficultyId:t.difficultyId,songName:t.songName,songSubName:t.songSubName,image:t.image,version:t.version,directDownload:t.directDownload,downloads:t.downloads,downloadsText:t.downloadsText,songDuration:t.songDuration,metadata:t.metadata||{}}),s[t.id]=e.menuSelectedChallenge},mpremoteplaystart:e=>{e.menuSelectedChallenge.id&&(w(e),Object.assign(e.challenge,e.menuSelectedChallenge),e.menuActive=!1,e.multiplayer.lobbyOpen=!1,e.menuSelectedChallenge.id="",e.menuSelectedChallenge.difficulty="",e.menuSelectedChallenge.beatmapCharacteristic="",e.isSearching=!1,e.isLoading=!0,e.loadingText="Loading...")},pausegame:e=>{e.isPlaying&&(e.isPaused=!0)},playbuttonclick:e=>{if(""===e.menuSelectedChallenge.id)return;if(u[e.menuSelectedChallenge.id])return;let t="frontpage";e.playlist&&(t="playlist"),e.search.query&&(t="search"),e.genre&&(t="genre"),gtag("event","songsource",{event_label:t}),w(e),Object.assign(e.challenge,e.menuSelectedChallenge),gtag("event","difficulty",{event_label:e.challenge.difficulty}),e.menuActive=!1,e.multiplayer.lobbyOpen=!1,e.menuSelectedChallenge.id="",e.menuSelectedChallenge.difficulty="",e.menuSelectedChallenge.beatmapCharacteristic="",e.isSearching=!1,e.isLoading=!0,e.loadingText="Loading...",gtag("event","colorscheme",{event_label:e.colorScheme})},playlistclear:(e,t)=>{e.menuSelectedChallenge.id="",e.playlist=""},playlistselect:(e,t)=>{e.genre="",e.menuSelectedChallenge.id="",e.playlist=t.id,e.playlistTitle=t.title,e.playlistMenuOpen=!1,e.search.query=""},playlistmenuclose:e=>{e.playlistMenuOpen=!1},playlistmenuopen:e=>{e.playlistMenuOpen=!0},searcherror:(e,t)=>{e.search.hasError=!0},searchprevpage:e=>{0!==e.search.page&&(e.search.page--,m(e))},searchnextpage:e=>{e.search.page>Math.floor(e.search.results.length/6)||(e.search.page++,m(e),void 0!==e.search.url&&e.search.page+3>Math.floor(e.search.results.length/6)&&(e.search.urlPage=e.search.urlPage+1,fetch(e.search.url.replaceAll("CURRENT_PAGE_INDEX",e.search.urlPage)).then(e=>e.json()).then(t=>{var n=(t.docs||t.maps).map(a);for(e.search.results.push(...n),i=0;i<n.length;i++){let e=n[i];s[e.id]=e}})))},searchresults:(e,t)=>{var n;for(e.search.hasError=!1,e.search.page=0,e.search.url=t.url,e.search.urlPage=t.urlPage,e.search.query=t.query,e.search.queryText=g(t.query,10),e.search.results=t.results||[],n=0;n<e.search.results.length;n++){let t=e.search.results[n];s[t.id]=t}m(e),e.menuSelectedChallenge.id="",e.isSearching&&(e.genre="",e.playlist="")},songcomplete:e=>{if(gtag("event","songcomplete",{event_label:e.gameMode}),"ride"===e.gameMode||!e.inVR)return e.challenge.isBeatsPreloaded=!1,e.isVictory=!1,e.menuActive=!0,void(e.challenge.id="");e.isVictory=!0,e.score.score=isNaN(e.score.score)?0:e.score.score,T(e),e.score.finalAccuracy=e.score.accuracy;const t=parseFloat(e.score.accuracy);e.score.rank=t>=97?"S":t>=90?"A":t>=80?"B":t>=70?"C":t>=60?"D":"F",A(e)},songloadcancel:e=>{e.challenge.isBeatsPreloaded=!1,e.challenge.audio="",e.challenge.id="",e.challenge.version="",e.isZipFetching=!1,e.isLoading=!1,e.isSongProcessing=!1,e.menuActive=!0},songloaderror:e=>{u[e.menuSelectedChallenge.id||e.challenge.id]=!0,e.hasSongLoadError=!0,e.loadingText="Sorry! There was an error loading this song.\nPlease select another song.",e.challenge.id="",e.challenge.isBeatsPreloaded=!1,e.isSongProcessing=!1,e.isZipFetching=!1},songprocessfinish:e=>{e.isSongProcessing=!1,e.isLoading=!1},songprocessstart:e=>{e.isSongProcessing=!0,e.loadingText="Wrapping up..."},"enter-vr":e=>{e.inVR=AFRAME.utils.device.checkHeadsetConnected(),AFRAME.utils.device.isMobile()||(gtag("event","entervr",{}),AFRAME.utils.device.isOculusBrowser()&>ag("event","oculusbrowser",{}))},"exit-vr":e=>{e.inVR=!1,e.isPlaying&&(e.isPaused=!0)},startgame:e=>{e.introActive=!1,e.menuActive=!0},victoryfake:e=>{e.score.accuracy="74.99",e.score.rank="C"},wallhitstart:e=>{_(e)},ziploaderend:(e,t)=>{e.challenge.audio=t.audio,e.hasSongLoadError=!1,e.menuSelectedChallenge.version="",e.isZipFetching=!1},ziploaderstart:e=>{e.challenge.isBeatsPreloaded=!1,e.isZipFetching=!0}},computeState:e=>{e.isPlaying=!(e.menuActive||e.isLoading||e.isPaused||e.isVictory||e.isGameOver||e.isZipFetching||e.isSongProcessing||!e.challenge.id||e.introActive);const t=e.menuActive||e.isPaused||e.isVictory||e.isGameOver||e.isLoading||e.introActive;e.leftRaycasterActive=t&&"left"===e.activeHand&&e.inVR,e.rightRaycasterActive=t&&"right"===e.activeHand&&e.inVR,e.mainMenuActive=e.menuActive&&!e.genreMenuOpen&&!e.difficultyFilterMenuOpen&&!e.playlistMenuOpen&&!e.optionsMenuOpen&&!e.isSearching,e.score.active="ride"!==e.gameMode&&e.inVR&&(e.isPlaying||e.isPaused),e.mpActive=!!e.multiplayer.active,e.mpCanStart=!e.multiplayer.active||e.multiplayer.isHost&&e.multiplayer.players.length>=2,e.mpHostControl=!e.multiplayer.active||e.multiplayer.isHost,e.mpLobbyVisible=e.multiplayer.lobbyOpen&&e.menuActive&&!e.isMenuOpening,e.mpHudVisible=e.multiplayer.active&&e.multiplayer.players.length>1&&(e.isPlaying||e.isPaused||e.isLoading),e.mpResultsVisible=e.multiplayer.active&&e.isVictory&&e.multiplayer.players.length>1,e.mpInRoom=!!e.multiplayer.roomCode,e.mpInLobbyPhase=e.mpInRoom&&"lobby"===e.multiplayer.status,e.mpCountdownVisible=e.multiplayer.countdownActive,e.mpKeyboardOpen=e.multiplayer.keyboardOpen,e.mpNameKeyboardOpen=e.multiplayer.nameKeyboardOpen,e.mpRoomCodeText=e.multiplayer.roomCode?"ROOM "+e.multiplayer.roomCode:"",e.mpShareButtonText=e.multiplayer.shareCopied?"LINK COPIED":"COPY SHARE LINK",e.mpShareButtonColor=e.multiplayer.shareCopied?"#5dff80":"#FFFFFF",e.mpReadyButtonText=e.multiplayer.myReady?"UNREADY":"READY",e.mpReadyButtonColor=e.multiplayer.myReady?"#5dff80":"#FFFFFF",e.mpReadyButtonBrightness=e.multiplayer.myReady?.5:.2,e.mpJoinButtonText=e.multiplayer.joinCodeInput?"JOIN "+e.multiplayer.joinCodeInput:"JOIN ROOM",e.mpRankHudText=e.multiplayer.myRankText?"RANK "+e.multiplayer.myRankText:"",e.mpDeltaColor=e.multiplayer.scoreDelta>=0?"#5dff80":"#ff8080",e.mpStatusText=e.multiplayer.lastError?e.multiplayer.lastError:"connecting"===e.multiplayer.status?"Connecting...":"idle"===e.multiplayer.status?"Create a room or paste a code.":"finished"===e.multiplayer.status?"Round over.":e.multiplayer.players.length<2?e.multiplayer.isHost?"Share the room code below — waiting for a friend.":"Waiting for another player...":e.multiplayer.isHost?e.multiplayer.songName?'Press PLAY to start "'+e.multiplayer.songName+'".':"Pick a song from the menu, then press PLAY.":e.multiplayer.songName?'Host queued "'+e.multiplayer.songName+'". Get ready.':"Waiting for host to pick a song...",e.mpWinnerBanner=e.multiplayer.winnerName?e.multiplayer.winnerName===(e.multiplayer.players.find(t=>t.uid===e.multiplayer.uid)||{}).name?"YOU WON!":e.multiplayer.winnerName.toUpperCase()+" WINS":""}});const y=["easy","normal","hard","expert","expertPlus"],v=["Standard"];function b(e,t){const n=y.indexOf(e.difficulty),r=y.indexOf(t.difficulty);if(n<r)return-1;if(n>r)return 1;const i=v.indexOf(e.beatmapCharacteristic),o=v.indexOf(t.beatmapCharacteristic);return i>o?-1:i<o?1:0}function _(e){e.isPlaying&&e.inVR&&(e.score.combo=0)}function w(e){e.damage=0,e.score.accuracy=100,e.score.accuracyInt=100,e.score.accuracyScore=0,e.score.beatsHit=0,e.score.beatsMissed=0,e.score.finalAccuracy=100,e.score.combo=0,e.score.maxCombo=0,e.score.score=0}function E(e){e.menuSelectedChallenge.index=-1;for(let t=0;t<e.searchResultsPage.length;t++)if(e.searchResultsPage[t].id===e.menuSelectedChallenge.id){e.menuSelectedChallenge.index=t;break}}function A(e){e.score.beatsText=`${e.score.beatsHit} / ${e.score.beatsMissed+e.score.beatsHit} BEATS`}function x(e){e.leaderboard.length=0,e.leaderboard.__dirty=!0,e.leaderboardNames="",e.leaderboardScores="",e.leaderboardFetched=!1}function S(e,t){let n=JSON.parse(t.metadata.characteristics)[e.menuSelectedChallenge.beatmapCharacteristic][e.menuSelectedChallenge.difficulty];e.menuSelectedChallenge.songInfoText=`Mapped by ${g(t.metadata.levelAuthorName,55)}\n${t.genre&&"Uncategorized"!==t.genre?t.genre+"\n":""}${function(e){e/=60;const t=""+Math.floor(e);var n=Math.round(60*(e-t));return n<10&&(n="0"+n),`${t}:${n}`}(t.metadata.duration)} / ${n.notes} notes\n${n.bombs} bombs | ${n.obstacles} obstacles\nNJS: ${n.njs}`}function T(e){const t=e.score.beatsHit+e.score.beatsMissed;e.score.accuracy=e.score.accuracyScore/(100*t)*100,e.score.accuracy=isNaN(e.score.accuracy)?100:e.score.accuracy,e.score.accuracy=e.score.accuracy.toFixed(2),e.score.accuracyInt=parseInt(e.score.accuracy)}},function(e,t){e.exports=[{name:"Pop",row:1,column:1},{name:"R&B",row:1,column:2},{name:"Rap",row:1,column:3},{name:"Rock",row:1,column:4},{name:"Soundtrack",row:1,column:5},{name:"Video Games",row:1,column:6},{name:"Electronic",row:2,column:1},{name:"Hip Hop",row:2,column:2},{name:"House",row:2,column:3},{name:"J-Pop",row:2,column:4},{name:"K-Pop",row:2,column:5},{name:"Meme",row:2,column:6},{name:"Alternative",row:3,column:1},{name:"Anime",row:3,column:2},{name:"Comedy",row:3,column:3},{name:"Dubstep",row:3,column:5},{name:"Dance",row:3,column:6}]},function(e,t){e.exports=[{name:"favorites",author:"You!",title:"Your Saved Favorites"},{name:"3966",author:"BeastSaber",title:"Songs With Fantastic Flow Vol. 1"},{name:"3967",author:"BeastSaber",title:"Songs With Fantastic Flow Vol. 2"},{name:"3968",author:"BeastSaber",title:"Songs With Fantastic Flow Vol. 3"},{name:"4134",author:"BeastSaber",title:"Songs With Fantastic Flow Vol. 4"},{name:"4135",author:"BeastSaber",title:"Songs With Fantastic Flow Vol. 5"},{name:"7483",author:"BeastSaber",title:"Maps Of The Weeks"},{name:"4137",author:"BeastSaber",title:"Curator's Picks of 2020"},{name:"4139",author:"BeastSaber",title:"Curator's Picks of 2021"},{name:"11584",author:"BeastSaber",title:"Curator's Picks of 2022"},{name:"4405",author:"BeastSaber",title:"Intro to Dance"},{name:"4138",author:"BeastSaber",title:"Mom's Maps"}]},function(e,t,n){var r=n(21);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0},o=n(206)(r,i);r.locals&&(e.exports=r.locals),e.hot.accept(21,(function(){var t=n(21);if("string"==typeof t&&(t=[[e.i,t,""]]),!function(e,t){var n,r=0;for(n in e){if(!t||e[n]!==t[n])return!1;r++}for(n in t)r--;return 0===r}(r.locals,t.locals))throw new Error("Aborting CSS HMR due to changed css-modules locals.");o(t)})),e.hot.dispose((function(){o()}))},function(e,t){e.exports=function(e){return"string"!=typeof e?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),/["'() \t\n]/.test(e)?'"'+e.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':e)}},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var i=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),o=r.sources.map((function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"}));return[n].concat(o).concat([i]).join("\n")}var a;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<e.length;i++){var a=e[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAU0AAAGDCAMAAACYzLIyAAACWFBMVEUAAAAAkP8AkP8AkP8AkP8AkP8AkP8AkP8AkP8AkP8AkP8BkP8AkP8AkP8AkP8AkP8Bkf8AkP8AkP8Dkf8BkP8BkP8Bkf8Vj/y44P8Rl///drb/drZx/+n/drZx/+n/drb/drZx/+n/drf/drZw/+pu/upx/+n/drdx/+lWtv//drb/drbL6f9w/+r+drdx/+n/drZw/+pu/utx/+ll9exMsv9x/+lx/+lw/+r/drb/drb/drb8drf+drdx/+nh8v9q+uzR7P9w/+phu//e8f8wpf9s++qJzP8Ek/9w/urZ7v9v/url9P9x/+n9drf/drb9drdDrv9x/+l2w/9uwf9u/eps++px/+mt3P//drY7qv//drZ7xv/2d7ml2P9x/+knov9x/+m+4//W7f+03/9I1/H8drf/drYru/iZ0/+AyP/B5P//drZx/+kXp/tpvv/t9/86yvX/draU0P8gnv/+drbp9v//drZ+g9xx/+mSgdZK2fHF5v9x/+nWe8Py+f8Xp/uQz///drYbnP/3/P+f1f9x/+kVpfsxwPZO3vD/drbfecArjPMwi/IktPncesBx/+lV5e9Wh+dx/+khjfY9iu5+g9ucgNMajvhx/+mDyf8Kmv6+fcmOgte4fcr/dra5fcpGiexOiOkpjPSwfs1J2PEVpfuIgtkpufcouPj/drb/drbteLzSe8MPoPyof89KiesPoPzreLxghuQ8y/Rx/+n/drZx/+kktPnGfMc9zfNLierleb64fctd7O3oeL1x/+n/drZb6vj/////drZx/+lv/exr+vEkKZq9AAAAw3RSTlMAeUKEWG9nmlCMKho2YJMVCkolDyEwOgbfoXqEZ5R3Zm6EN0xPI4xUk7iNROZEH1qcLjacCbRgbT8qYFoVP3zxFepKvO+rD8ygVu0p83EPdTCxOsPCHRng2uCuJcUK1+2poeHt3Q8Zox7Rx+LvmEC+9xazz6cG9cVD8g8i5Lkm+SvN6qX806lINy+sQGRXLzfASDW0XEwhFWf4yFIvLBrmIVRDQjYpYjYlUdjPbF5YThhsU0xJx7rOW1RBKUlCPGTZ+uxEzOy6AABDfElEQVR42uycz05iSRTGZ2zaK9oiyP9HuAlb1oQAoUPYEFkQQowBN8pCEw0rE2NsX6Jfhxeb+nu/W/dUUVywp3smfGaSnhm7+9SvvnOq6lThXwcddNBBBx100EEHHXTQ/1dVKfYL8XXQrhzzxQuiIlNeijP+jxGuCnPkDUUDqv6ykeQ5ybOzUulSqyR1FgmAdSx/INiqAKix6YjPrJJD+fQQFMnL09NyufxNqqx0GiliDLgg+1vQgmAE0MRXUu44NYQB8bF8LtFqUZP8VqkcWVThijOO2CbJ/mto4UAABD/g4+bQqiQkhsMHAqKfgPKCoWQkBcjCSUKFk4JUgm/E9jSG1qwIn12cYEAHQM0P8IygC1psUBgRGwmI7ssSKDnITOac6ZjpHMpEigE2nAuyFtcCraa7HV+sHrQAugEa9LQ3Mg6J0YDonjzzjGWEMsMxfhX6+++vho6FANlgywSyEVomghZ0FWGIAVO64F8GO1IACUAnPxkuj/vYKjEWEAXP3YzJWLI/SaJkFJm+GPob+sq/TLwgC7RGPTAKAuhiMaMqSV1KRb+tDH4OgOAHdCpcETuEEYmhRETBc0djMpYFFgdHyUFms9lcXFmIMJZsCVmgBVvDtsZiRlVWwuIBfFsANPCZ3sgmpIcSEd2DZ14Yk7EEylwQBL3mw9Ws359djR86YXM07U0DCIQB17CtURAIWs6WqgIdWSUWDvBzAxQy6eWEAof4aMQQROgxnvnUMIUxOUvlyiBo9petNdGP18dht92YT67v+vdXnXA01YAJWiSQja1WcsNwor/ELyOBHfh5AFJ+YdgZz/pvd9eT2/lLo90edFut1nA47C4aL/Pr/jj8HkREwbN0VkwFs8hgCmMKliyGYPrWXm+r4YDB/XibPYSjUcy2IGthaxR/LY4pjkyvG2AHfG6AhN99/25yu2wPho/+odz+7Eii4MntWaymgMlLpjImz/Bev7HeUY+tdqPGbHvVaY6QQVwGW7qUQQliICe+gM/lwGYzHN+/fUzmjUWL8vNr+PHQ+R7nWUG2bwXz8rRypIzJWALlfnplpl3eCrRhs0nQgi0IQxQb4AFfDOCMObD20u6uPiP04Rg8GU6S7X6Yyphg+bladdsvtclHfzYGWuAVhDlkUzmgM1aPUZNnMCuAt0s48FM1fNA8o2zfEmZZw2T18tfApAWB1/1btpS9sbVszLwLwoZGTE2ObvazLxYPRq+LAvgrNZT5/lVm+3Y48wZMsPwN+vHjx+vr4+NqOGQL7Wr1+Mr+w/p3ahh+z3Gc5wpnfput0R8C80/UkONkPAXO0kV1i32mhvm9vT4oifM9kNl+wmonct0HMxs8d9cHEa1Ytiuc5c2ls3pxBpi91fogm1oC53nGVzqLZ0jz6ev6oA04UTqd1iyVjwqqZrbWNrUn/auHsPNwxTYoT3yHUls2xBHt/yDWcli1uNarVw/OLErnZmueu1fzWg+ba7P1Uq8/T5v8BMwPcN3/Ro1gh94XdjITx4dp771eNwc07Uxart8aBqJ0FljpdJkzr6zpgFmb1gO2eyXCOYVLx9JrdmZ9djJZDNd/kIaLxu31089xOOpJeOgjUuXYOJpPbetEPMvSCXPSPNfWzFpgtkOGMiu6p0rOIzTYRrYNx/2732Ta4YB3XRjA6bMGCHwwh7UlIIi+12y5HjCcMKcrz4U1e9SYQU6ijPpl7BfiS+grRWwYN27aUXjF+xGNwWe7FhksHHjPAN5ogOBH6dF+1Vc5IEk0F9RrNpzZjeZUeQ5rmjC/SJQZ0qxFt5b0u0GWoIVr75+ub18Wrdfd6Q15/4QXwAfJzwswjo7bQinZSD0Wtw4Onh2rOZHol3oJCtemur1AHU8zJwV6k8CVQAy2IOtGq9m+30ybohn+9DFhu4X5fPnSYA3xxaDb7Q4W7XajsZzXbieT6+uPJ7Z2dFj1Y/A0PSQwADr4GfBOINyoF+RY2BgUT4KzazcnEr1yZF2CGu+ydSJRiiuwb5C+sqnYr7koWTda9Cm9QlsU+NwGpHfT9HJafknJwaiLb9XlfU4m7BjmtCY6r5o0zxeBPugLlOJ69hI3sNY7WMAFWQPtOWELup57RAjswM8LMIaPacMVaZmNhAMVPGFPak4ciMhe80s2uQRNoybUtzJ/QnIBmdfcArKMQs0sMgimpWhhW+D1Ceho/aP3zLjahCEZSAEw+dwPAxJjETyVPecmmCtpzool1bHX7CcXoKzKct6+vyjK+6UqF148crE3NppkQQGLl3f9CsXz8MLcLVCp/2l7uhOvfjCgiAZFJ/EkBgYpSmE88lkg56nsmavbzMmaH6WLPFmDsNckq7lq3pcuJEoqwZKhlCRF2IbdzFcoRj2AcSBjccWX+Hfr2gF8yGAzGi4Y2QimzHgWi/bHv5KntGc2meth7otahxKVM88TXVhzav6Outj08yzHPZ2dpQw+o98rJRMTr1AK3BRlvBcCWgEXKjDKkGIGgR593kSjcQdzBJ7WoTEyah+ewPkUSKN9wyYJK3pBrEEvNM/FysX+PjvMvGSp39jI90rJJUStGGIQaginqLVKxpuYCv8i4v9Vy3yNiwJIohHh2IMRQAVP1/iYPy/Leu9Yp6l+LMyZJ2VTJPqNeZ4Mcho/Si3521T0Inh9Isup7XlPtxP4bkYOQg5BjsB4ZqnpArBLtrfiF0IkGrYc63ACvTnNIRg1uzL3ig634FxjmrPJcep1iNJM7txDmefuw31eZILeSOjYg/ro6mPeja7EXhe1p3GvLonqIUSOqEaVH5sFn+KvEvHo3xVNr9OftFuizfa6arGuYgfBsGgUz1OnPc8uxZmbmPNHL1qHyCLEvz14MqtmlOf2mpmXVtDRf5Ek+8u1VbUZH4QaAhyRtzxz9anKREdti6Z3X9sQDAOqeSIYV6uSmnPG1yFdOOkiFMwTVXNjnhfNt188+CaJnbRIxRDgCEzUjkKapI2m1mRANU+9bdncq2yaW07QtC5Cg3VMPVE1keckfLz9QnPAp8aMDQGOwAj2EdIE0TxvE03tWfNkwSDbaa4rc9ZdNL2LUJtZU31z3hk+Tl5+lvA8HOEawY5PJNNHUxP+lME4s73IzUnP3eONNM1j5SRQ5/pS0Rm+sgKJ3uPPEI7ACPaGWUgbDXiqYFylpxiVwpqdprGkX6olvbOOqc8THVXTHj5aAqk0H0lHYAT7w6QNilTJgmxHMHRhud7oTZwrjxnNWaIhKtZ/kLeHnwuaL+vUqt0EOTKCPWAiTULc5aRJFpXtCMakWbFk+gMIEZpoeeAcit2UM3xYIS1PMoI9YaY3Jr1eIMF4aCLT6Xbzbh3TCDS94e8/grPi3jBFxVzuGMxSvCcETgfNtrtu4pWhrSpgp09rMsJ/N2Zrx3qF6rwnzNruwXSnQY7iTE8TNXayjulZ0yyS3dd+4UMvfDnFeeu3wUSuIFX2pmlGU5c0T0HTOBl4w18s5xP+/LfR9Y7gfLfSiTzxRzMctBvLRrs79OMkqeKnWTW/90h879JDE2Y43xh++7o/GsWfpc8WG0eA9PIrfZ50WZ8DD7/Dh/6kuxEnTZV8tLJ8OM5CvhXrVfabjmB6I7Pc4bf7U9314pItMUZ04RpBNs1KlDZPum8MpP5ETXTpHD61UqSKddfjpxkf8CrI4hbJkllZe/jtn7yvYd4oCqQM6NjqiRuSXims6cmTbshQmtGICeZAW06cmNu9aLbigUQ08/bMmtpYdkTw8rrgGFe9fBDcoQvb79lxJUI0gElYGtFwxZ7EdFr2VMHcUpo/vTTRQloZg7TQjD/xHNDor2T0+tpF61x/9JX5c+FML/ghVZ4786Q7FhswFY0Ox3gSc2VZk6aWucVp8Z72NylNFhSP6XUNNUCTtKaM62XwV9Hrz3QX8GRCfixbjGA0sOOEH3bI8zqlMjCikTfr7B/jSYzt1W/3O51bP01fQ24e6O5mPmFNZBbN2Ph7pYq6MFP3h1HnETgtt3nFnfKcnIBWTRKN1JG+zdSn+kdyKiJzSzsZoHm8Hc1b0CTWRGaRo8S5vuPFdaL+cRbRCAb29DpPZ87ihjwf1APVtMwkoynLaDKq4xQ8tzxzi/cGSZr3oOlrb16DJu3ov1uMibdfFf6EAi9R9I9aKWSiptPQ5ustzUmrTkhgKmNyluLFz2UpFgyPRvCUk0uzPUzOLWhe0Z4lpSm/dbSO6U7QROed3DYRGgKmjF7+oCsl9WOA9AhEvRpQP6Q0ZxFVp01hCmOqaEoyGgRzxniiU09xNsjcRjTHW9M05/gtwLcm61SPwMQHEEX0xTz5uUolNQKV7cmtZz0awIWPI606FKY0pj0aRpTzFMmicHrmFv30By9NtN4dRcFXp9po/FZE9FXXzwOqRIa4ed3PnKg6dQtMfPLZGk1V8FSTC5zuuQUiYriMSbMKGzu3pubr46bt013k7Zd1BNoQ2aDpHEBxL2sCZqW8KRoxucDpnlt3+t4RmnQzRS8yUDVlnXqhCzLCBwsLTxgCt81kAIjNraLLmsO6iMb/EyPyfHI5TqSKa279NPOpLjIQvy3Pszr8EsJ3vFrShrBslJ7J9T0VYnZZsxkAJoxpn1zgzAahe25BM5GWH5rmWd57kZEFTSP+uqVoKpg6fJ8hMvI41SUD2HYdQqI8J/M8C5i+WYnjTOb6O+bWSfMaNFNeZCD+0L7xrnj6k8j26Kg/TmTXtqnuTpQuphYwvThlxVg55jZOMztybMnTXWTQ+JHnpEngtZW9dM6kHSreVHcnyhifdgZMD06VKsHMPbc44BiNswloprrIcMc/Jf1AL4mS8AO1ecOwg1MImWwvBtHUAqYXZ9me66McUIFmb3uaczdNxD8m1tR5Xt22kSb9QM15k8WmzOfvii1RwhRTSz8R+WCmOrrlLpq3dpoVAcrsxChMKi4aPzZ3aRu9qnRSa/2EHfxlE4liWvM8Q6bWnyqZc2rOeqzUFX2NIc8l2w/Q3BD/fco+L/xgM+ectFR9ZbNHrCnzHFO71c8sUubsmJmCwpmOJj5CYNLMKJo4L4kyDPWwBPnMQH9KA+oGrS5bls2ZxZqY2rRz+31oHgbBykszzZUl4jd3+AuJHPGnHABSne5xqSwR18ixOd3UwunYcNPCuT/NR3zgwPieOdlwoU6lM+cJUt3RlHGXzVNb2WnmvqS3JrbSODeSTNmJZttO0x1/Ty3CjjrlX5TRfqW3J25hhaU0T1JYk7R9QlvhLO9Fk16n00UI2yNHZvp3SUh1euvspWnrjw2MSp9ubplXsKrTTsVONBdraAiaznPqJMDhJaVIqvuXIXebBvsr91T46zA+4UM7vLvQHNhp+u9FUsePVA+WjuYAke8o3BFlM23ZwR+I4dFj+EV6mkZPpxVPujzaTO4WqF/+l+QdJBeRZ9lE2Uwfjb1wNoAgBU3fwxmnG6apy2b6lz2QZ/qHqcum72Zs8Hk0B3aaNUdephWtHah9oOk7pf/D3pnsphEEYTi77Sw2MUmARxhprpwRYhAR8gUNB4SQZYEvhgOWQD5ZiiySl8jr5MXSK383RdMzwwx2lkoUJ5HiFF9X9VJdXXXhGv4cliG4Z96e7j8uZXeuPtmAJ6PJV7BbT96URzxLxx02iV6aaRIO/VvS7M7Vcty0pN28h7nQbG63lrM8T5b+ZT+nqQrLaGqaM/lP96QZbg+jeeKb3ogctn7/rG0aBpX8XghLzLWDZqHz5vxJzZuRY9703ACnuBf6v6aXMPa+IA3uLH9sR/Vn7DfvitxvejMOfXUo8DDwXz0L3YOmd+zT5Hr48xf/9nM6rMnzBhioHA+q/5AYUidzDKnsiyHRBA73K2lvjpwzvikXvceLbwY5xDcBwB3fJN5A5pY0+Zvu2PvzvyD2LllhdOiuBjTHPpr+3GLnvVD/9C+5F1JD23LcC5F1j1ySQ5Cy5Dg2Oe8sw7zvLE/3ubNcpLuzxHeDozvuLNOcBXGkd5zUCrxPnz/6fbpO9oBv0vt00Iw8cQpytqAngUPlesweI9eDJiLRXA9MLf41k9gxMZQD5SF1HiUPCUlyrjykVHEWegqnCZxwrri4HLn2vjlyrWw5cirXue/KkXNsIqp0B0IrA9D1/6D5m8ep8jd7OeVv0ncZQzgKDR/SgJzzUQbdcP4xucVx1txi+DmtolchgOh+zr3hpFukPybvvfE1W947/VgdPHGhzkuLpHi3SBNMHMnfZDw79JuMVUFvMmp6Dn9XJgsLOXk6JvXIsah53wvhiUvm90JXytGfzHshOYefkYCqJwToYD+E59lv2ULi6+T12KO9ZbtdmdqAJ1XGesvW/k7esmFo3dtNerCk8WJ6GNjZ5aVBXjb631m+PNA7S4wunXI87ywxtHhyTkI02G46o0h0x+V7A4xnq0nfAC9vD/EGWIxuaXuV4M/kDbCj+AANANN3gf5lCBPnGcwBHQscT6o/S56+9+ndQ7xPV2+qNVA8Txfvqd3v01tW8YQybl3cNVL8NHtY13y1E0i1gkPWTggdtRPUe/9zrU5Zl05Qb/1dtRPu7cIeWH+b7iXd39mhg8rFqOuBt6IEp7Oux6fNuh6NA9T10KP75b1WB2U9vqxLmW+r4lM3is6QvaGfJk5qcxK+VMbsqznTXR6d0Joz57rMi6fmTC+3mjPQRo4u1LFKzhzrgkJH7e01ZxAYw2am5VnSaYjL9WTcWw/p1qhA9HGjHhJTv9h6SONt2sjRNQoivTDKIemK0cF3oowZF3NvtH84lnRgQqiePCsmtbpmO2p1vdqo1XVccK2ubQXqump0jWJdZqkuVVuq4ShrB9Okjo7rX3cnMWenDDigXUcuoh/AqtxmNWh8U2QdOVTBsSTi2iigTJQqGiXqntnSNurI2YdYe4kOcEOe9MlMD4tDshqHgf4ETNDekqvvrHE42bPGobt8ZTQ/OjXV4T+Ngot9f41D4uj+aZNeqro3Lv76myOj/uZr8UOXvOzN4eTEGDLW3/SUVo1adQGUiVV+k/n43F9/c1ePjAWmzV3R7NB13ktcG/bnUHVnEqK7NxVTG9Zf9jcK1sVhURo2iBKVUYZpEl9sYdr0VCNwGGeKusU3U6tucS++nORVtzhDSeroIa7rwsVBEC+A0lu3uGQGq/zTJg1xNV0nvlK6mtrN8TXrMjuozrq51tTOWi69ETW/qZLaPpibMxvCAd5pk3a0dG5lc6/3Hq6IMaTHWVS9d3xW130eps3E3VZr5l6QfoDlAXoRoG+Yr3x+e5JZmWab9CKAH5Ibh8CaNqnGpBMwjBPWc7g+GRXV++7MENnSDmTz0wYjC5j2+WBO+6dj2tzVpTogxomZrdAeLgDJIKIv40a/RYYVTIk2+fVwgZ/TGp8BbQKcqnstDIj2FwrCDOq3SX8hxZGDZAjRM3SjFygnC6a5dDua1cnIOmp2wzTh6J5odstzPMje+wrqk95XFebXkuO5arjN5AWRL5wsmJbLlb20QZF6jCxgump2T+3m6Z62jSH1dUyd2fuyQX3Sl02SFBzRM5y32T+G8D+hYfd7wVT0zS5l1gYzpjmy3nNK4M8UrewwTkydsM78egYqknbvdbt9vRY07EbLbm6iWbVBjzv0DESzTscZuvF1vQZVnqU3Tkyd6JdI+1muqkns8ifpZwmSmqPu0v2aCvtbDVW37JYmSrprdprJlEGQG5+OfTgFE37uWoP8xhm4DtNfxOg5e60GHqDVIem1ii72du91dAnRov/GYGp1lbe1YeoMqwmUwQUMOpVKU9cwt5smkuOSGyei8BIn/k9XH+D6Q+hQfir7AEN95lgCJUgyjqRJ96kSNOwGU3SVF0AtbcTwLvuOPsD9JZThTg4vR9d0AyY1TWw2fcZJo6+hjpvBH2iPagWUER1dzoyAVzS+iYdbelTL+y70jTdB6ibd7V7Qn47iVlAftpeqeziYWl3l2TeENmp4OdFVwNSZRHffvn+7iyazy1F9ZSijeyrLT4WG8B8Bk5om1qBsxhliR4Zm4+7+6YLEqj0cXq1qte3905VVHptd7DXHWo8BaDaQwYDu4dcPrTa+o9VVnn9T9KIn/dO1nBJlVFIFPpCYMVwwYZqVpOn9FOdXtBsQ5lne2dv/xNPbn6PEP3oOu75qPVQjb4O/6o3qyC6+M4ByA/2sBmnD2qELVeYcLLV542hF/Rymmcg44euQ5gp7XO5UmmdZ8YTHYg0xVg44Jb+QtVFqnwxuwlTnqTkzUmVnJhsxgUAbqKN0sZVRXfElS0y9Moti/Gubn8M0ExknfN2QyRLeTnnaqwkTsqvRCwY+q5zddN/4cZaY3kNPmqjltwKotUtQComvHyxl3srPAZYvcPE/JKHZi6/kmJ3wpiV0xAawIsuMI60J2TNaW269mVHQYZUcZau6T1yyv1JAbQOFNsfq7lR+OYYy8iPwhA7JEk6OEyr1czz78Bqn8nUnTmO3qJUpVbh9npHzjBacXDBZAuWqE/7aV+7nzEKpgUKbF+Iynf+C4746mFYYSrDEcaqH3b9hmghZlNLetEwcBzHwVCc7EXfEWVvELJjK8oc6VZsosT3tz/ZGiaAUNVChDUIo/IsMm2i9Ncq3YImj/j5+TiPr7Z2nbJjAuY47lhEHYoIwmvY6oMTRKTe572810HOhDoRHn7QFlNYowdJycgrzNX2m6/d1rES087nJE14jI7oI8vIor0CqSWqUjnNfIQYqgdope2zUhYhAqkJps+zNXDDT+DkNRYWOuAsyjrC8KDuEVeqULqz0mCx/OmISec+gGO63wibXVD+JiDRQguUSw0xhws/T4MRKtJvnG+w2pCDGqziuSWIJjzH2BUh1CQOFcnK+hCCQivkHsTw3TLyMynLn377byRMpXAwbYyfXTv47xNY0SeyGCpZqoLVTymFjoQUbD4VSsryCcm6Y8PO0K9HJ0dWFZ46SRFVIF0FexNbWJFOuO41uOL6+XHTieNR5uLkcDMZ3UWKgnCeGWyDlTLVop7Hmn55Lu+8tEyb8PNVKJFOZV66PEI5ULEYiVYJDkB0TqtUTbCwRdUKyyymXdRZOMPox7ibb1CugONhaaZASpDn/ONW7aB+dZIVJrwHdFGbTtiaKeC6ivDqCUxv+JOdGT7fzUzQNh+iAUK8+TZKHMI7JcCMNEl6DzZrTy0+eZ4NJLiWB0yHVUa+mA10QZVC1dqszaCa2yVgltG0G2+1BEkx7wU0CovfTZQ0hUQicxjeVXygvzwgTOBF/7jV2K92t/pi2hiyWqYK8VyzK2+ovqvBJP8lOHcmWRj7tB+ai/Av/qS1KEmU2OkpiorNFa1Ujwy2dphZ0sMFwGKb08mww8fgMT+dYbCrhnPft7uIWifnJUc7ryibpLHcs5JUULG0qrbUXJ8s9Gj/M61eMqZbaVT1eSJv0GCbCuplg0haF8PYipBtroyQr8AtbPq7jU2aP+3pyD7i9aHSb4aRxgbC+1zC1l+P+O53gybG5FrUL4dnt1I3s9M3d4XtLsEtURPWJvx4DaH5yEWjDxAPnPaS8kZLSC3NnaaCUNklOLudacIIBUQEUBpovS2WY8HICM/taJHj2wzxRsq0QUHKSeHh2vg5UnCnRx2uOFXedxnVvfZQHUEyYOqFmLy+na9F7MwOhFeaEsi/MEihlgEJ3O8e714oU8XuRzyk7suPyxzDQICeeDckShgkv3xen8PZ8eXan8HDcd+lQKZIJiSC9kxFVQG0D7UT7swzWLGGYe8GE8nLytHgO9+I56ViTJVBqkkm04kQlUGKg825uLKlh5uTtNs92RgOd/Jj3juzJEiiFTaYYZwEUBprHDNqIN1nmaJjw9g2eWYBOLmNG0rRKaZZAmcFxXAZaj6P0KB8YSsTBOctcDRNK2zw10OG0mUzPcDDSJDVKeDhFmdlA1ftYCXQepUSJPC+whGbF8USCxnA4X4zdakezy2nAQIIkR2lNlvsqXCIGCqBBZxAlIDmIgbJQlpQnVNZEjxjTYLQYXI/vmxN2cptVB5c3i84oriuOJxZJGyUpUbO/gQKoeOHZ6lxHTpDjG0ESKItlSXkCKMLBViIaorwIfIIkUBIPz8tAARRIp4vBOOxG7Ij+7a4RTZqzwWLUCuA12PcWzBI8tQlAZyZ2dBgxXjO2BpL5o6QGCuWeG0iJiKgVnX8Eywwuk3kRtVKrEcm2BCldAiRI5oqSGqgGCt02BhtDDq8xUR6CJXhqlTdSuHhAV4v8g/WIAiSBshjtABTDTUcbXmOGCDjKQ7CkKmuiL9QNoCmKIh74mCQL1bVkAjWRatGXQ5wjAoBA6R/pQoBKoshDE1y50MdnRZOkQKVyQEpGm3jNwVHSo7IOkXGoTL5IeS8FsTWQPJAo5YAUg32M1EMBUpF8FJSUqFQbiWhGkJc82j2k6Cewargx2CrjA6MtSZaePQGpCKYCqhQEeR+JIw3fcaQYbQy4BPlUSFpMKyVLKkyePQWpcCvFaEOewGj/qfKbPTqmAQAAgRgoggH/TiEhePjhbure/tu1rkJuAwAAAAAAAMCwdwariQRBGL6EiLKQQNjVVxC8zlkGFZfQF1kPQWQPiZeNBz0sngSR1ZfI6/hiW2Pb801PMehMxtUFv44QkkvyUfZ4qPrrxo2zUbfIN3JuvRKf6odTPAlx39H/JrgenXT71D/oq3mkV9PCFhAHgt3fco1m0SfamNUGeDhP79zBJD2vwtcDqX5NBPtmL1OzFKAT6Otz+2FqCrabYLSsIQx63H3IEks6jt2mzaL2fG6pQC0Qf2QHEnKR4gubOMoyWtcN+Rb2gFhSfmO3tYRa/0Yo+3LCX7ZA/OkFMXEgmhwvQhajn3WphkWE/SwD3MU4w4JXuZhVVYvavC20deSpCzBboGfP1cYd6BEDjOKz+By1U+myvgU7ZgP3MUm/qMVsrFbQarFrDYMIczxEB3fqAlQCM/2xIMYmgN8r9v8LRvFZrDBrcQ59PKTqkZxjkpPSi1nUeveBdyFgl4cZoG0PITROH/4yBOLPyXLFYU/maJYzis+ChZkaUbbhcFAF5di6VWZRi1vK1sHDDNCGOoEozWMC8RfL8/L+fBi2dUbxWTB8QlyiMhr67AUzicKUSenhrNMMBqPeqAIJw9lmyenUly3AN1C/I3kcf0pglj+2w1QAGGk9BLEVjVIgBondMtWKhLmwlgU2q7nphq1XmUfvv8umlcHICUatbzbbLXrZGyYvd1grhjvtTwvM9teU4ECbkyqD9a0wlHHrdtsY031rLV9/9odubl3FfBSL6GLv0TrcnYp5Frnb9XjWHAwSZYtZ3KIWvK1h8kKZfME98AaWowQqf+/9Xy+Tafh8QpScmXx0xKiKoMkz1GqXBhHK3yu+LGDeDlsNKdsfnUDMWrh0lVoqFzAGPDyov6wKDAJZULTeyqT/Gxt2cmC2M6Km8gfKPRFtWGoW30qKdjrZq20GgVKLWwyD1oY89CUEjqUCG8uwu9iVgBnikxi0XDJtYeKyXBbdcNl42fbHQ9SiV6iKY7DSUCdUYBBE72C5ACdTKrBUzEx85gjiRGacYUoo15mZt6N7fyKPsrU8y4ZSuxj2GAhBpG780d8/PMRelwvwnJhO/pDYR08mLi/AZrNZrebzhTHyoF0s5iv5we5SEMcpqRWEvh//aHQlMq8RQ+wui0dOW0b+PdzdSGH+VKpqWcZxmdXK7+7uxl/2zsI3qiAI4wSHQFIguBxWipQCpRToXaEUKEEqSJEipViRKwR3De7ursHd3f8tZmZ339y92XePu5Ig4SuQd/Ag4cc3M7uzG0ZoBUa7GczGOH1m4eB4jP8iyQmMNEyMU6f/nKaSjZ//KwZOTp0+8wIpZw60TyGeOGzsoi6DF42FBcpSXKE0W5BKW7R/QdByWDEQ9XnFRh+cdfxTZyMx304ObaHFtWy9NG++rKQP7oBxAzfk78gRsOldBzsz2j6UDNVTFPgvVDJ4onaUVJdaep6890zLJPucVR7oTCN7hOoYMWKc3ttn8JRhsDOZOerzH6RRM1NhwM7pcV1GDyV43EcU0vOMlw6y/kMsE/NWRZzLGcCsQV14Wg/JewvNbB3bdhk3bN5vMu2oEdh1AYAlywzACHxeTQGe7WIfCj8QBycKc9rHgg6VxuRJUqYhRl/u/o6bLdu2Fo+cHov9iNQRv9q1HMHkwPkAcLoByPwkPdmvqsHDTcxoMYkz9pxq68hahmmmnIlmLckgVnwZsCYr0bJr5y+dNmvdzIEbE6c3CvsnmAAXKX6+ABmdmgyj5Wqk6klyHjwHW83Jgd5Qxbmc6z9kKMDkCXwuqUNo1lHQXvyOOrn3JKiGP1qaDz69pA81w5dumwirhRkzFqxLhYb4zBFDhgwZMXPQoNTUBTOazZo4cdq0bUuhdgyG7AfwgJ4IYAnwodF1R/eUzqD4OAVVm8eMeY63HGI3Jwd6k6rWEpTKo6lpOiSfcYH4yAa/X7ly5diVY6RLRvtACBa5ohkMVolW9imlZMeZ8UkDRhJ8oXXzxU2lHVoLWeZv08TMO+TRq8vcATuOzWkNdMyaMs5nOoOUCSUdz/IYENcZ7GGlVY4ea2muZFzmShKVzOcc0bOh7GrWX2eICO/JzSdar5R2OtqP2sSqy9NhI8YCN/MwJ2+IxFqzWh13CSoxTSjz37Kj5O0A/PH16+Pnzp27cePqqreg+45W3XfIomsZK5/vuCbj+UmWDqyJJv1RBJP/NMFDbr179y49fdc10FqjuREyo0MbR82ldw2WG6vM2cQS6rzWHOYuQHXMAPq6NI+6qXMllm88gtY8OH4cSF69Chxfou6y8CNC1boMwnygEy4XMi5l+GWX+UV5dae2lgpf40CC17Fjxx6sjqjc7t2JKOAcnwOarZSRAX+f2c5YWx6nDmSa28wJzQ89KlTWIAx0Wc1VlMOmVKGUWkMskeSeN28ePXr0HnQnQvARoBqkN27cOAyqd/kKiM/EWZG11fnS3ww6VtStMkh+9eph9O7alf4OQRLHzFaovih6yszM7DGciPZLT++VnDw+L896+ZdH/dNap5kYpa7rkCtzJmGgkzVLon9Hc1r0Y5TzOZ1keeL4xbNX3+7ZAyRTglmBQNu2bQtbRKiwsJCYKp++fXv16jnQ69fAlK8LOcmf1cAleXcBvyKuN0H6278f4hdRds8FkpmZSDG/DWoAip7ykSoSJaDMU6iROr7V63AXzqW19PRvXiRxRW9ANWidjHOqXJ6TN5quOXHx4tkDCiWQJJAtQV0jBB+RKSF99OjNnj1vr567eBz1+jVPtSKZxQJ+CdFP8/Ua9w0mSHlrQcASUA5HSwJIoNiuXbtOLPiEVPOBKAE1PDPsVwvgaAfjVsb6EIJD5kwSaZMCfXr0ftLEeT3PxuiaE+c3AMvsDoQSSSLH1qCePcvLy3fvhh964kdgSkQDgfcpCPTA2Q0Xz58APQC572vVjS3LXXGsjotBc4FlP2BJKJEkcuzcuaKid+/eZWVl8GNFRefOyBSJElDNszjHas8ksCfVFBnrfRCnqUOSpnvl3sXEuXlfGvP8xQ0HsrM7pABLQtkVUPYsX7Ly9qTwxy9aH8OTbq/cDVCJaGHbQCArpUO24rmmKYkqGS8W/BR5K5Ev/WfMXpw8klgOzySURLJ32faDzz+Urj516uvXr6dOrS798Hz99rLeRJSAZip/jmR7ilNc2nMLc24d6tQhUYTw9VpLo7OmE+f2nNkUjFnU3mHZUpG8feGLVZOIKPBEoEHgmX2gaMP5E029rrlKxb4zOzunOLlXej/Dsp0i+XTCV5smPFVE2xmeyp4ZMVqV0pxTsA6ZxCmLkF5TcdbkOLdGORqzWwfNklBOYnpWoruBJwBtG8gCnt2y229IC02t8iuUMXs8GdOwRJRHmKSV6BEEaniSPTna7b3KPq4lJ9O0FaGokVFDKWtynFuiHI0ZdFhKlFIXVoJBMd6JZ3b7/mmhgl8B0xizh2G5XaC0Ad1uePYge3K0i1gnczb3oulbhAaBNfXLSfYoPwAw0ZiCpY9BwZ+Kp8I5p2Bq5WGyMZUvmaUPT/KntqdXtDdCc8p997iYNKO3lRNxPUVZs5EFpolyMqZg6ePPZ4Yn4iyaTNFeeZhkTKg9gqU/T6hHYE8d7RmSppMKm9lpRpX0hrqkD458dxgGOmdNCROjXBtTsPSz5xLiiTi7UbRPrTxMNqZg6ceT7EnRbsfJhWVaTG/yvrIm0JziaohS/WfyAiZEORpziazi/jwpfVJxZ5yVg4kZE4y5vvRrvCpdD/Zsk4/RrnBKmk0skb6ICQma3PLgfSivpiRMHeXxG5PTJxV3xpkwzF4IMzFjsj0p2hFnL8bpS5MjXS4350W+O1rQFDA5yhPFScmTcBZUxpndCWasjPmN5ZE9VbRDLWJ3SpqDvPMm3zK0ZQWx0jdac55WRirKy+OMclncFc7JcwoqE+Y9FMwJ3hi/G3nwLIXFEiVPDvaEaHKOnRj57jJDs5Eb5mSGicZMXBcoeRLOIo71BHOmhKkoSnnZU+Gk3FmcVymasv43VzTrumg2DaUV/RTM8IVJt27dmjTpQtg3eWaldEswdeYVe8B0g/xkJGhaccIyPh6aTaPfrUrvLvCnOTWU1r99t5SsmDC33Lq9BNZASlDzl6wMx8JZGAh2SAxn3vhkAVOo9MPTg0d6Vyj1Xo89kK+xceb2i65ESU5l2ea7F7JXrI2q31SV95UMs0MwUOgJc8ttBEkNIxI8ENGwF86uLbgSxV/O++XGhFn6HEB2hiYciLqc8AxIn6+OgTMTKpHCKVc9cdCcGXnvE2jKU6QCgJndARftXe0wt6ykvobqD6Oo5UntJQ+HlreOuxJxnGM5z2SYciEJKLE/jM030gD80AmBrvbEibsiSJ2zK0lzoKu1rGgmRcCcwxVot40l7hkJJJxmBLTgEYmiQ8O23xN/JeI4p3LOMAVLRImNduy0k/rm5yNSXJkeXG3F2WlAPuDE1Dlb0jztS5NbSCtcTQ9BkyuQjUx4pWKJILOygsFgSkpKEJSVFVBAwZ/h2JWoIKE472SDWXoQWAJKAEnnakrwhEgBqAfP7ZbUybvF+bK/KWlChwSboZG3gVIlTbKmdwXaQstH3N5gsw3UjQQPwJSAgj+Zp6xEFOsJxXmZBaZmScdpeOabm9sdvsPTcDx8UzzLJM7SMpM6Odb9afo15GbUMt3NJLc1C71gEktASSCz22tlA1EECpYmnmHvSlTE5qxcnJ86QlvFfH2QBkeTY5T6wTMewRFP3NWf8kqdHOuyk8E0a/4czVlMU1jTUoHCSwCmZokgi4r6OyoCogAU/dnCniN261iPx5x5Os4HQJxLg1WAMYllLoBM7wUaicKHdECaSzzBnhXbV9tSp471KJr13TTnM02/9uY0QXMqWZMWR+W2KEeYimVR/8lpaWlztNLSJiNQaIYST5U9pa8LhTn9rGnifL2AqY1JLNN7jUxOTi4uHo8qLobnkb3Siaeyp4z29SbWjTmZ5ljZs5Q01aujI1+dRzSp886rI7amPcqDhmUoFCqYqlUQCiFQ9KdpiJaHZayzOeOwJsV5qYSpjNlRsSyGqzF5GUp5OTnjixXPjmhPjVPGepQ5HZrjfGnaz38313Je5TjX1twtYVKUA0xgmZYWcp1NLEeg4E/gGfSI9nLHnKH4rElxLmEqY44hlq6zHiCKPMegPb1wdmJzRvXTF/nRlK13e1IoUCWIrClgmihvTyyXV2FxmkCegFNFe/nHypkzx7FmmR2mMiazFDzJnh44yxxz5tgRseGqR9NsKmxsXZouDzmroyWuAqRh0qGEZMn+xHDX0d4V/xBpziBnzgStyTDJmIal5Dke7SlxSnN6h+88QVMspuRBhgl0QKFWRxcsBTlAUc7nuXaelD31xjTsZc7Q8p/Mmj0s1lxdxjD5ANLjzJhxbj/lZc6fopkU70FGgSroljhHDLoL5LM1LKDsiThV6pTmxA2RCHUbCi9rHqlgmMKYwp4GZ6eK9V7mzMlgmq7rCT/Yu5YVJ6IgGtSNj4XgIuILRHCh+MLxAT5Q0YiPAR1QUYni20Ui6qZJQBHRLGYhAReSjbocxvWMW/0zu27n9unOuZfqm86MmWh/QEOf1DlVt6rOzUeL5vqN6iBjLdDMEn3PM4do9sFklrN63kVDr0HBmVD9ZAGix8cgo5qdQZ7vzoCpvgVwDnK9Y4IzPhAJ1T1o3gOagYMMEH2ReF6o3Qu2mxgXOKOB4CSqq0RHaEI0dxCYOpyiGD0Kzm0HEqoDzbXXPSV5wCCDiM48L9IAQtXqls7I5CFQXSd6HFL5iOrGonns6CWAWQjOS0dj6Wwu9Jv2Vjl3n06pjgPOHdrfIDT1QYaf6LPguS53yZv6cG4ZDPNvKdVVNFOif2aem4gCmDqcx8H1DJqfU6pn0bxQHM2HfjTrKdEjCk3Lc/BT0c5EOhGcoPrWYlSv3Tg04yL6G7R6a0GNKMP1LtAE1WcO3XhCaHIrg8ZCq/NjoWSnSwYZlp99olOpSTxXHiudVLlGaVav67LJRJfQTHk+FdAkFa6b4EzRBNUT4dykNYaUIdsHoJnKJhM9Cuvz8oG/4cjq8cvqBWRTAOg4QhN93mJwCtcRnECzA+EMQZMtBBbNNQmakM2te2bzqokUBHIWkU4bnBFn9V2n8NNosrngCk3muc51BGc6Hu5COAPQVEeWftlsiGoiBQUH5yDVX4tw7tqrVZxTbtn82QwMTUR6EpzNn4ImC2d5NF/mDAd1t2zOG9VECgoLTqb6DxFOSkOqbCILTyM0Q4Nz27Q0SgVNFs6h0DzrQ1OCySWbszYJcwrSg9NB9dvm11HT0BmLZofQjIUuLDQhw4ImC6egWas8KYEmj9ORhLg8orNgsSrJRfUG0pCCZv/rSTYPxF9PoakHp431Vj6p2V+n8uS5gqaynHAVaCbjNXw8Ez18XZCoTmlIiyVJQrHO4VlIMvqMZA16FB2+IjoswjnwwultSVIfBs3LPjSraShFTpkDMcOpfjsvHQh2PaU3f1EoxbIZRnS8UIK9m33hr2aa1F8Ngeb57D0gGKdbNCWl/8h+++J2I5vX7gYSPVckzDveqKKZpPTmfbdsVkIfCGeu8dFMknoYmvriTNX97a+Hk02c+1Fy4TSAs6VeIGXRbGmyGS7EFs0bpdG8TGjKfI14WQpN1o4IJVKRU3qLv92Uh5WRpKGWLTgFzU8jZPrTfrm5PTvE+G1qd+SMoEdRYh1N2UroEZqhSQjRztrRk/67QbOmohmycAg03zOaQzkAUCUsutGsBxbvOprBStyDdhCaZU6W1f0WzQZVhyNFcx5dpFA0b5lz5b7yaOIx536gyf1NtSPH/c1/PDbPWTSVuRB1ix+70fyvm0BTmwDrc6EVktMPL2VOn9ugbM7wzPKje2a5MurN3pLWm3PKxqF2DwWMgf/PQoKm4iII2PWoqio3Buf07lKe0+dogYM8wLQ4695DGt8e0kKu9T50D6mm9ZCA5j3VJV1gR67t72+eWPn9TTPK8Pc3Bc13rkR9BGgG7W+2fb33LZPQezdEx6/DvXeg+VBHU98trrrnQtGkzIUM0QfRfJBFE8dF55AcD60s8bGp6p5Zfhv1zHL735hZ3hwgOs8sBU1ldOZ3uLD7qvrFztNfT9o83S57gOg8T596btE87x32sDPwqq8lV2mP4a7HsZK7HryIxLJpx0LvXtDtUuREpaGld62r/XSC95CwJOeWzQqhyexVVg7zC5zVr8uwIzdbdkeuG7wjh70ZhCbvyMkggxtym6khRzcDOPO/COdk72/uIF9GB7IpaFINSQ05NmX4z/Ttt5O9W2x5jh8Gsjn1igHiFhIXnP7OcvvrSth7bz0Ycu8dCR3HSrv3zuTlS1LUEukRCgBD9bdFPBmV5fZkPBixJwM5aOe0tV9tfPWOEgsf07lEOs9J3foI2t8VvxAsLiX9QvvHxC8Uv0UEmKa6rsSiJ/U7giaE8+tb1csm5t/68nnZXMHZ62S9bMCTsSzgZdsXd4rNnva6Vc5ykw+W3C9GFwnCCaq7fJawBhb1WW5dHp8lvIHsC9R8ljYHseUcl0ug3FS7SJshnJbqHg8wbKvj5gGGb5U9q34P8P2cQZ0bwOwL1NOQCCeEQajO/nS2VF9L8BwPf3riqe4DCo7fNH5qvz+9m7s8YRPuMlXuSCE0yWppb4cVOPnuBLb7nxI8tbsTDo7y7gQfnEet399enlCzVydYrz/dneC82AO3Fp/1p3T9nx0uZm8uFuV03usBOL33euz/S/d6mLsoZtKLPf4wd94tTkRRFMduxN6SAUUFEaIRbFFBsBDjig1j7IqR2HvFsvbeC/beRVEQUcQ/FFECfi7vfWXOJDeTlyZ6bBtBWX85572Zt+M9i/yxHgso5HrsTLkpPjcxdAZBxybkoonWkR2lt/VBM7dWmjmzYeBwOXNmhZ45M981c2Z3s2fOnN02zMxJGYqhM6MxcmaompESPnMGA5EQdN5V3Fu6xo/bemhvycR3DJ2ROH/trjAPacS/mIekZ/gEBiJNDIxD0vN7wuch4WAPQY+JTQhbumxrwlE9dnUbdTGr62mFWV2TSmZ1Ecu/OqsLY2egnJkvNQHDugKjuiaY2VLKmHI/19bknMug48u/FZrEwpoysA8Vz5HbEDJHjnhijhxJzZEjln9xjhz+07+cfWaAkswYOYtSzj2Tc+SK0HRfLZZNOXIcUZcHH/zAhzCnxbm70ozDwcUzDoll6IzDrQ3POJyLpVPM5TNA1ZBD/k4faZRVzTiUQXcvm3JeF6IOczYwf5MUPn/zYoPzN7F0luNJefcHcE72x29SxpmlHsb7O3z+ZnhHxh6xbIprJNnA6MGcrtmw4En7EUbDmvamUZVnw06qezasGGcqhnD6w2ExGtZM2GeaGLGN2bBmSjmsKUvWUmLZLHuNlAw1Zw1zi9/vL5lb/G5r0+cWu0ftYtru9Zs8uHjstrEE8vrXHCZFE8yKc4t7ov8vVsWyKVsDpwlzorGJcTpmagPpsmXvSI3M1G58DDR0MJe7n8vppRI0y8LEohnYg7yCa9l0N1rCnPznzE70H817FyPKqxNoVpr3jhYxWBNBF8umq20V5jRZx07U/C6C1lBi6A1zdRGczdUNU3YRoPUKexCCjmWzbNTRBCzNWZJ14GxaT0YpzKhpce0RkK60i4b0ZNRXOgJjip4MWIxvuWV/OpbNSi3VcWFOk3WBs5kdLtEgSIKoC4ZZJX2LhFUzlR0uk2tJ+2/6FtrhUtoWWLKbxGUJcG3ttVg6gbORfqGLol/IcGSQhBDl1yVdoEwWTIvKmuZy2m+6ecq+O9kvhJzLDX2KLKgO34dSBZl1LJ3AWX/31VPZfRWNUqwVx96mcJvUVqg/kwXTPuvGBYrEak87xsKj+wowdc5lo/JmUZ5eqbYxIbOOpRM46+1lOyl72VpbqXFVGZK9qCmqmv1gfzJ/62WZdlVM++7aRc3SpuSuzl42YmlSPlLCRAOw3IMQVqloBXNi6Qy4c8X8ZnUG3n1CjcC9u4Cjbaq2JeDBfm8F1vfp8bcbN+6aqme91tsZSCxFZ2AfCxM5R9Bn+nsQlm+3OeXSyTijGue89WTPmvssT8o+yyfP7jz+doNIgiMjJHWQot/VUA3Trl2vHn/LJeiLkXbN80vOnfEvfv8ipRzttdz+a2CKnIs9yG3OeCFk6ewfqP6ex2lvqGuVYR49+vgxNX+/VCQtx0DFfztf5jeCTBXQ/kSUWuVLulZVQai7GtTvBg12ra7btbF3Px9meWvKcmq3OXEKzzj9WnqkvfYeYDam/frR0aNHH715Q13/bTVJy5EZRoy6G5mXFqtiykCJKHXQn+ea/qIe4CG6UTmkB/j6WWVL9NYi5esIJj0qA5hlrYmLTbc504ViJdJqJyIz6LT3DKZ9hOWpgKqO6nfBu3PuqN5d1FFtWT569ebAixe3r3Q2JAGyeyeW56Uz8YWbV2ZT8eTy9F7P49/sDqYEVFv03PbtVOh/6JDfUT1gLjqqj3z5uSSXo5Lq+3SnvuTnl5voqJ47wHYq25SPI5Zv/UZ/wJTWRNBrNmdC7URkBlP0b+8y2Z6Kp+hP5/r03dyfThxtf7pZL9VWTihfHThAKK/cumxI+hy9zMpVW6ZN2Vko1bE1a0+k0p5hykSNRR8yUDIo96ebIoyi/vRtY7W2Ffen2z56YqlTziyvdt1OxuwWBhPWxB7kMKfEyX+LTTvbs4+1p89zUqDbf7jo9ieSbEuV8UvXFMoDn58TynsdtScVSG916kRsesGh6bFNC9MeE1UeNUCNQZnnyKG6kH6C6PanF5qkraJHFz23hu869Lbr9u3amBqmzLmwpsOcyDo07VT3iEk729Pn2dpqeGqgTJSRKjFE5kggmSShpFr/S9eIZTFK7UkvvilRqEGxHWRStqgBSjy1QS+M+WEMykS5oIk1mSCy5s5VJI0tFxBLDrlhycY891AbM9J9Zr5QLuewZlXmFFlnrdmLtJfwfHKUaukVUEuUmVoNYpBM8tN3YvmKFktGSSzv3WMDKFN66c35Qu1KnMiQRS1QGPQ1G5SAMlFGyppAEEnEUZE0tpzNLGcEWG6nkBtjLp9VKNEck3NY021OZL3Mdae2p+ZJ62dUF9M/eUZAr/lEuZ/J1yReKRXJa69evXnDtlQoO9p8e6lYoX7FFp5SQIVBxyzQRJkpazz/xByZJLuSbMkZn6H2Hs2SjalYRpDyMjnv36UvW9NpTmS9PM6IsSd49olGiacGaokyU4hBMsnHhJL2nedXrlwGylMtiUKjOryDHWoN+sE3qCJKSAkqaSj9IIwEUpFUtqTnkwglsVSbTyDknTI4NoI1Tc71eYdTODhhnGskTk/ZEzy7ENCPH1tb6USXgRJR0jXWJV/04tWjx4SSr4bMYmlduXBLoTmKpcsZ9NDrC/SwDDElTZw48QeJOSqSixZPXbfOojwOlirkHozpzrk769iJpD2DPAmoIkoiqJroM2L6CFIk9YWlj7Kd2nUaCbg06EJpUH1RT9ehsy9ovabXJLq359MSoOSN3LBEyCVMDqbIuTvr2IkEztXgae/smGjv3nSUS1TvBPSYRCRvMEmg1LZc7kDZsEGJpwH6mvkZ7SKtU6IP6LVB2TbIMrMlDKbMuTvrITsR4g6efGdnjsj0ce431o0b9F3pBcmQDKI89WCam03jK6gFev7q1atv3/o81S8M8vjxfoSyLaMEy72xggOmyLkbp9yJJE+2gCFq9JKwvrS6/fI2gbQkfZRedkvhLyq2FwZloJ2Z6Hb6vK72Ox6Qf5DaqzOj1Czlgilhcs5hzdp2ovS+UJ64s7PnjoSVxAe7Wu2JY7d7liSuhv6yYnEYVH1yD/0jUSscpBqUmuXqWMENEzmvdSeKdFo9x7FGaaLmSBeHvDhb80nWuO9MmZXIr121pyWbXdlyYtOqpUvz+6ZXDZR54u3WCSKmRvx+2wNArD+ZsM/udCoIEzmvdSdqE+l+KuyfkFjp6cMHjdSIAFq1CZ4JecnqLyyn5zdlk8lOWt1ZnYwy8ZVn8rOqu6jXQHF8x0x9ddMgg+tP6Kc3J90pUh9MLJ04RwmnsGVz2hLFea6FaDiyJ5c/yFcLcmlLKqkZ8l8L4a8jpsnNawpu5bPi7e5oxB8jNQhNSMojbeqECZw440tUNMHKjKf++ZGgjKG8dKpl6bSqPZlNKo54cwyG4jdJMc3EN1VB9PDmvR6ORCGExrWUzzEprxMmcOL8OTOlUFGzYmc2p5af8jxzyLuaTnlTC/fEkEk3yRbKtgGpEJrVmCOqP4CjNFHy6MpqLLplT+qUJ95uHRov3iIuMIQxVcoBsx6ctHb26084zdlUlWvesX1zdp4u1KzpO5LGk3KVM5cHWtjamChbNMtA3cqf2JFcTUytvNXJ7B7tSYcxcawLmPXg7N3F4ETa/4ZmZa0pxQ7ctli9/K9pWqIMNFl9AnbOmTJrWmLNlDk41nca06YcX/+uR1F6Die4F6X/Cs9ZLQal9qQCiavDrkXCVaImaoASzyyANk9z4sqYSDku2utRH+xF+v410XSWAZT4oi4ekCH1tlKv1B0MiCqgMGhzWRpjIuUCZv17keK5MNFMlHQpZFHiDrU/cbTPGbF6GPHH9jmlfpqoAWoNurIpQLFgRmBMkfL69yKVdsszlWgSyoXKlkDJJBklgcSDhaSolvpYPc/JTA1RBho0aLxJPKdoljAmUt4oTpX25vKctRkJNyg1yS5MEg8TCuHxTiJqgBYbtGV64yzjPksYEzAbUVQvnkU8l/9p345ZEwaiOIBLF1uoECzUfgXB1VnElIBbyRIkOCQu6pAh0KlQOvR7917uHv87H4LGS0wh/w4tnR6/9y6YZ3KTZx45F0tQsuQlVZGoBhUDWqy9WcrB9HTaXc/3mgOa/xYfQ/diCcpqJq/pM4FiQH1cQRfxqaXHwcRpP/GsA5pvY5K0plKPJShrHJxzAzqPw+spfxQl9uBk6XUwUbTryaCbw/KyOmdJypJMiRMuKWsP6IgHlECL8EpKOjTCEpU15okHNDaboszOlx0et4epgoQkUToXy1sLDsSAAnQaJeEFkkkMykYtpSdKZtGhMp2mZbLLvpa5unM7viXbfRml8dw4PjmSLiU94ID4GVCAquLmq2gXnoXM9pUkKBu2lJ4MqkWxd+Rgy4vFJyRBKU64rwEFKEgPZZLN1qG6Rf/+XIT58piU6WqKU4PPvQ1bwpNHADWruNth7Hid3Rok/VPKAX3EZgSkInprJa4/xlIemUY8xwyKb1YMKoJlN0NC0iulHFAGRW0nzUbLcWpsyjYs4cklu4/9j2ifyxlVP85LFJAEZTPVARTtlt3GqbFXBETZhqUsmUVp7ahREaOIF3xsyUZrDWxQm5RDghRyxAIQlDU67QO0EsXbUtqVIl8+a0cSoNxukIpui1PTOqW8VeYVGaGqvOo862C3BsmWwsWBlGK+SkfLCZIl70EpRXXZhGpnTBEv7bYZfgXWtBvNftC/0G0tGQw6kIk2pcLt0D/u5YjaiNRsRMnUzdhAdkXSMZ0ETiYqg24k4CPk5v7d/q9Bt19U9F+d6XafPn369Olza/4AHTMK9clhnYAAAAAASUVORK5CYII="},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMDAwIDE3MSIgd2lkdGg9IjIwMDAiIGhlaWdodD0iMTcxIj4KICA8ZGVmcz4KICAgIDxsaW5lYXJHcmFkaWVudCBpZD0idGV4dEdyYWQiIHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjAlIj4KICAgICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3R5bGU9InN0b3AtY29sb3I6I2ZhZjQ5OTtzdG9wLW9wYWNpdHk6MSIgLz4KICAgICAgPHN0b3Agb2Zmc2V0PSI0NSUiIHN0eWxlPSJzdG9wLWNvbG9yOiNmNjcyYzI7c3RvcC1vcGFjaXR5OjEiIC8+CiAgICAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3R5bGU9InN0b3AtY29sb3I6IzZmZjllYTtzdG9wLW9wYWNpdHk6MSIgLz4KICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICA8ZmlsdGVyIGlkPSJnbG93IiB4PSItMTAlIiB5PSItNTAlIiB3aWR0aD0iMTIwJSIgaGVpZ2h0PSIyMDAlIj4KICAgICAgPGZlR2F1c3NpYW5CbHVyIGluPSJTb3VyY2VHcmFwaGljIiBzdGREZXZpYXRpb249IjUiIHJlc3VsdD0iYmx1ciIgLz4KICAgICAgPGZlTWVyZ2U+CiAgICAgICAgPGZlTWVyZ2VOb2RlIGluPSJibHVyIiAvPgogICAgICAgIDxmZU1lcmdlTm9kZSBpbj0iU291cmNlR3JhcGhpYyIgLz4KICAgICAgPC9mZU1lcmdlPgogICAgPC9maWx0ZXI+CiAgPC9kZWZzPgogIDx0ZXh0CiAgICB4PSIxMDAwIgogICAgeT0iMTI1IgogICAgZm9udC1mYW1pbHk9IidUdyBDZW4gTVQnLCAnQ2VudHVyeSBHb3RoaWMnLCBGdXR1cmEsICdUcmVidWNoZXQgTVMnLCBzYW5zLXNlcmlmIgogICAgZm9udC1zaXplPSIxMTAiCiAgICBmb250LXdlaWdodD0iYm9sZCIKICAgIGxldHRlci1zcGFjaW5nPSIxMiIKICAgIHRleHQtYW5jaG9yPSJtaWRkbGUiCiAgICBmaWxsPSJ1cmwoI3RleHRHcmFkKSIKICAgIGZpbHRlcj0idXJsKCNnbG93KSI+dGhyZWUud3M8L3RleHQ+Cjwvc3ZnPgo="},function(e,t,n){var r,i,o={},a=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=r.apply(this,arguments)),i}),s=function(e,t){return t?t.querySelector(e):document.querySelector(e)},c=function(e){var t={};return function(e,n){if("function"==typeof e)return e();if(void 0===t[e]){var r=s.call(this,e,n);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}}(),l=null,u=0,h=[],d=n(207);function p(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=o[r.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](r.parts[a]);for(;a<r.parts.length;a++)i.parts.push(b(r.parts[a],t))}else{var s=[];for(a=0;a<r.parts.length;a++)s.push(b(r.parts[a],t));o[r.id]={id:r.id,refs:1,parts:s}}}}function f(e,t){for(var n=[],r={},i=0;i<e.length;i++){var o=e[i],a=t.base?o[0]+t.base:o[0],s={css:o[1],media:o[2],sourceMap:o[3]};r[a]?r[a].parts.push(s):n.push(r[a]={id:a,parts:[s]})}return n}function m(e,t){var n=c(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=h[h.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),h.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var i=c(e.insertAt.before,n);n.insertBefore(t,i)}}function g(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=h.indexOf(e);t>=0&&h.splice(t,1)}function y(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var r=function(){0;return n.nc}();r&&(e.attrs.nonce=r)}return v(t,e.attrs),m(e,t),t}function v(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function b(e,t){var n,r,i,o;if(t.transform&&e.css){if(!(o="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=o}if(t.singleton){var a=u++;n=l||(l=y(t)),r=E.bind(null,n,a,!1),i=E.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",v(t,e.attrs),m(e,t),t}(t),r=x.bind(null,n,t),i=function(){g(n),n.href&&URL.revokeObjectURL(n.href)}):(n=y(t),r=A.bind(null,n),i=function(){g(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=f(e,t);return p(n,t),function(e){for(var r=[],i=0;i<n.length;i++){var a=n[i];(s=o[a.id]).refs--,r.push(s)}e&&p(f(e,t),t);for(i=0;i<r.length;i++){var s;if(0===(s=r[i]).refs){for(var c=0;c<s.parts.length;c++)s.parts[c]();delete o[s.id]}}}};var _,w=(_=[],function(e,t){return _[e]=t,_.filter(Boolean).join("\n")});function E(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=w(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function A(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function x(e,t,n){var r=n.css,i=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(r=d(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var i,o=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?e:(i=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:r+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")}))}},function(e,t,n){const r='<a-scene\n bind__beat-generator="challengeId: challenge.id; difficulty: challenge.difficulty; beatmapCharacteristic: challenge.beatmapCharacteristic; gameMode: gameMode; has3DOFVR: has3DOFVR; hasSongLoadError: hasSongLoadError; isPlaying: isPlaying; isZipFetching: isZipFetching; menuSelectedChallengeId: menuSelectedChallenge.id; songDuration: challenge.metadata.duration; speed: speed"\n bind__beat-system="gameMode: gameMode; hasVR: hasVR; isLoading: isLoading; isPlaying: isPlaying"\n bind__gameover="isGameOver: isGameOver"\n bind__intro-song="isPlaying: menuActive && !menuSelectedChallenge.id; isSearching: isSearching"\n bind__leaderboard="difficulty: menuSelectedChallenge.difficulty || challenge.difficulty; beatmapCharacteristic: menuSelectedChallenge.beatmapCharacteristic || challenge.beatmapCharacteristic; gameMode: gameMode; inVR: inVR; isVictory: isVictory; menuSelectedChallengeId: menuSelectedChallenge.id; challengeId: challenge.id"\n bind__search="difficultyFilter: difficultyFilter; genre: genre; playlist: playlist; query: search.query"\n bind__song="audio: challenge.audio; challengeId: challenge.id; isLoading: isLoading; isPlaying: isPlaying; isBeatsPreloaded: challenge.isBeatsPreloaded; isGameOver: isGameOver; isVictory: isVictory"\n bind__song-preview-system="selectedChallengeId: menuSelectedChallenge.id; selectedChallengeVersion: menuSelectedChallenge.version"\n bind__stage-colors="colorScheme: colorScheme"\n bind__tunnels="isPlaying: isPlaying; songDuration: challenge.metadata.duration"\n bind__zip-loader="difficulties: menuDifficulties; isLoading: isLoading; version: menuSelectedChallenge.version; directDownload: menuSelectedChallenge.directDownload; bpm: menuSelectedChallenge.metadata.bpm"\n animation__gameover="property: object3D.background; type: color; to: #750000; startEvents: gameover"\n agent-picker\n console-shortcuts\n debug-beat-generator\n debug-beat-positioning\n debug-controller\n debug-intro\n debug-song-time\n debug-state\n hack\n gpu-preloader\n \n leaderboard\n multiplayer\n loading-screen="backgroundColor: #000"\n pool__beat-arrow-blue="mixin: arrowBlueBeat; size: 30; container: #beatContainer; dynamic: true"\n pool__beat-arrow-red="mixin: arrowRedBeat; size: 30; container: #beatContainer; dynamic: true"\n pool__beat-dot-blue="mixin: dotBlueBeat; size: 30; container: #beatContainer; dynamic: true"\n pool__beat-dot-red="mixin: dotRedBeat; size: 30; container: #beatContainer; dynamic: true"\n pool__beat-mine="mixin: mine; size: 30; container: #beatContainer"\n pool__plume-arrow-blue="mixin: arrowBluePlume; size: 30; container: #beatContainer; dynamic: true"\n pool__plume-arrow-red="mixin: arrowRedPlume; size: 30; container: #beatContainer; dynamic: true"\n pool__plume-dot-blue="mixin: dotBluePlume; size: 30; container: #beatContainer; dynamic: true"\n pool__plume-dot-red="mixin: dotRedPlume; size: 30; container: #beatContainer; dynamic: true"\n pool__plume-mine="mixin: minePlume; size: 12; container: #beatContainer; dynamic: true"\n pool__beat-broken-blue="mixin: blueBeatBroken; size: 10; container: #rigContainer; dynamic: true"\n pool__beat-broken-red="mixin: redBeatBroken; size: 10; container: #rigContainer; dynamic: true"\n pool__beat-broken-blue-dot="mixin: blueDotBroken; size: 10; container: #rigContainer; dynamic: true"\n pool__beat-broken-red-dot="mixin: redDotBroken; size: 10; container: #rigContainer; dynamic: true"\n pool__punch-broken-blue-dot="mixin: blueDotPunchBroken; size: 10; container: #rigContainer; dynamic: true"\n pool__punch-broken-red-dot="mixin: redDotPunchBroken; size: 10; container: #rigContainer; dynamic: true"\n pool__beat-broken-mine="mixin: mineBroken; size: 10; container: #rigContainer; dynamic: true"\n pool__beat-fx-blue="mixin: blueBeatFX; size: 10; container: #rigContainer; dynamic: true"\n pool__beat-fx-red="mixin: redBeatFX; size: 10; container: #rigContainer; dynamic: true"\n pool__beat-fx-mine="mixin: mineFX; size: 12; container: #rigContainer; dynamic: true"\n pool__punch-fx-blue="mixin: bluePunchFX; size: 10; container: #rigContainer; dynamic: true"\n pool__punch-fx-red="mixin: redPunchFX; size: 10; container: #rigContainer; dynamic: true"\n pool__punch-fx-mine="mixin: yellowPunchFX; size: 12; container: #rigContainer; dynamic: true"\n pool__tunnels="mixin: tunnel; size: 10; container: #tunnelsContainer; dynamic: true"\n pool__wall="mixin: wall; size: 20; container: #wallContainer; dynamic: true"\n proxy-event__cleargame1="event: gamemenuexit; as: cleargame; to: a-scene"\n proxy-event__cleargame2="event: gamemenurestart; as: cleargame; to: a-scene"\n proxy-event__cleargame3="event: songcomplete; as: cleargame; to: a-scene"\n proxy-event__pausegame="event: pausegame; as: textglowoff; to: a-scene"\n proxy-event__resumegame="event: gamemenuresume; as: textglownormal; to: a-scene"\n play-sound__crescendo="sound: #crescendo; event: victory; volume: 0.75"\n render-order="stage, aurora, sideglow, tunnel, curve, curveshadow, beatShadow, score, beats, menu, menuitem, menubutton, menutext, menugenre, cursor, particles, weapon, victory, stepback"\n stats-param\n tunnels\n vr-mode-ui="enterVRButton: #vrButton">\n\n <a-assets timeout="3000">\n \x3c!-- <require path="/workspaces/three.ws/rider/src/assets.html"> --\x3e\n<a-asset-item id="VigaRegularThree" src="assets/fonts/Viga-Regular-Three.json"></a-asset-item>\n<a-asset-item id="agentGlb" src="assets/avatars/cz.glb"></a-asset-item>\n\n<a-asset-item id="arrowredObj" src="assets/models/arrowred.obj"></a-asset-item>\n<a-asset-item id="arrowblueObj" src="assets/models/arrowblue.obj"></a-asset-item>\n<a-asset-item id="beatObj" src="assets/models/beat.obj"></a-asset-item>\n<a-asset-item id="laserObj" src="assets/models/laser/laser.obj"></a-asset-item>\n\n<a-asset-item id="tunnelObj" src="assets/models/tunnel.obj"></a-asset-item>\n<a-asset-item id="redBeatObj" src="assets/models/redbeat.obj"></a-asset-item>\n<a-asset-item id="blueBeatObj" src="assets/models/bluebeat.obj"></a-asset-item>\n<a-asset-item id="dotRedObj" src="assets/models/dotred.obj"></a-asset-item>\n<a-asset-item id="dotBlueObj" src="assets/models/dotblue.obj"></a-asset-item>\n<a-asset-item id="backGlowObj" src="assets/models/backglow.obj"></a-asset-item>\n<a-asset-item id="aurorasObj" src="assets/models/auroras.obj"></a-asset-item>\n<a-asset-item id="merkabaObj" src="assets/models/merkaba.obj"></a-asset-item>\n<a-asset-item id="ringsObj" src="assets/models/rings.obj"></a-asset-item>\n<a-asset-item id="homeObj" src="assets/models/home.obj"></a-asset-item>\n<a-asset-item id="homeShadowObj" src="assets/models/homeshadow.obj"></a-asset-item>\n<a-asset-item id="weaponObj" src="assets/models/weapon.obj"></a-asset-item>\n<a-asset-item id="weaponHandleObj" src="assets/models/weaponhandle.obj"></a-asset-item>\n<a-asset-item id="weaponGlowObj" src="assets/models/weaponglow.obj"></a-asset-item>\n<a-asset-item id="beatBrokenObj" src="assets/models/beatbroken.obj"></a-asset-item>\n<a-asset-item id="dotBrokenObj" src="assets/models/dotbroken.obj"></a-asset-item>\n<a-asset-item id="dotPunchBrokenObj" src="assets/models/dotbroken.gltf"></a-asset-item>\n<a-asset-item id="cutfxObj" src="assets/models/cutfx.obj"></a-asset-item>\n<a-asset-item id="punchfxObj" src="assets/models/punchfx.obj"></a-asset-item>\n<a-asset-item id="leftFistObj" src="assets/models/leftfist.obj"></a-asset-item>\n<a-asset-item id="leftFistWeaponObj" src="assets/models/leftfistweapon.obj"></a-asset-item>\n<a-asset-item id="rightFistObj" src="assets/models/rightfist.obj"></a-asset-item>\n<a-asset-item id="rightFistWeaponObj" src="assets/models/rightfistweapon.obj"></a-asset-item>\n<a-asset-item id="plumeObj" src="assets/models/plume.obj"></a-asset-item>\n\n<a-asset-item id="mineObj" src="assets/models/mine.obj"></a-asset-item>\n<a-asset-item id="mineBrokenObj" src="assets/models/minebroken.gltf"></a-asset-item>\n\n\x3c!--\n https://freesound.org/people/juskiddink/sounds/70043/\n https://freesound.org/people/Robinhood76/sounds/337436/\n--\x3e\n<audio id="confirmSound" src="assets/sounds/beatHit.ogg"></audio>\n<audio id="clearSound" src="assets/sounds/clear.ogg"></audio>\n<audio id="hoverSound" src="assets/sounds/hover.ogg"></audio>\n<audio id="victorySound" src="assets/sounds/victory.ogg"></audio>\n<audio id="crescendo" src="assets/sounds/crescendo.ogg"></audio>\n\n\n<audio id="hitSound1" src="assets/sounds/hit1.ogg"></audio>\n<audio id="hitSound1left" src="assets/sounds/hit1left.ogg"></audio>\n<audio id="hitSound1right" src="assets/sounds/hit1right.ogg"></audio>\n\n<audio id="hitSound2" src="assets/sounds/hit2.ogg"></audio>\n<audio id="hitSound2left" src="assets/sounds/hit2left.ogg"></audio>\n<audio id="hitSound2right" src="assets/sounds/hit2right.ogg"></audio>\n\n<audio id="hitSound3" src="assets/sounds/hit3.ogg"></audio>\n<audio id="hitSound3left" src="assets/sounds/hit3left.ogg"></audio>\n<audio id="hitSound3right" src="assets/sounds/hit3right.ogg"></audio>\n\n<audio id="hitSound4" src="assets/sounds/hit4.ogg"></audio>\n<audio id="hitSound4left" src="assets/sounds/hit4left.ogg"></audio>\n<audio id="hitSound4right" src="assets/sounds/hit4right.ogg"></audio>\n\n<audio id="hitSound5" src="assets/sounds/hit5.ogg"></audio>\n<audio id="hitSound5left" src="assets/sounds/hit5left.ogg"></audio>\n<audio id="hitSound5right" src="assets/sounds/hit5right.ogg"></audio>\n\n<audio id="hitSound6" src="assets/sounds/hit6.ogg"></audio>\n<audio id="hitSound6left" src="assets/sounds/hit6left.ogg"></audio>\n<audio id="hitSound6right" src="assets/sounds/hit6right.ogg"></audio>\n\n<audio id="hitSound7" src="assets/sounds/hit7.ogg"></audio>\n<audio id="hitSound7left" src="assets/sounds/hit7left.ogg"></audio>\n<audio id="hitSound7right" src="assets/sounds/hit7right.ogg"></audio>\n\n<audio id="hitSound8" src="assets/sounds/hit8.ogg"></audio>\n<audio id="hitSound8left" src="assets/sounds/hit8left.ogg"></audio>\n<audio id="hitSound8right" src="assets/sounds/hit8right.ogg"></audio>\n\n<audio id="hitSound9" src="assets/sounds/hit9.ogg"></audio>\n<audio id="hitSound9left" src="assets/sounds/hit9left.ogg"></audio>\n<audio id="hitSound9right" src="assets/sounds/hit9right.ogg"></audio>\n\n<audio id="hitSound10" src="assets/sounds/hit10.ogg"></audio>\n<audio id="hitSound10left" src="assets/sounds/hit10left.ogg"></audio>\n<audio id="hitSound10right" src="assets/sounds/hit10right.ogg"></audio>\n\n\n<img id="cursorMeshImg" src="assets/models/laser/laser.png">\n<img id="downIconImg" src="assets/img/downIcon.png">\n<img id="envmapTemplateImg" src="assets/img/envmap.png">\n<img id="envmapImg">\n<img id="favoriteImg" src="assets/img/favorite.png">\n<img id="sliceImg" src="assets/img/slice.png">\n<img id="stepbackImg" src="assets/img/stepback.png">\n<img id="soundboxingImg" src="assets/img/soundboxing.jpg">\n<img id="genresImg" src="assets/img/genres.png">\n<img id="starImg" src="assets/img/star.png">\n<img id="merkabaBloomImg" src="assets/img/merkababloom.png">\n<img id="homeShadowImg" src="assets/img/homeshadow.jpg">\n<img id="backGlowImg" src="assets/img/backglow.png">\n<img id="weaponImg" src="assets/img/weapon.jpg">\n<img id="weapon2Img" src="assets/img/weapon2.jpg">\n<img id="weaponHandleImg" src="assets/img/weaponhandle.png">\n<img id="difficultyImg" src="assets/img/difficulty.png">\n<img id="selectedImg" src="assets/img/selected.png">\n<img id="cutfxImg" src="assets/img/cutfx.png">\n\x3c!--\n<img id="cutFxTemplateImg" src="assets/img/cutfx.png">\n<img id="cutFxImg">\n--\x3e\n<img id="minefxImg" src="assets/img/minefx.png">\n<img id="sideglowImg" src="assets/img/sideglow.png">\n<img id="logoImg" src="assets/img/logo.svg">\n<img id="moonImg" src="assets/img/moon.png">\n<img id="plumeImg" src="assets/img/plume.png">\n<img id="tubeImg" src="assets/img/tube.png">\n<img id="tubeColorImg" src="assets/img/tube.jpg">\n<img id="handStarTrailImg" src="assets/img/handstartrail.png">\n\n<img id="modeRideImg" src="assets/img/moderide.jpg">\n<img id="modeClassicImg" src="assets/img/modeclassic.jpg">\n<img id="modePunchImg" src="assets/img/modepunch.jpg">\n<img id="modeViewerImg" src="assets/img/modeviewer.jpg">\n\n<a-mixin id="slice" slice9="color: #050505; transparent: true; opacity: 0.9; src: #sliceImg; left: 50; right: 52; top: 50; bottom: 52; padding: 0.18"></a-mixin>\n<a-mixin id="font" text="font: assets/fonts/Viga-Regular.json; shader: msdf; letterSpacing: 1"></a-mixin>\n\n<a-mixin id="superKeyboardTextInput" mixin="font"></a-mixin>\n\n<a-mixin id="beat"></a-mixin>\n<a-mixin id="beatBlock"></a-mixin>\n<a-mixin id="beatSign"></a-mixin>\n\n<a-mixin id="arrowBlueBeat" mixin="beat" beat="color: blue; type: arrow"></a-mixin>\n<a-mixin id="arrowRedBeat" mixin="beat" beat="color: red; type: arrow"></a-mixin>\n<a-mixin id="dotBlueBeat" mixin="beat" beat="color: blue; type: dot"></a-mixin>\n<a-mixin id="dotRedBeat" mixin="beat" beat="color: red; type: dot"></a-mixin>\n<a-mixin id="mine" mixin="beat" beat="type: mine"></a-mixin>\n<a-mixin id="beatShadow" mixin="beat" geometry="primitive: plane; width: 0.7; height: 0.6" rotation="-90 0 0" material="src: #minefxImg; shader: flat; color: #000; transparent: true; opacity: 0.2" render-order="beatShadow"></a-mixin>\n\n<a-mixin id="plume" plume obj-model="obj: #plumeObj"></a-mixin>\n<a-mixin id="arrowBluePlume" mixin="plume" plume="type: arrow; color: blue" materials="name: arrowBluePlume"></a-mixin>\n<a-mixin id="arrowRedPlume" mixin="plume" plume="type: arrow; color: red" materials="name: arrowRedPlume"></a-mixin>\n<a-mixin id="dotBluePlume" mixin="plume" plume="type: dot; color: blue" materials="name: dotBluePlume"></a-mixin>\n<a-mixin id="dotRedPlume" mixin="plume" plume="type: dot; color: red" materials="name: dotRedPlume"></a-mixin>\n<a-mixin id="minePlume" mixin="plume" plume="type: mine" materials="name: minePlume"></a-mixin>\n\n<a-mixin\n id="superCut"\n bind__supercutfx="colorPrimary: colorPrimary; colorSecondary: colorSecondary"\n supercutfx\n geometry="primitive: plane; width: 3; height: 3"\n material="shader: superCutFxShader; transparent: true; depthWrite: false"></a-mixin>\n\n<a-mixin\n id="redBeatBroken"\n obj-model="obj: #beatBrokenObj"\n beat-cut-fx="color: red"\n render-order="beats"></a-mixin>\n<a-mixin\n id="blueBeatBroken"\n obj-model="obj: #beatBrokenObj"\n beat-cut-fx="color: blue"\n render-order="beats"></a-mixin>\n<a-mixin\n id="redDotBroken"\n obj-model="obj: #dotBrokenObj"\n beat-cut-fx="color: red; type: dot"\n render-order="beats"></a-mixin>\n<a-mixin\n id="blueDotBroken"\n obj-model="obj: #dotBrokenObj"\n beat-cut-fx="color: blue; type: dot"\n render-order="beats"></a-mixin>\n\n<a-mixin\n id="redDotPunchBroken"\n gltf-model="#dotPunchBrokenObj"\n beat-cut-fx="color: red; type: dot"\n render-order="beats"></a-mixin>\n<a-mixin\n id="blueDotPunchBroken"\n gltf-model="#dotPunchBrokenObj"\n beat-cut-fx="color: blue; type: dot"\n render-order="beats"></a-mixin>\n\n<a-mixin\n id="redBeatFX"\n bind__material="color: colorPrimary"\n obj-model="obj: #cutfxObj"\n material="shader: cutfxShader; progress: 1"\n render-order="menu"\n animation="property: components.material.material.uniforms.progress.value; from: 0; to: 1; dur: 400; loop: false; easing: linear; startEvents: explode"></a-mixin>\n\n<a-mixin\n id="blueBeatFX"\n bind__material="color: colorSecondary"\n obj-model="obj: #cutfxObj"\n material="shader: cutfxShader; progress: 1"\n render-order="menu"\n animation="property: components.material.material.uniforms.progress.value; from: 0; to: 1; dur: 400; loop: false; easing: linear; startEvents: explode"></a-mixin>\n\n<a-mixin\n id="mineBroken"\n gltf-model="#mineBrokenObj"\n beat-cut-fx="type: mine"\n render-order="beats"></a-mixin>\n\n<a-mixin\n id="mineFX"\n geometry="primitive: plane; width: 0.6; height: 0.6"\n material="shader: flat; transparent: true; src: #minefxImg; color: #fff568; depthWrite: false"\n render-order="menu"\n animation="property: components.material.material.opacity; from:1; to:0; dur: 400; loop: false; easing: linear; startEvents: explode"></a-mixin>\n\n<a-mixin\n id="redPunchFX"\n bind__material="color: colorPrimary"\n obj-model="obj: #punchfxObj"\n material="shader: cutfxShader; progress: 1"\n render-order="menu"\n animation="property: components.material.material.uniforms.progress.value; from: 0; to: 1; dur: 600; loop: false; easing: linear; startEvents: explode"></a-mixin>\n\n<a-mixin\n id="bluePunchFX"\n bind__material="color: colorSecondary"\n obj-model="obj: #punchfxObj"\n material="shader: cutfxShader; progress: 1"\n render-order="menu"\n animation="property: components.material.material.uniforms.progress.value; from: 0; to: 1; dur: 600; loop: false; easing: linear; startEvents: explode"></a-mixin>\n\n<a-mixin\n bind__material="color: colorTertiary"\n id="yellowPunchFX"\n obj-model="obj: #punchfxObj"\n material="shader: cutfxShader; progress: 1"\n render-order="menu"\n animation="property: components.material.material.uniforms.progress.value; from: 0; to: 1; dur: 600; loop: false; easing: linear; startEvents: explode"></a-mixin>\n\n<a-mixin\n id="wall"\n material="shader: wallShader; transparent: true; side: double; opacity: 0"\n animation__fadein="property: components.material.material.uniforms.opacity.value; from: 0; to: 1; easing: easeInCubic; autoplay: false; dur: 1500"\n animation__scalein="property: object3D.position.y; from: -5; to: 0; easing: easeInOutElastic; autoplay: false; dur: 1500"\n render-order\n wall></a-mixin>\n\n<a-mixin\n id="tunnel"\n obj-model="obj: #tunnelObj"\n materials="name: tunnel"></a-mixin>\n\n<a-mixin\n id="bigMenuButton"\n geometry="primitive: plane; width: 1.15; height: 0.23"\n material="shader: panelShader; brightness: 0.5; borderWidth: 0.05; ratio: 4; borderRadius: 0.6"\n animation__mouseenter1="property: components.material.material.uniforms.activePanel.value; from: 0; to: 1; startEvents: mouseenter; pauseEvents: mouseleave; dur: 100"\n animation__mouseleave1="property: components.material.material.uniforms.activePanel.value; from: 1; to: 0; startEvents: mouseleave; pauseEvents: mouseenter; dur: 100"\n animation__mouseenter2="property: scale; from: 1 1 1; to: 1.04 1.04 1.04; startEvents: mouseenter; pauseEvents: mouseleave; dur: 80"\n animation__mouseleave2="property: scale; to: 1 1 1; from: 1.04 1.04 1.04; startEvents: mouseleave; pauseEvents: mouseenter; dur: 80"\n render-order="menubutton"></a-mixin>\n\n<a-mixin id="cancelSoundUI" play-sound__cancel="event: click; sound: #clearSound; volume: 0.5"></a-mixin>\n<a-mixin id="clickSoundUI" play-sound__click="event: click; sound: #confirmSound; volume: 0.25"></a-mixin>\n<a-mixin id="hoverSoundUI" play-sound__hover="event: mouseenter; sound: #hoverSound; volume: 0.1"></a-mixin>\n\x3c!-- </require> --\x3e</require>\n </a-assets>\n\n <a-entity id="beatObjTemplate" obj-model="obj: #beatObj" visible="false"></a-entity>\n <a-entity id="redBeatObjTemplate" obj-model="obj: #redBeatObj" visible="false"></a-entity>\n <a-entity id="blueBeatObjTemplate" obj-model="obj: #blueBeatObj" visible="false"></a-entity>\n <a-entity id="dotRedObjTemplate" obj-model="obj: #dotRedObj" visible="false"></a-entity>\n <a-entity id="dotBlueObjTemplate" obj-model="obj: #dotBlueObj" visible="false"></a-entity>\n <a-entity id="mineObjTemplate" obj-model="obj: #mineObj" visible="false"></a-entity>\n <a-entity id="cursorLaser" obj-model="obj: #laserObj" visible="false"></a-entity>\n\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/loading.html"> --\x3e\n<a-entity\n id="loadingSongInfoContainer"\n bind__animation__scale="enabled: isLoading"\n bind__visible="isLoading"\n animation__scale="property: scale; from: 1 1 1; to: 1.05 1.05 1.05; dir: alternate; loop: true; dur: 1200; easing: easeInOutCubic"\n position="0 1.5 -2">\n\n <a-entity\n id="loadingMenuBackground"\n bind-toggle__raycastable="isLoading"\n render-order="menu"\n geometry="primitive: plane; width: 1.15; height: 1.2"\n material="shader: panelShader; ratio: 1.15; borderRadius: 0.4"\n position="0 0 -0.03"></a-entity>\n\n <a-entity id="loadingSongImage"\n copy-texture="from: #menuSelectedChallengeImage"\n geometry="primitive: plane; buffer: false; skipCache: true; height: 0.3; width: 0.3"\n material="shader: flat; transparent: false"\n position="0 0.24 0"\n render-order="menu"></a-entity>\n\n <a-entity id="loadingSongInfo">\n <a-entity\n position="0 -0.05 0"\n mixin="font"\n bind__text="color: colorSecondary"\n bind__text-truncate="value: challenge.songSubName + \' - \' + challenge.author"\n text="wrapCount: 40; align: center"\n text-truncate="length: 35"\n render-order="menutext"></a-entity>\n\n <a-entity position="0 -0.13 0"\n mixin="font"\n text="align: center; color: #FFF; wrapCount: 21; baseline: top; lineHeight: 36; width: 0.81"\n bind__text="value: challenge.metadata.songName"\n render-order="menutext"></a-entity>\n\n <a-entity\n id="loadingText"\n mixin="font"\n bind__animation__color="enabled: isLoading"\n bind__text="color: colorPrimary; value: loadingText; wrapCount: hasSongLoadError && 24 || 18"\n bind__visible="isLoading"\n text="align: center; wrapCount: 18; width: 0.65"\n render-order="menutext"\n position="0 -0.32 0.001"></a-entity>\n\n <a-entity\n id="zipLoaderIndicator"\n bind__material="color: colorPrimary"\n bind__visible="isZipFetching"\n geometry="primitive: plane; height: 0.1; width: 0.1"\n material="shader: ring; radiusInner: 0.2; radiusOuter: 0.9; progress: 0; transparent: true"\n render-order="menuitem"\n position="0 -0.4 0.002">\n </a-entity>\n\n <a-entity\n id="songProcessingIndicator"\n bind__animation__spin="enabled: isSongProcessing"\n bind__material="color: colorPrimary"\n bind__visible="isSongProcessing"\n animation__spin="property: object3D.rotation.z; from: 0; to: -360; easing: linear; dur: 1000; loop: true"\n geometry="primitive: plane; height: 0.15; width: 0.15"\n material="shader: ring; radiusInner: 0.2; radiusOuter: 0.4; transparent: true; progress: 0.2"\n render-order="menutext"\n position="0 -0.4 0.004"\n visible="false">\n </a-entity>\n\n <a-entity\n id="loadingCancelButton"\n mixin="bigMenuButton"\n bind-toggle__raycastable="isLoading"\n position="0 -0.67 0.01"\n proxy-event="event: click; to: a-scene; as: songloadcancel">\n <a-entity mixin="font" text="align: center; color: #FAFAFA; wrapCount: 20; value: CANCEL" position="0 -0.065 0.001"></a-entity>\n </a-entity>\n </a-entity>\n</a-entity>\n\x3c!-- </require> --\x3e</require>\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/stage.html"> --\x3e\n<a-entity\n id="audioAnalyser"\n audioanalyser="fftSize: 32; enableBeatDetection: false; enableLevels: false; enableWaveform: false; enableVolume: false"></a-entity>\n\n<a-entity id="stage" no-frustum-cull follow-z="target: #curveFollowRig">\n <a-entity\n id="backglow"\n obj-model="obj: #backGlowObj"\n materials="name: backglow"\n render-order="stage"></a-entity>\n\n <a-entity\n id="rings"\n obj-model="obj: #ringsObj"\n materials="name: rings"\n position="0 0 -1500"\n render-order="stage"></a-entity>\n\n <a-entity\n id="auroras"\n class="aurora"\n obj-model="obj: #aurorasObj"\n materials="name: aurora"\n render-order="aurora"></a-entity>\n\n <a-entity\n id="merkaba"\n obj-model="obj: #merkabaObj"\n bind__visible="!isVictory && !isGameOver"\n materials="name: merkaba"\n animation="property: rotation; from: 0 0 0; to: 360 360 360; dur: 50000; easing: linear; loop: true"\n position="0 46 -1500"></a-entity>\n\n <a-entity\n class="merkababloom"\n geometry="primitive: plane; width: 200; height: 200"\n material="shader: flat; src: #merkabaBloomImg; blending: additive; depthTest: false; color: #888"\n position="0 46 -1400"\n render-order="stage"></a-entity>\n\n <a-entity\n class="merkababloom"\n bind__material="color: colorTertiary"\n geometry="primitive: plane; width: 250; height: 250"\n animation="property: object3D.rotation.z; from: 0; to: 360; loop: true; easing: linear; dur: 30000"\n material="shader: flat; src: #merkabaBloomImg; blending: additive; depthTest: false"\n position="0 46 -1380"\n render-order="stage"></a-entity>\n\n <a-entity\n id="moon"\n geometry="primitive: plane; width: 1000; height: 500"\n position="0 1000 -1000"\n rotation="45 0 0"\n materials="name: moon"\n ></a-entity>\n\n <a-entity class="stars" stars render-order="particles"></a-entity>\n\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/intro.html"> --\x3e\n<a-entity\n id="mainLogo"\n geometry="primitive: plane; width: 9; height: 1.125"\n material="shader: flat; src: #logoImg; transparent: true; depthTest: false; blending: additive; opacity: 0"\n position="0 3.3 -2.5"\n rotation="0 0 0"\n scale="0.8 0.8 0.8"\n bind__visible="introActive || menuActive"\n animation__opacity="property: components.material.material.opacity; from: 0; to: 1; dur: 2000; delay: 1000"\n animation__position="property: object3D.position.y; to: 3.4; dur: 2000; easing: easeInOutQuad; startEvents: startgame"></a-entity>\n\n<a-entity\n id="startButton"\n bind__visible-raycastable="introActive"\n geometry="primitive: plane; width: 1; height: 0.35"\n position="0 1.6 -2.2"\n render-order="menu"\n proxy-event="event: click; to: a-scene, #menu, #mainlogo, #menuTopButtons, #menuBackground; as: startgame"\n delayed-proxy-event="event: click; to: a-scene; as: menuopeningend; delay: 1800"\n mixin="bigMenuButton"\n play-sound__hover="event: mouseenter; sound: #hoverSound; volume: 0.1"\n play-sound__click="event: click; sound: #confirmSound; volume: 0.25"\n material="ratio: 3; opacity: 0"\n animation="property: components.material.material.uniforms.opacity.value; from: 0; to: 1; dur: 500; delay: 3000">\n <a-entity\n id="startButtonLabel"\n mixin="font"\n text="value: BEGIN; color: #f0f0f0; align: center; width: 1; wrapCount: 12; opacity: 0"\n position="0 -0.1 0.01"\n animation="property: components.text.material.uniforms.opacity.value; from: 0; to: 1; dur: 500; delay: 3500"\n ></a-entity>\n</a-entity>\n\x3c!-- </require> --\x3e</require>\n</a-entity>\n\x3c!-- </require> --\x3e</require>\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/menu.html"> --\x3e\n\x3c!-- Macro is a templating function. It is rendered into the HTML below with searchResults(). --\x3e\n\n\n\n<template id="searchResultTemplate">\n <a-entity class="searchResult" bind-item__data-id="item.id" bind-item__data-index="item.index">\n <a-entity class="searchResultBackground" bind-item__active-item="active: menuSelectedChallenge.id === item.id"\n bind-item__animation__mouseenter="enabled: menuSelectedChallenge.id !== item.id"\n bind-item__animation__mouseleave="enabled: menuSelectedChallenge.id !== item.id"\n bind-toggle__raycastable="mainMenuActive || isSearching" bind__material="color: colorPrimary"\n animation__mouseenter="property: components.material.material.opacity; to: 0.4; startEvents: mouseenter; pauseEvents: mouseleave; dur: 75; delay: 1"\n animation__mouseleave="property: components.material.material.opacity; to: 0.0; startEvents: mouseleave; pauseEvents: mouseenter; dur: 75"\n geometry="primitive: plane; width: 1.1; height: 0.2"\n material="shader: flat; transparent: true; opacity: 0.0; src: #selectedImg" position="0 -0.13 -0.002"\n play-sound="event: mouseenter; sound: #hoverSound; volume: 0.03" render-order="menuitem"></a-entity>\n </a-entity>\n </a-entity>\n</template>\n\n\n\x3c!-- Menu container begins here. --\x3e\n<a-entity id="menu" bind__visible="menuActive" position="0 1.4 -2.3"\n animation__position="property: object3D.position.z; to: -2; dur: 1500; easing: easeInOutCubic; delay: 300; startEvents: startgame">\n\n <a-entity id="menuBackground"\n bind__menu-midsection="active: !!menuSelectedChallenge.id && (mainMenuActive || difficultyFilterMenuOpen) || difficultyFilterMenuOpen; selectedChallenge: menuSelectedChallenge.id"\n bind-toggle__raycastable="menuActive || genreMenuOpen || isSearching || difficultyFilterMenuOpen"\n geometry="primitive: plane; width: 3.4; height: 1.82" material="shader: panelShader; ratio: 1.86; opacity: 0"\n animation__opacity="property: components.material.material.uniforms.opacity.value; from: 0; to: 1; dur: 1000; delay: 300; startEvents: startgame"\n animation__midsectionshow="property: components.material.material.uniforms.midSection.value; from: 0; to: 1; dur: 160; startEvents: showdifficultysection; easing: easeOutCubic"\n animation__midsectionhide="property: components.material.material.uniforms.midSection.value; from: 1: to: 0; dur: 160; startEvents: hidedifficultysection; easing: easeOutCubic"\n render-order="menu" position="0 0 -0.005"></a-entity>\n\n <a-entity id="mainMenu" bind__visible="mainMenuActive && !isMenuOpening || isSearching">\n <a-entity id="searchResultsContainer" position="0 0 0.001" class="menuAnimation"\n bind__menu-slide-animation="isSearching: isSearching; menuSelectedChallengeId: menuSelectedChallenge.id"\n animation__menuleft="property: object3D.position.x; to: -0.79; dur: 200; easing: easeOutCubic; autoplay: false"\n animation__menuright="property: object3D.position.x; from: -0.79; to: 0; dur: 200; easing: easeOutCubic; autoplay: false">\n\n \n<a-entity id="searchResultList"\n bind-for="for: item; in: searchResultsPage; key: id; template: #searchResultTemplate; updateInPlace: true; pool: 6; delay: 25"\n layout="type: box; columns: 1; marginRow: -0.2; orderAttribute: data-index" search-result-list position="0 0.644 0">\n</a-entity>\n\n\x3c!-- All search result text merged and spaced out. --\x3e\n<a-entity id="searchSongNameTexts" mixin="font" bind__text="value: search.songNameTexts" render-order="menutext"\n text="baseline: top; align: left; color: #FAFAFA; wrapCount: 28; lineHeight: 130" position="0.181 0.51943 0.001">\n</a-entity>\n<a-entity id="searchSongSubNameTexts" mixin="font"\n bind__text="color: colorSecondaryBright; value: search.songSubNameTexts" render-order="menutext"\n text="baseline: top; align: left; wrapCount: 42; lineHeight: 190" position="0.181 0.445 0.001">\n</a-entity>\n\n<a-entity id="searchThumbnailImages" bind__search-thumbnail-atlas="dummyUpdater: search.songSubNameTexts"\n bind__visible="searchResultsPage.length > 0" geometry="primitive: plane; buffer: false; width: 0.2; height: 1.2"\n dynamic-texture-atlas="canvasId: thumbnailAtlasMap; canvasWidth: 64; canvasHeight: 512; numColumns: 1; numRows: 6"\n material="shader: flat; transparent: true" render-order="menubutton" position="-0.45 0.0146 0.002"></a-entity>\n\n<a-mixin id="searchPageButton"\n animation__mouseenter="property: components.slice9.material.opacity; from: 0; to: 0.3; startEvents: mouseenter; pauseEvents: mouseleave; dur: 150"\n animation__mouseleave="property: components.slice9.material.opacity; from: 0.3; to: 0; startEvents: mouseleave; pauseEvents: mouseenter; dur: 150"\n mixin="slice" raycaster-target="width: 1; height: 0.32" render-order="menubutton"\n slice9="width: 0.8; color: #08bfa2; height: 0.130; padding: 0.03; opacity: 0"></a-mixin>\n\n<a-entity id="searchPrevPage" mixin="searchPageButton" bind__slice9="color: colorPrimary"\n bind__visible-raycastable="search.hasPrev && (mainMenuActive || isSearching)"\n raycaster-target="bindToggle: search.hasNext && menuActive; position: 0 0.08 0" position="-0 0.69 0.01"\n proxy-event="event: click; to: a-scene; as: searchprevpage; captureBubbles: true">\n <a-entity id="prevArrow" bind__material="color: colorPrimary" geometry="primitive: plane; width: 0.12; height: 0.12"\n material="shader: flat; src: #downIconImg; transparent: true" rotation="0 0 180" position="0 0 -0.001"></a-entity>\n</a-entity>\n\n<a-entity id="searchNextPage" mixin="searchPageButton" bind__slice9="color: colorSecondary"\n raycaster-target="bindToggle: search.hasNext && (mainMenuActive || isSearching); position: 0 -0.08 0"\n position="-0 -0.674 0.01" proxy-event="event: click; to: a-scene; as: searchnextpage; captureBubbles: true"\n bind__visible="search.hasNext">\n <a-entity id="nextArrow" bind__material="color: colorSecondary" geometry="primitive: plane; width: 0.12; height: 0.12"\n material="shader: flat; src: #downIconImg; transparent: true" position="0 0 -0.001"></a-entity>\n</a-entity>\n\n </a-entity>\n\n <a-entity id="menuDifficultiesGroup" position="0 0.18 0">\n\n \x3c!-- Top-aligned. --\x3e\n \x3c!-- Uses bind-for and bind-item to render difficulties. --\x3e\n <a-entity id="menuDifficulties" bind-for="for: item; in: menuDifficultiesIds; updateInPlace: true; pool: 10"\n bind__visible="!!menuSelectedChallenge.id"\n layout="type: box; columns: 1; marginRow: -0.2; orderAttribute: data-bind-for-key" position="0 0.34 0"\n menu-difficulty-select>\n \n <template>\n \x3c!-- Item is a string representing the difficulty. --\x3e\n <a-entity class="difficultyOption" bind-item__data-difficulty="item">\n <a-entity class="difficultyBackground"\n bind-item__active-item="active: (menuSelectedChallenge.difficultyId === item)"\n bind-item__animation__mouseenter="enabled: !(menuSelectedChallenge.difficultyId === item)"\n bind-item__animation__mouseleave="enabled: !(menuSelectedChallenge.difficultyId === item)"\n bind-item__difficulty-background="enabled: menuActive && !!menuSelectedChallenge.id && !(menuSelectedChallenge.difficultyId === item) && !difficultyFilterMenuOpen"\n bind__material="color: colorPrimary" geometry="primitive: plane; width: 0.4; height: 0.2"\n material="shader: flat; transparent: true; opacity: 0.0; src: #difficultyImg" position="0 -0.005 0"\n play-sound="event: mouseenter; sound: #hoverSound; volume: 0.03"\n animation__mouseenter="property: components.material.material.opacity; to: 0.3; startEvents: mouseenter; pauseEvents: mouseleave; dur: 75"\n event-set__mouseenter="visible: true"\n animation__mouseleave="property: components.material.material.opacity; to: 0.0; startEvents: mouseleave; pauseEvents: mouseenter; dur: 75"\n event-set__mouseleave="visible: true; _delay: 160" render-order="menuitem"></a-entity>\n <a-entity class="difficultyText" mixin="font"\n bind-item__active-text-color="active: (menuSelectedChallenge.difficultyId === item)"\n bind-item__difficulty-text="id: item" active-text-color="color: #fff"\n text="wrapCount: 30; align: center; color: #8d8d8d" position="0 -0.057 0.001" render-order="menutext">\n </a-entity>\n </a-entity>\n </template>\n \n </a-entity>\n </a-entity>\n\n \x3c!-- Selected challenge info. --\x3e\n <a-entity id="menuSelectedChallengePanel" bind__visible="!!menuSelectedChallenge.id"\n position="0.8394583182784089 0 0.001">\n <a-entity id="menuFavoriteButton" bind__animation__mouseenter="to: menuSelectedChallenge.isFavorited && 0.25 || 1"\n bind__animation__mouseleave="to: menuSelectedChallenge.isFavorited && 1 || 0.25"\n bind__material="color: colorTertiary; opacity: menuSelectedChallenge.isFavorited && 1 || 0.25"\n bind__raycastable="menuActive && !!menuSelectedChallenge.id"\n animation__mouseenter="property: components.material.material.opacity; startEvents: mouseenter; dur: 150; easing: easeInOutCubic"\n animation__mouseleave="property: components.material.material.opacity; startEvents: mouseleave; dur: 100; easing: easeInOutCubic"\n geometry="primitive: plane; width: 0.1; height: 0.1"\n material="src: #favoriteImg; shader: flat; transparent: true; opacity: 0.25"\n play-sound__hover="event: mouseenter; sound: #hoverSound; volume: 0.1" position="0.46 0.68 0.001"\n proxy-event="event: click; to: a-scene; as: favoritetoggle" render-order="menuitem"></a-entity>\n\n <a-entity id="menuSelectedChallengeImage"\n bind__menu-selected-challenge-image="coverURL: menuSelectedChallenge.coverURL"\n geometry="primitive: plane; height: 0.4; width: 0.4" material="shader: flat" position="0 0.42 0"></a-entity>\n\n <a-entity id="menuSelectedChallengeInfoContainer" position="0 0.058 0">\n <a-entity id="menuSelectedChallengeSongAuthor" mixin="font"\n bind__text="color: colorSecondaryBright; value: (menuSelectedChallenge.metadata.songSubName || menuSelectedChallenge.metadata.songAuthorName || \'Unknown Artist\')" position="0 0.042 0"\n render-order="menutext" text="wrapCount: 40; lineHeight: 40; width: 1.185; align: center; baseline: center">\n </a-entity>\n <a-entity id="menuSelectedChallengeSongName" mixin="font"\n bind__text="color: colorPrimary; value: menuSelectedChallenge.metadata.songName" position="0 -0.059 0"\n render-order="menutext" text="align: center; wrapCount: 31; baseline: top; lineHeight: 36; width: 1.4">\n </a-entity>\n <a-entity id="menuSelectedChallengeInfo" mixin="font" bind__text="value: menuSelectedChallenge.songInfoText"\n mixin="font" position="0 -0.18 0" render-order="menutext"\n text="align: center; color: #989898; wrapCount: 55; lineHeight: 72; width: 1.5; baseline: top"></a-entity>\n </a-entity>\n\n <a-entity id="playButton"\n bind__visible-raycastable="menuActive && !!menuSelectedChallenge.id && !genreMenuOpen && !difficultyFilterMenuOpen && !isIOS && !hasSongLoadError && mpHostControl && mpCanStart"\n geometry="primitive: plane; width: 0.7; height: 0.25"\n play-sound="event: mouseenter; sound: #hoverSound; volume: 0.03"\n play-sound__click="event: click; sound: #confirmSound; volume: 0.25" position="0 -0.561 0"\n proxy-event="event: click; to: a-scene; as: playbuttonclick"\n material="shader: panelShader; brightness: 0.7; transparent: true; midSection: 0; ratio: 2.8; borderRadius: 0.6; borderWidth: 0.08"\n render-order="menubutton"\n animation__mouseenter1="property: components.material.material.uniforms.activePanel.value; from: 0; to: 1; startEvents: mouseenter; pauseEvents: mouseleave; dur: 100"\n animation__mouseleave1="property: components.material.material.uniforms.activePanel.value; from: 1; to: 0; startEvents: mouseleave; pauseEvents: mouseenter; dur: 100"\n animation__mouseenter2="property: scale; from: 1 1 1; to: 1.1 1.1 1.1; startEvents: mouseenter; pauseEvents: mouseleave; dur: 100"\n animation__mouseleave2="property: scale; to: 1 1 1; from: 1.1 1.1 1.1; startEvents: mouseleave; pauseEvents: mouseenter; dur: 100">\n <a-entity mixin="font" text="align: center; color: #FFF; wrapCount: 15; value: PLAY" position="0 -0.085 0.01">\n </a-entity>\n </a-entity>\n\n <a-entity id="iOSNotice" bind__visible="mainMenuActive && isIOS" mixin="font" position="0 -0.5 0.01"\n text="align: center; baseline: top; color: #FFF; wrapCount: 32; value: Sorry, iOS is currently not playable but support is coming soon!">\n </a-entity>\n\n <a-entity id="menuLoadError" bind__visible="hasSongLoadError" mixin="font" position="0 -0.5 0.01"\n text="align: center; baseline: top; color: #FFF; wrapCount: 32; value: Sorry! There was an error loading this song.">\n </a-entity>\n </a-entity>\n\n <a-entity id="searchError" mixin="font" bind__visible="search.hasError" render-order="menuText"\n text="align: center; value: Sorry, there was an issue fetching search results. Please try again."\n position="0 0 0.01"></a-entity>\n\n <a-entity id="menuNoPlaylists" mixin="font"\n bind__visible="playlist === \'favorites\' && favorites.length === 0 && !menuSelectedChallenge.id"\n render-order="menuText" position="0 0.1 0.01"\n text="align: center; baseline: top; color: #FFF; wrapCount: 32; value: Add a song to your favorites by clicking the star in the top right of the menu after selected a song.">\n </a-entity>\n\n <a-entity id="searchNoResults" mixin="font"\n bind__visible="!isSearching && search.results.length === 0 && playlist !== \'favorites\'" render-order="menuText"\n text="align: center; value: No search results found. Please try again with another query." position="0 0 0.01">\n </a-entity>\n </a-entity>\n\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/genreMenu.html"> --\x3e\n<a-entity\n id="genreMenu"\n bind-for="for: genre; in: genres; updateInPlace: true; key: name"\n bind__visible="genreMenuOpen"\n layout="type: box; columns: 6; marginRow: 0.4; marginColumn: 0.4; align: center"\n menu-genre\n position="0 0 0.05">\n <template>\n <a-entity class="genre" bind-item__data-genre="item">\n <a-entity\n mixin="slice"\n slice9="opacity: 0.9; width: 0.35; left: 70; top: 70; height: 0.35; padding: 0.07"\n animation__mouseenter2="property: scale; from: 1 1 1; to: 1.03 1.03 1.03; startEvents: mouseenter; pauseEvents: mouseleave; easing: easeOutCubic; dur: 150"\n animation__mouseleave2="property: scale; from: 1.03 1.03 1.03; to: 1 1 1; startEvents: mouseleave; pauseEvents: mouseenter; easing: easeOutCubic; dur: 150"\n proxy-event__enter="event: mouseenter; to: CHILDREN; captureBubbles: true"\n proxy-event__leave="event: mouseleave; to: CHILDREN; captureBubbles: true"\n play-sound__click="event: click; sound: #confirmSound; volume: 0.1"\n raycaster-target="bindToggle: genreMenuOpen; width: 0.35; height: 0.35"\n render-order__nonrecursive="menubutton">\n <a-entity\n mixin="font"\n bind-item__text="value: item.name"\n text="align: center; width: 1.1; color: #888"\n animation__mouseenter="property: components.text.material.uniforms.color.value; from: #888; to: #FFF; type: color; startEvents: mouseenter; pauseEvents: mouseleave; easing: easeOutCubic; dur: 150"\n animation__mouseleave="property: components.text.material.uniforms.color.value; from: #FFF; to: #888; type: color; startEvents: mouseleave; pauseEvents: mouseenter; easing: easeOutCubic; dur: 150"\n render-order="menutext"\n position="0 -0.16 0.001"></a-entity>\n <a-entity\n class="genreIcon"\n bind-item__atlas-uvs="totalColumns: 6; totalRows: 3; row: item.row; column: item.column"\n geometry="primitive: plane; width: 0.22; height: 0.22; buffer: false; skipCache: true"\n position="0 0.04 0.002"\n material="shader: flat; src: #genresImg; transparent: true; color: #888"\n render-order="menutext"\n animation__mouseenter="property: components.material.material.color; type: color; from: #888; to: #FFF; startEvents: mouseenter; pauseEvents: mouseleave; easing: easeOutCubic; dur: 150"\n animation__mouseleave="property: components.material.material.color; type: color; from: #FAFAFA; to: #888; startEvents: mouseleave; pauseEvents: mouseenter; easing: easeOutCubic; dur: 150"></a-entity>\n </a-entity>\n </a-entity>\n </template>\n</a-entity>\n\x3c!-- </require> --\x3e</require>\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/difficultyMenu.html"> --\x3e\n\n\n\n\n<a-entity\n id="difficultyFilterMenu"\n bind__visible="difficultyFilterMenuOpen"\n layout="type: box; columns: 1; marginRow: -0.2"\n difficulty-filter\n position="0 0.5 0">\n \n \n <a-entity class="difficultyFilterOption" data-difficulty-filter="All">\n <a-entity class="difficultyFilterBackground"\n bind__active-item="active: difficultyFilter === \'All\'"\n bind__animation__mouseenter="enabled: difficultyFilter !== \'All\'"\n bind__animation__mouseleave="enabled: difficultyFilter !== \'All\'"\n bind__animation__mouseentervisible="enabled: difficultyFilter !== \'All\'"\n bind__animation__mouseleavevisible="enabled: difficultyFilter !== \'All\'"\n bind__difficulty-background="enabled: difficultyFilterMenuOpen && difficultyFilter !== \'All\'"\n bind__material="color: colorPrimary"\n animation__mouseenter="property: components.material.material.opacity; to: 0.3; startEvents: mouseenter; dur: 150"\n animation__mouseleave="property: components.material.material.opacity; to: 0.0; startEvents: mouseleave; dur: 75"\n event-set__mouseenter="visible: true"\n event-set__mouseleave="visible: true; _delay: 160"\n geometry="primitive: plane; width: 0.4; height: 0.2"\n material="shader: flat; transparent: true; opacity: 0; src: #difficultyImg"\n position="0 -0.005 0"\n play-sound="event: mouseenter; sound: #hoverSound; volume: 0.03"\n render-order="menuitem"></a-entity>\n <a-entity\n class="difficultyFilterText"\n mixin="font"\n bind__active-text-color="active: difficultyFilter === \'All\'"\n active-text-color="color: #fff"\n difficulty-text="id: All"\n text="wrapCount: 30; align: center; color: #8d8d8d"\n position="0 -0.057 0.001"\n render-order="menutext"></a-entity>\n </a-entity>\n\n \n \n <a-entity class="difficultyFilterOption" data-difficulty-filter="Easy">\n <a-entity class="difficultyFilterBackground"\n bind__active-item="active: difficultyFilter === \'Easy\'"\n bind__animation__mouseenter="enabled: difficultyFilter !== \'Easy\'"\n bind__animation__mouseleave="enabled: difficultyFilter !== \'Easy\'"\n bind__animation__mouseentervisible="enabled: difficultyFilter !== \'Easy\'"\n bind__animation__mouseleavevisible="enabled: difficultyFilter !== \'Easy\'"\n bind__difficulty-background="enabled: difficultyFilterMenuOpen && difficultyFilter !== \'Easy\'"\n bind__material="color: colorPrimary"\n animation__mouseenter="property: components.material.material.opacity; to: 0.3; startEvents: mouseenter; dur: 150"\n animation__mouseleave="property: components.material.material.opacity; to: 0.0; startEvents: mouseleave; dur: 75"\n event-set__mouseenter="visible: true"\n event-set__mouseleave="visible: true; _delay: 160"\n geometry="primitive: plane; width: 0.4; height: 0.2"\n material="shader: flat; transparent: true; opacity: 0; src: #difficultyImg"\n position="0 -0.005 0"\n play-sound="event: mouseenter; sound: #hoverSound; volume: 0.03"\n render-order="menuitem"></a-entity>\n <a-entity\n class="difficultyFilterText"\n mixin="font"\n bind__active-text-color="active: difficultyFilter === \'Easy\'"\n active-text-color="color: #fff"\n difficulty-text="id: Easy"\n text="wrapCount: 30; align: center; color: #8d8d8d"\n position="0 -0.057 0.001"\n render-order="menutext"></a-entity>\n </a-entity>\n\n \n \n <a-entity class="difficultyFilterOption" data-difficulty-filter="Normal">\n <a-entity class="difficultyFilterBackground"\n bind__active-item="active: difficultyFilter === \'Normal\'"\n bind__animation__mouseenter="enabled: difficultyFilter !== \'Normal\'"\n bind__animation__mouseleave="enabled: difficultyFilter !== \'Normal\'"\n bind__animation__mouseentervisible="enabled: difficultyFilter !== \'Normal\'"\n bind__animation__mouseleavevisible="enabled: difficultyFilter !== \'Normal\'"\n bind__difficulty-background="enabled: difficultyFilterMenuOpen && difficultyFilter !== \'Normal\'"\n bind__material="color: colorPrimary"\n animation__mouseenter="property: components.material.material.opacity; to: 0.3; startEvents: mouseenter; dur: 150"\n animation__mouseleave="property: components.material.material.opacity; to: 0.0; startEvents: mouseleave; dur: 75"\n event-set__mouseenter="visible: true"\n event-set__mouseleave="visible: true; _delay: 160"\n geometry="primitive: plane; width: 0.4; height: 0.2"\n material="shader: flat; transparent: true; opacity: 0; src: #difficultyImg"\n position="0 -0.005 0"\n play-sound="event: mouseenter; sound: #hoverSound; volume: 0.03"\n render-order="menuitem"></a-entity>\n <a-entity\n class="difficultyFilterText"\n mixin="font"\n bind__active-text-color="active: difficultyFilter === \'Normal\'"\n active-text-color="color: #fff"\n difficulty-text="id: Normal"\n text="wrapCount: 30; align: center; color: #8d8d8d"\n position="0 -0.057 0.001"\n render-order="menutext"></a-entity>\n </a-entity>\n\n \n \n <a-entity class="difficultyFilterOption" data-difficulty-filter="Hard">\n <a-entity class="difficultyFilterBackground"\n bind__active-item="active: difficultyFilter === \'Hard\'"\n bind__animation__mouseenter="enabled: difficultyFilter !== \'Hard\'"\n bind__animation__mouseleave="enabled: difficultyFilter !== \'Hard\'"\n bind__animation__mouseentervisible="enabled: difficultyFilter !== \'Hard\'"\n bind__animation__mouseleavevisible="enabled: difficultyFilter !== \'Hard\'"\n bind__difficulty-background="enabled: difficultyFilterMenuOpen && difficultyFilter !== \'Hard\'"\n bind__material="color: colorPrimary"\n animation__mouseenter="property: components.material.material.opacity; to: 0.3; startEvents: mouseenter; dur: 150"\n animation__mouseleave="property: components.material.material.opacity; to: 0.0; startEvents: mouseleave; dur: 75"\n event-set__mouseenter="visible: true"\n event-set__mouseleave="visible: true; _delay: 160"\n geometry="primitive: plane; width: 0.4; height: 0.2"\n material="shader: flat; transparent: true; opacity: 0; src: #difficultyImg"\n position="0 -0.005 0"\n play-sound="event: mouseenter; sound: #hoverSound; volume: 0.03"\n render-order="menuitem"></a-entity>\n <a-entity\n class="difficultyFilterText"\n mixin="font"\n bind__active-text-color="active: difficultyFilter === \'Hard\'"\n active-text-color="color: #fff"\n difficulty-text="id: Hard"\n text="wrapCount: 30; align: center; color: #8d8d8d"\n position="0 -0.057 0.001"\n render-order="menutext"></a-entity>\n </a-entity>\n\n \n \n <a-entity class="difficultyFilterOption" data-difficulty-filter="Expert">\n <a-entity class="difficultyFilterBackground"\n bind__active-item="active: difficultyFilter === \'Expert\'"\n bind__animation__mouseenter="enabled: difficultyFilter !== \'Expert\'"\n bind__animation__mouseleave="enabled: difficultyFilter !== \'Expert\'"\n bind__animation__mouseentervisible="enabled: difficultyFilter !== \'Expert\'"\n bind__animation__mouseleavevisible="enabled: difficultyFilter !== \'Expert\'"\n bind__difficulty-background="enabled: difficultyFilterMenuOpen && difficultyFilter !== \'Expert\'"\n bind__material="color: colorPrimary"\n animation__mouseenter="property: components.material.material.opacity; to: 0.3; startEvents: mouseenter; dur: 150"\n animation__mouseleave="property: components.material.material.opacity; to: 0.0; startEvents: mouseleave; dur: 75"\n event-set__mouseenter="visible: true"\n event-set__mouseleave="visible: true; _delay: 160"\n geometry="primitive: plane; width: 0.4; height: 0.2"\n material="shader: flat; transparent: true; opacity: 0; src: #difficultyImg"\n position="0 -0.005 0"\n play-sound="event: mouseenter; sound: #hoverSound; volume: 0.03"\n render-order="menuitem"></a-entity>\n <a-entity\n class="difficultyFilterText"\n mixin="font"\n bind__active-text-color="active: difficultyFilter === \'Expert\'"\n active-text-color="color: #fff"\n difficulty-text="id: Expert"\n text="wrapCount: 30; align: center; color: #8d8d8d"\n position="0 -0.057 0.001"\n render-order="menutext"></a-entity>\n </a-entity>\n\n \n \n <a-entity class="difficultyFilterOption" data-difficulty-filter="Expertplus">\n <a-entity class="difficultyFilterBackground"\n bind__active-item="active: difficultyFilter === \'Expertplus\'"\n bind__animation__mouseenter="enabled: difficultyFilter !== \'Expertplus\'"\n bind__animation__mouseleave="enabled: difficultyFilter !== \'Expertplus\'"\n bind__animation__mouseentervisible="enabled: difficultyFilter !== \'Expertplus\'"\n bind__animation__mouseleavevisible="enabled: difficultyFilter !== \'Expertplus\'"\n bind__difficulty-background="enabled: difficultyFilterMenuOpen && difficultyFilter !== \'Expertplus\'"\n bind__material="color: colorPrimary"\n animation__mouseenter="property: components.material.material.opacity; to: 0.3; startEvents: mouseenter; dur: 150"\n animation__mouseleave="property: components.material.material.opacity; to: 0.0; startEvents: mouseleave; dur: 75"\n event-set__mouseenter="visible: true"\n event-set__mouseleave="visible: true; _delay: 160"\n geometry="primitive: plane; width: 0.4; height: 0.2"\n material="shader: flat; transparent: true; opacity: 0; src: #difficultyImg"\n position="0 -0.005 0"\n play-sound="event: mouseenter; sound: #hoverSound; volume: 0.03"\n render-order="menuitem"></a-entity>\n <a-entity\n class="difficultyFilterText"\n mixin="font"\n bind__active-text-color="active: difficultyFilter === \'Expertplus\'"\n active-text-color="color: #fff"\n difficulty-text="id: Expertplus"\n text="wrapCount: 30; align: center; color: #8d8d8d"\n position="0 -0.057 0.001"\n render-order="menutext"></a-entity>\n </a-entity>\n\n \n</a-entity>\n\x3c!-- </require> --\x3e</require>\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/optionsMenu.html"> --\x3e\n<a-entity\n id="optionsMenu"\n bind__visible="optionsMenuOpen"\n position="0 0.5 0.01"\n render-order="menutext">\n\n <a-entity id="optionsTitle" mixin="font" text="align: center; value: OPTIONS; width: 2.5"></a-entity>\n\n <a-entity id="colorOptionsContainer" position="0 -0.25 0">\n <a-entity id="colorTitle" mixin="font" text="align: center; value: THEMES; width: 2"></a-entity>\n\n <a-entity id="colorOptions" position="-0.79 -0.175 0.00" layout="type: box; columns: 10; margin: 0.2" materials-color-menu>\n \n <a-entity\n class="colorOption"\n data-color-name="Super Medium"\n data-color-scheme="default"\n mixin="clickSoundUI hoverSoundUI"\n animation__mouseenter="property: scale; to: 1.2 1.2 1.2; dur: 150; easing: easeInOutCubic; startEvents: mouseenter"\n animation__mouseleave="property: scale; to: 1 1 1; dur: 125; easing: easeInOutCubic; startEvents: mouseleave"\n geometry="primitive: plane; width: 0.15; height: 0.15"\n material="shader: gradientShader; color1: #f971c3; color2: #6ff9ea; transparent: true"\n render-order="menutext"\n bind-toggle__raycastable="optionsMenuOpen">\n </a-entity>\n \n <a-entity\n class="colorOption"\n data-color-name="Star Warrior"\n data-color-scheme="blue"\n mixin="clickSoundUI hoverSoundUI"\n animation__mouseenter="property: scale; to: 1.2 1.2 1.2; dur: 150; easing: easeInOutCubic; startEvents: mouseenter"\n animation__mouseleave="property: scale; to: 1 1 1; dur: 125; easing: easeInOutCubic; startEvents: mouseleave"\n geometry="primitive: plane; width: 0.15; height: 0.15"\n material="shader: gradientShader; color1: #1e4482; color2: #c27727; transparent: true"\n render-order="menutext"\n bind-toggle__raycastable="optionsMenuOpen">\n </a-entity>\n \n <a-entity\n class="colorOption"\n data-color-name="Galactic Royal"\n data-color-scheme="purple"\n mixin="clickSoundUI hoverSoundUI"\n animation__mouseenter="property: scale; to: 1.2 1.2 1.2; dur: 150; easing: easeInOutCubic; startEvents: mouseenter"\n animation__mouseleave="property: scale; to: 1 1 1; dur: 125; easing: easeInOutCubic; startEvents: mouseleave"\n geometry="primitive: plane; width: 0.15; height: 0.15"\n material="shader: gradientShader; color1: #6A39B3; color2: #FAF239; transparent: true"\n render-order="menutext"\n bind-toggle__raycastable="optionsMenuOpen">\n </a-entity>\n \n <a-entity\n class="colorOption"\n data-color-name="Space Joker"\n data-color-scheme="green"\n mixin="clickSoundUI hoverSoundUI"\n animation__mouseenter="property: scale; to: 1.2 1.2 1.2; dur: 150; easing: easeInOutCubic; startEvents: mouseenter"\n animation__mouseleave="property: scale; to: 1 1 1; dur: 125; easing: easeInOutCubic; startEvents: mouseleave"\n geometry="primitive: plane; width: 0.15; height: 0.15"\n material="shader: gradientShader; color1: #779E37; color2: #6A39B3; transparent: true"\n render-order="menutext"\n bind-toggle__raycastable="optionsMenuOpen">\n </a-entity>\n \n <a-entity\n class="colorOption"\n data-color-name="Solar Flare"\n data-color-scheme="yellow"\n mixin="clickSoundUI hoverSoundUI"\n animation__mouseenter="property: scale; to: 1.2 1.2 1.2; dur: 150; easing: easeInOutCubic; startEvents: mouseenter"\n animation__mouseleave="property: scale; to: 1 1 1; dur: 125; easing: easeInOutCubic; startEvents: mouseleave"\n geometry="primitive: plane; width: 0.15; height: 0.15"\n material="shader: gradientShader; color1: #C2C04C; color2: #E03A3E; transparent: true"\n render-order="menutext"\n bind-toggle__raycastable="optionsMenuOpen">\n </a-entity>\n \n <a-entity\n class="colorOption"\n data-color-name="Trail Blazer"\n data-color-scheme="red"\n mixin="clickSoundUI hoverSoundUI"\n animation__mouseenter="property: scale; to: 1.2 1.2 1.2; dur: 150; easing: easeInOutCubic; startEvents: mouseenter"\n animation__mouseleave="property: scale; to: 1 1 1; dur: 125; easing: easeInOutCubic; startEvents: mouseleave"\n geometry="primitive: plane; width: 0.15; height: 0.15"\n material="shader: gradientShader; color1: #E03A3E; color2: #DADADA; transparent: true"\n render-order="menutext"\n bind-toggle__raycastable="optionsMenuOpen">\n </a-entity>\n \n <a-entity\n class="colorOption"\n data-color-name="Mint Choco"\n data-color-scheme="rgb"\n mixin="clickSoundUI hoverSoundUI"\n animation__mouseenter="property: scale; to: 1.2 1.2 1.2; dur: 150; easing: easeInOutCubic; startEvents: mouseenter"\n animation__mouseleave="property: scale; to: 1 1 1; dur: 125; easing: easeInOutCubic; startEvents: mouseleave"\n geometry="primitive: plane; width: 0.15; height: 0.15"\n material="shader: gradientShader; color1: #34eb89; color2: #34ebd8; transparent: true"\n render-order="menutext"\n bind-toggle__raycastable="optionsMenuOpen">\n </a-entity>\n \n <a-entity\n class="colorOption"\n data-color-name="Cheetah SoL"\n data-color-scheme="cheetah"\n mixin="clickSoundUI hoverSoundUI"\n animation__mouseenter="property: scale; to: 1.2 1.2 1.2; dur: 150; easing: easeInOutCubic; startEvents: mouseenter"\n animation__mouseleave="property: scale; to: 1 1 1; dur: 125; easing: easeInOutCubic; startEvents: mouseleave"\n geometry="primitive: plane; width: 0.15; height: 0.15"\n material="shader: gradientShader; color1: #c27727; color2: #635c54; transparent: true"\n render-order="menutext"\n bind-toggle__raycastable="optionsMenuOpen">\n </a-entity>\n \n <a-entity\n class="colorOption"\n data-color-name="Ash Nova"\n data-color-scheme="black"\n mixin="clickSoundUI hoverSoundUI"\n animation__mouseenter="property: scale; to: 1.2 1.2 1.2; dur: 150; easing: easeInOutCubic; startEvents: mouseenter"\n animation__mouseleave="property: scale; to: 1 1 1; dur: 125; easing: easeInOutCubic; startEvents: mouseleave"\n geometry="primitive: plane; width: 0.15; height: 0.15"\n material="shader: gradientShader; color1: #555; color2: #FFF; transparent: true"\n render-order="menutext"\n bind-toggle__raycastable="optionsMenuOpen">\n </a-entity>\n \n </a-entity>\n\n <a-entity\n id="colorName"\n mixin="font"\n text="align: center; color: #CCC; width: 1"\n position="0 -0.35 0.1"\n render-order="menutext"></a-entity>\n </a-entity>\n</a-entity>\n\x3c!-- </require> --\x3e</require>\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/playlistMenu.html"> --\x3e\n<a-entity\n id="playlistMenu"\n bind-for="for: playlist; in: playlists; updateInPlace: true; key: name"\n bind__visible="playlistMenuOpen"\n layout="type: box; columns: 2; marginRow: -0.23; marginColumn: 1.3; align: center"\n menu-playlist\n position="0 0 0.05">\n <template>\n \n <a-entity class="playlist" data-playlist="{{ item.name }}" data-title="{{ item.title }}">\n \n <a-entity\n mixin="slice"\n slice9="opacity: 0.9; width: 1.2; left: 70; top: 70; height: 0.19; padding: 0.07"\n animation__mouseenter="property: scale; from: 1 1 1; to: 1.03 1.03 1.03; startEvents: mouseenter; pauseEvents: mouseleave; easing: easeOutCubic; dur: 150"\n animation__mouseleave="property: scale; from: 1.03 1.03 1.03; to: 1 1 1; startEvents: mouseleave; pauseEvents: mouseenter; easing: easeOutCubic; dur: 150"\n proxy-event__enter="event: mouseenter; to: CHILDREN; captureBubbles: true"\n proxy-event__leave="event: mouseleave; to: CHILDREN; captureBubbles: true"\n play-sound__click="event: click; sound: #confirmSound; volume: 0.1"\n raycaster-target="bindToggle: playlistMenuOpen; width: 1.2; height: 0.19"\n render-order__nonrecursive="menubutton">\n <a-entity\n class="playlistTitle"\n mixin="font"\n bind-item__text-uppercase="value: item.title"\n text="align: left; width: 1.3; color: #CCC"\n animation__mouseenter="property: components.text.material.uniforms.color.value; from: #CCC; to: #FFF; type: color; startEvents: mouseenter; pauseEvents: mouseleave; easing: easeOutCubic; dur: 150"\n animation__mouseleave="property: components.text.material.uniforms.color.value; from: #FFF; to: #CCC; type: color; startEvents: mouseleave; pauseEvents: mouseenter; easing: easeOutCubic; dur: 150"\n render-order="menutext"\n position="0.11 -0.01 0.001"></a-entity>\n\n <a-entity\n class="playlistAuthor"\n mixin="font"\n bind-item__text="value: item.author"\n bind__text="color: colorPrimary"\n text="align: left; width: 1.1"\n render-order="menutext"\n position="0.01 -0.08 0.001"></a-entity>\n </a-entity>\n </a-entity>\n </template>\n</a-entity>\n\x3c!-- </require> --\x3e</require>\n</a-entity>\n\n\x3c!-- Search. --\x3e\n<a-entity id="keyboard"\n bind__super-keyboard="hand: activeHand === \'left\' && \'#leftHand\' || \'#rightHand\'; show: isSearching"\n super-keyboard="label: Search on beatsaver.com; inputColor: #fff; labelColor: #f0f0f0; width: 1.5; hand: #rightHand; imagePath: assets/img/keyboard; font: assets/fonts/Viga-Regular.json; align: center; model: superkeyboard; keyColor: #fff; injectToRaycasterObjects: false; filters: allupper; keyHoverColor: #fff"\n position="0.58 1.2 -1.95" keyboard-raycastable="condition: isSearching" search\n proxy-event__dismiss="event: superkeyboarddismiss; to: a-scene; as: keyboardclose"\n proxy-event__accept="event: superkeyboardinput; to: a-scene; as: keyboardclose" render-order="menubutton"\n render-order-recursive>\n</a-entity>\n\n<a-entity id="backButton" mixin="bigMenuTopButton"\n bind__visible-raycastable="genreMenuOpen || isSearching || difficultyFilterMenuOpen || playlistMenuOpen || optionsMenuOpen"\n position="0 2.32 -1.96" play-sound__hover="event: mouseenter; sound: #hoverSound; volume: 0.1"\n proxy-event="event: click; to: a-scene; as: menuback">\n <a-entity mixin="font" text="align: center; color: #FFF; wrapCount: 20; value: BACK" position="0 -0.07 0.01">\n </a-entity>\n</a-entity>\n\n\x3c!-- Top menu buttons. --\x3e\n<a-mixin id="bigMenuTopButton" mixin="bigMenuButton" geometry="height: 0.17; width: 0.7"></a-mixin>\n<a-mixin id="bigMenuTopButtonFont" mixin="font" text="width: 0.75" position="0 -0.05 0.01"></a-mixin>\n<a-entity id="menuTopButtons"\n animation__position="property: object3D.position.z; to: -1.98; dur: 1500; easing: easeInOutCubic; delay: 300; startEvents: startgame"\n layout="type: line; margin: 0.65" position="-0.95 2.30 -1.96"\n proxy-event="event: startgame; to: #searchButton, #difficultyButton, #genreButton, #playlistButton, #optionButton">\n\n \x3c!-- Playlist menu toggle. --\x3e\n <a-entity id="playlistButtons">\n <a-entity id="playlistButton"\n mixin="bigMenuTopButton"\n bind__menu-playlist-button="isFavorited: menuSelectedChallenge.isFavorited; selectedChallenge: menuSelectedChallenge.id"\n bind__visible-raycastable="mainMenuActive && !playlist"\n material="opacity: 0"\n animation__opacity="property: components.material.material.uniforms.opacity.value; from: 0; to: 1; dur: 1000; delay: 300; startEvents: startgame"\n play-sound__hover="event: mouseenter; sound: #hoverSound; volume: 0.1"\n proxy-event="event: click; to: a-scene; as: playlistmenuopen">\n <a-entity mixin="bigMenuTopButtonFont" text="align: center; color: #FFF; wrapCount: 20; value: PLAYLISTS" bind__visible="!isMenuOpening"></a-entity>\n </a-entity>\n\n <a-entity id="clearPlaylistButton"\n mixin="bigMenuTopButton"\n bind__visible-raycastable="menuActive && !!playlist"\n play-sound__hover="event: mouseenter; sound: #hoverSound; volume: 0.1"\n play-sound__click="event: click; sound: #clearSound"\n proxy-event="event: click; to: a-scene; as: playlistclear">\n <a-entity mixin="bigMenuTopButtonFont" text="align: center; color: #FFF; wrapCount: 20; value: CLEAR PLAYLIST"></a-entity>\n </a-entity>\n\n <a-entity\n id="playlistText"\n mixin="font"\n bind__text="color: colorPrimary"\n bind__text-uppercase="value: playlistTitle"\n bind__visible="mainMenuActive && !!playlist"\n text="align: center; baseline: bottom; wrapCount: 30; width: 0.7"\n position="0 0.1 0.035"\n render-order="menutext"></a-entity>\n </a-entity>\n\n \x3c!-- Search toggle. --\x3e\n <a-entity id="searchButtons">\n <a-entity\n id="searchButton"\n mixin="bigMenuTopButton"\n bind__visible-raycastable="mainMenuActive && !search.query"\n material="opacity: 0"\n animation__opacity="property: components.material.material.uniforms.opacity.value; from: 0; to: 1; dur: 1000; delay: 300; startEvents: startgame"\n play-sound__hover="event: mouseenter; sound: #hoverSound; volume: 0.1"\n proxy-event="event: click; to: a-scene; as: keyboardopen">\n <a-entity mixin="bigMenuTopButtonFont" text="align: center; color: #FFF; wrapCount: 20; value: SEARCH" bind__visible="!isMenuOpening"></a-entity>\n </a-entity>\n\n <a-entity id="searchClearButton"\n mixin="bigMenuTopButton"\n bind__visible-raycastable="mainMenuActive && !!search.query"\n play-sound__hover="event: mouseenter; sound: #hoverSound; volume: 0.1"\n play-sound__click="event: click; sound: #clearSound"\n proxy-event="event: click; to: a-scene; as: searchclear">\n <a-entity mixin="bigMenuTopButtonFont" text="align: center; color: #FFF; wrapCount: 20; value: CLEAR SEARCH"></a-entity>\n </a-entity>\n\n <a-entity\n id="searchText"\n mixin="font"\n bind__text="color: colorPrimary"\n bind__text-uppercase="value: search.queryText"\n bind__visible="mainMenuActive && !!search.query"\n text="align: center; wrapCount: 20"\n position="0 0.1 0.035"\n render-order="menutext"></a-entity>\n </a-entity>\n\n \x3c!-- Difficulty menu toggle. --\x3e\n \x3c!-- <a-entity id="difficultyFilter">\n <a-entity id="difficultyButton"\n mixin="bigMenuTopButton"\n material="opacity: 0"\n bind__visible-raycastable="mainMenuActive"\n animation__opacity="property: components.material.material.uniforms.opacity.value; from: 0; to: 1; dur: 1000; delay: 300; startEvents: startgame"\n play-sound__hover="event: mouseenter; sound: #hoverSound; volume: 0.1"\n proxy-event="event: click; to: a-scene; as: difficultyfiltermenuopen">\n <a-entity mixin="bigMenuTopButtonFont" text="align: center; color: #FFF; wrapCount: 20; value: DIFFICULTY" bind__visible="!isMenuOpening"></a-entity>\n </a-entity>\n\n <a-entity\n id="difficultyFilterText"\n mixin="font"\n bind__difficulty-text="difficulty: difficultyFilter"\n bind__text="color: colorPrimary"\n bind__visible="mainMenuActive && difficultyFilter !== \'All\'"\n text="align: center; wrapCount: 20"\n position="0 0.1 0.035"\n render-order="menutext"></a-entity>\n </a-entity> --\x3e\n\n \x3c!-- Genre menu toggle. --\x3e\n <a-entity id="genreButtons">\n <a-entity id="genreButton"\n mixin="bigMenuTopButton"\n bind__visible-raycastable="mainMenuActive && !genre"\n material="opacity: 0"\n animation__opacity="property: components.material.material.uniforms.opacity.value; from: 0; to: 1; dur: 1000; delay: 300; startEvents: startgame"\n play-sound__hover="event: mouseenter; sound: #hoverSound; volume: 0.1"\n proxy-event="event: click; to: a-scene; as: genremenuopen">\n <a-entity mixin="bigMenuTopButtonFont" text="align: center; color: #FFF; wrapCount: 20; value: GENRES" bind__visible="!isMenuOpening"></a-entity>\n </a-entity>\n\n <a-entity id="clearGenreButton"\n mixin="bigMenuTopButton"\n bind__visible-raycastable="mainMenuActive && !!genre"\n play-sound__hover="event: mouseenter; sound: #hoverSound; volume: 0.1"\n play-sound__click="event: click; sound: #clearSound"\n proxy-event="event: click; to: a-scene; as: genreclear">\n <a-entity mixin="bigMenuTopButtonFont" text="align: center; color: #FFF; wrapCount: 20; value: CLEAR GENRE"></a-entity>\n </a-entity>\n\n <a-entity\n id="genreText"\n mixin="font"\n bind__text="color: colorPrimary"\n bind__text-uppercase="value: genre"\n bind__visible="mainMenuActive && !!genre"\n text="align: center; wrapCount: 20"\n position="0 0.1 0.035"\n render-order="menutext"></a-entity>\n </a-entity>\n</a-entity>\n\n\x3c!-- Options menu toggle. --\x3e\n<a-entity id="optionsButtons" position="0 0.45 -1.96">\n <a-entity id="optionButton" mixin="bigMenuButton" bind__visible-raycastable="mainMenuActive" material="opacity: 0"\n animation__opacity="property: components.material.material.uniforms.opacity.value; from: 0; to: 1; dur: 1000; delay: 300; startEvents: startgame"\n play-sound__hover="event: mouseenter; sound: #hoverSound; volume: 0.1"\n proxy-event="event: click; to: a-scene; as: optionsmenuopen">\n <a-entity mixin="bigMenuTopButtonFont" text="align: center; color: #FFF; wrapCount: 20; value: THEMES"\n bind__visible="!isMenuOpening"></a-entity>\n </a-entity>\n</a-entity>\x3c!-- </require> --\x3e</require>\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/modes.html"> --\x3e\n<a-mixin\n id="modeAnimations"\n animation__select="property: object3D.position.z; to: 0.06; dur: 200; easing: easeOutQuad; startEvents: select"\n animation__deselect="property: object3D.position.z; to: 0; dur: 200; easing: easeOutQuad; startEvents: deselect"></a-mixin>\n\n<a-mixin\n id="modeThumbAnimations"\n animation__select="property: components.material.material.color; type: color; to: #FFF; dur: 200; easing: easeOutQuad; startEvents: select"\n animation__deselect="property: components.material.material.color; type: color; to: #888; dur: 200; easing: easeOutQuad; startEvents: deselect"></a-mixin>\n\n<a-mixin\n id="modeBackgroundHover"\n animation__mouseenter="property: components.material.material.uniforms.borderWidth.value; from: 0.002; to: 0.01; startEvents: mouseenter; pauseEvents: mouseleave; easing: linear; dur: 150"\n animation__mouseleave="property: components.material.material.uniforms.borderWidth.value; from: 0.01; to: 0.002; startEvents: mouseleave; pauseEvents: mouseenter; easing: linear; dur: 150"\n play-sound__hover="event: mouseenter; sound: #hoverSound; volume: 0.3"\n play-sound__click="event: click; sound: #confirmSound; volume: 0.1"\n\n ></a-mixin>\n\n<a-mixin\n id="modeBackgroundSelect"\n animation__select="property: components.material.material.uniforms.brightness.value; to: 0.5; startEvents: select; easing: easeOutQuad; dur: 200"\n animation__deselect="property: components.material.material.uniforms.brightness.value; to: 0.1; startEvents: deselect; easing: easeOutQuad; dur: 200"\n animation__select2="property: components.material.material.uniforms.borderWidth.value; to: 0.015; startEvents: select; easing: linear; dur: 200"\n animation__deselect2="property: components.material.material.uniforms.borderWidth.value; to: 0.002; startEvents: deselect; easing: linear; dur: 200"></a-mixin>\n\n\n\n<a-entity\n id="modes"\n bind__menu-mode="colorScheme: colorScheme; hasVR: hasVR"\n bind__position="hasVR && \'-2.56 1.3 -0.7\' || \'-2.56 1 -0.7\'"\n bind__visible="menuActive && !isMenuOpening"\n rotation="0 60 0"\n render-order="menuitem">\n\n <a-entity id="modeIcon"\n geometry="primitive: cylinder; height: 0.01; segmentsHeight: 1; radius: 0.1; segmentsRadial: 3"\n rotation="0 90 90"\n position="-1.275 0.32 0.1"\n materials="name: merkaba"\n animation="property: object3D.position.x; from: -1.275; to: -1.3; dir: alternate; easing: easeOutQuad; loop: true; dur: 900"></a-entity>\n\n <a-entity id="mode2d" bind__visible="!hasVR">\n \n\n<a-entity\n id="moderide2d"\n class="modeItem"\n data-mode="ride"\n data-name="ride2d"\n position="0 0.75 0"\n mixin="modeAnimations">\n <a-entity\n class="modeBackground"\n bind-toggle__raycastable="menuActive && !hasVR"\n position="0 0 -0.01"\n geometry="primitive: plane; width: 3; height: 0.8"\n material="shader: panelShader; brightness: 0.1; ratio: 4; borderWidth: 0.002"\n mixin="modeBackgroundHover modeBackgroundSelect"></a-entity>\n <a-entity\n class="modeTitle"\n mixin="font"\n text="align: left; value: RIDE\nMODE; lineHeight: 45; width: 2.6"\n render-order="menutext"\n position="0.14 0.05 0"></a-entity>\n <a-entity\n class="modeThumb"\n mixin="modeThumbAnimations"\n geometry="primitive: plane; width: 0.7; height: 0.5"\n material="src: #modeRideImg; shader: flat"\n position="-0.20 0 0"></a-entity>\n <a-entity\n class="modeInstructions"\n mixin="font"\n render-order="menutext"\n bind__text="color: colorPrimary"\n text="value: Relax and enjoy the ride.; width: 1.6; lineHeight: 47"\n position="1.1 -0.05 0"></a-entity>\n</a-entity>\n\n \n\n<a-entity\n id="modeviewer2d"\n class="modeItem"\n data-mode="classic"\n data-name="viewer2d"\n position="0 0 0"\n mixin="modeAnimations">\n <a-entity\n class="modeBackground"\n bind-toggle__raycastable="menuActive && !hasVR"\n position="0 0 -0.01"\n geometry="primitive: plane; width: 3; height: 0.8"\n material="shader: panelShader; brightness: 0.1; ratio: 4; borderWidth: 0.002"\n mixin="modeBackgroundHover modeBackgroundSelect"></a-entity>\n <a-entity\n class="modeTitle"\n mixin="font"\n text="align: left; value: VIEWER\nMODE; lineHeight: 45; width: 2.6"\n render-order="menutext"\n position="0.14 0.05 0"></a-entity>\n <a-entity\n class="modeThumb"\n mixin="modeThumbAnimations"\n geometry="primitive: plane; width: 0.7; height: 0.5"\n material="src: #modeViewerImg; shader: flat"\n position="-0.20 0 0"></a-entity>\n <a-entity\n class="modeInstructions"\n mixin="font"\n render-order="menutext"\n bind__text="color: colorPrimary"\n text="value: View the beat map.\n\nConnect a VR headset\nwith controllers\nto experience\nmore modes!; width: 1.6; lineHeight: 47"\n position="1.1 -0.05 0"></a-entity>\n</a-entity>\n\n </a-entity>\n\n <a-entity id="modeVR" bind__visible="hasVR">\n \n\n<a-entity\n id="modepunchvr"\n class="modeItem"\n data-mode="punch"\n data-name="punchvr"\n position="0 0.75 0"\n mixin="modeAnimations">\n <a-entity\n class="modeBackground"\n bind-toggle__raycastable="menuActive && hasVR"\n position="0 0 -0.01"\n geometry="primitive: plane; width: 3; height: 0.8"\n material="shader: panelShader; brightness: 0.1; ratio: 4; borderWidth: 0.002"\n mixin="modeBackgroundHover modeBackgroundSelect"></a-entity>\n <a-entity\n class="modeTitle"\n mixin="font"\n text="align: left; value: PUNCH\nMODE; lineHeight: 45; width: 2.6"\n render-order="menutext"\n position="0.14 0.05 0"></a-entity>\n <a-entity\n class="modeThumb"\n mixin="modeThumbAnimations"\n geometry="primitive: plane; width: 0.7; height: 0.5"\n material="src: #modePunchImg; shader: flat"\n position="-0.20 0 0"></a-entity>\n <a-entity\n class="modeInstructions"\n mixin="font"\n render-order="menutext"\n bind__text="color: colorPrimary"\n text="value: Punch the beats, mind\ncolor.\n\nAvoid all things yellow.\n\nPunch harder\n for better score.; width: 1.6; lineHeight: 47"\n position="1.1 -0.05 0"></a-entity>\n</a-entity>\n\n \n\n<a-entity\n id="moderidevr"\n class="modeItem"\n data-mode="ride"\n data-name="ridevr"\n position="0 0 0"\n mixin="modeAnimations">\n <a-entity\n class="modeBackground"\n bind-toggle__raycastable="menuActive && hasVR"\n position="0 0 -0.01"\n geometry="primitive: plane; width: 3; height: 0.8"\n material="shader: panelShader; brightness: 0.1; ratio: 4; borderWidth: 0.002"\n mixin="modeBackgroundHover modeBackgroundSelect"></a-entity>\n <a-entity\n class="modeTitle"\n mixin="font"\n text="align: left; value: RIDE\nMODE; lineHeight: 45; width: 2.6"\n render-order="menutext"\n position="0.14 0.05 0"></a-entity>\n <a-entity\n class="modeThumb"\n mixin="modeThumbAnimations"\n geometry="primitive: plane; width: 0.7; height: 0.5"\n material="src: #modeRideImg; shader: flat"\n position="-0.20 0 0"></a-entity>\n <a-entity\n class="modeInstructions"\n mixin="font"\n render-order="menutext"\n bind__text="color: colorPrimary"\n text="value: Relax and enjoy the ride.\n\nTake a quick breather.\n\nNo score!; width: 1.6; lineHeight: 47"\n position="1.1 -0.05 0"></a-entity>\n</a-entity>\n\n \n\n<a-entity\n id="modeclassicvr"\n class="modeItem"\n data-mode="classic"\n data-name="classicvr"\n position="0 -0.75 0"\n mixin="modeAnimations">\n <a-entity\n class="modeBackground"\n bind-toggle__raycastable="menuActive && hasVR"\n position="0 0 -0.01"\n geometry="primitive: plane; width: 3; height: 0.8"\n material="shader: panelShader; brightness: 0.1; ratio: 4; borderWidth: 0.002"\n mixin="modeBackgroundHover modeBackgroundSelect"></a-entity>\n <a-entity\n class="modeTitle"\n mixin="font"\n text="align: left; value: CLASSIC\nMODE; lineHeight: 45; width: 2.6"\n render-order="menutext"\n position="0.14 0.05 0"></a-entity>\n <a-entity\n class="modeThumb"\n mixin="modeThumbAnimations"\n geometry="primitive: plane; width: 0.7; height: 0.5"\n material="src: #modeClassicImg; shader: flat"\n position="-0.20 0 0"></a-entity>\n <a-entity\n class="modeInstructions"\n mixin="font"\n render-order="menutext"\n bind__text="color: colorPrimary"\n text="value: Cut the beats, mind\ncolor and direction.\n\nAvoid all things yellow.\n\nSwing fast and accurate\nfor better score.; width: 1.6; lineHeight: 47"\n position="1.1 -0.05 0"></a-entity>\n</a-entity>\n\n\n <a-entity\n id="modeMultiplayer"\n class="modeItem"\n multiplayer-button\n position="0 -1.50 0">\n <a-entity\n bind-toggle__raycastable="menuActive && hasVR"\n position="0 0 -0.01"\n geometry="primitive: plane; width: 3; height: 0.55"\n material="shader: panelShader; brightness: 0.1; ratio: 5.5; borderWidth: 0.002"\n mixin="modeBackgroundHover modeBackgroundSelect"></a-entity>\n <a-entity\n mixin="font"\n text="align: left; value: MULTIPLAYER; lineHeight: 45; width: 2.6; color: #FFF"\n render-order="menutext"\n position="-1.0 0.00 0"></a-entity>\n <a-entity\n mixin="font"\n bind__text="color: colorPrimary"\n text="value: Race a friend in real time.\nCreate a room or join with a code.; width: 1.6; lineHeight: 47"\n render-order="menutext"\n position="0.50 0.00 0"></a-entity>\n </a-entity>\n </a-entity>\n\n <a-entity\n id="loadingTipsContainer"\n bind__visible="menuActive"\n position="0 -1.3 0.1"\n rotation="0 0 0">\n\n <a-entity\n id="loadingTipsBackground"\n bind-toggle__raycastable="menuActive"\n render-order="menu"\n geometry="primitive: plane; width: 1.5; height: 0.3"\n material="shader: panelShader; ratio: 1.15; borderRadius: 0.4"\n render-order="menubutton"\n position="0 0 -0.03"></a-entity>\n\n <a-entity\n id="loadingTipsText"\n mixin="font"\n bind__text="color: colorPrimary"\n text="align: center; wrapCount: 30; width: 1; value: Press down on thumbstick center to open menu while playing."\n render-order="menutext"\n position="0 -0.02 0.001"></a-entity>\n </a-entity>\n</a-entity>\n\x3c!-- </require> --\x3e</require>\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/victory.html"> --\x3e\n\x3c!-- Victory. --\x3e\n<a-entity\n id="victoryInfoContainer"\n position="0 1.5 -2"\n bind__visible="isVictory">\n\n <a-entity\n id="victoryAccuracyRing"\n bind__material="color: colorPrimary"k\n bind__victory-accuracy-ring="accuracy: score.finalAccuracy"\n animation="property: components.material.material.uniforms.progress.value; from: 0; easing: easeOutQuad; delay: 500; dur: 2500; autoplay: false"\n geometry="primitive: plane; width: 0.7; height: 0.7"\n material="shader: ring; transparent: true; radiusInner: 0.8; blending: additive; depthWrite: false"\n position="0 0.18 0"\n render-order="victory"></a-entity>\n\n <a-entity\n id="victoryInfoRank"\n class="accuracyTextCounterSubscribe"\n bind__animation="enabled: isVictory"\n bind__victory-rank="isVictory: isVictory; rank: score.rank"\n bind-toggle__raycastable="isVictory"\n scale="0 0 0"\n position="0 -0.034 0"\n animation__rotation="property: object3D.rotation.y; from: 0; to: -360; loop: true; easing: linear; dur: 5000; startEvents: textcounterdone"\n animation__scale="property: scale; from: 0 0 0; to: 1 1 1; loop: false; easing: easeOutQuad; dur: 300; startEvents: textcounterdone"\n play-sound="sound: #victorySound; event: textcounterdone"\n render-order="menuitemtext"\n text-geometry="font: #VigaRegularThree; bevelEnabled: true; bevelSize: 0.01; bevelThickness: 0.01; curveSegments: 7; height: 0.15; size: 0.4"></a-entity>\n\n <a-entity\n id="victoryInfoAccuracy"\n class="accuracyTextCounterSubscribe"\n mixin="font"\n bind__text="color: colorSecondary; opacity: isVictory && 0 || 0; value: score.score + \' POINTS\'"\n animation="property: components.text.material.uniforms.opacity.value; from: 0; to: 1; startEvents: textcounterdone"\n text="align: left; wrapCount: 22; baseline: top; width: 0.81"\n position="0.85 0.2 0"\n render-order="menuitemtext"></a-entity>\n\n <a-entity\n id="victoryInfoBeatsHit"\n class="accuracyTextCounterSubscribe"\n mixin="font"\n bind__text="color: colorSecondary; opacity: isVictory && 0 || 0; value: score.beatsText"\n animation="property: components.text.material.uniforms.opacity.value; from: 0; to: 1; startEvents: textcounterdone"\n text="align: left; wrapCount: 22; baseline: top; width: 0.81"\n position="0.85 0.1 0"\n render-order="menuitemtext"></a-entity>\n\n <a-entity\n id="victoryInfoAccuracy"\n mixin="font"\n bind__text="color: colorTertiary"\n text="value: 0; align: center; wrapCount: 15; baseline: top; width: 2.25"\n bind__text-counter="enabled: isVictory; value: score.finalAccuracy"\n text-counter="suffix: %"\n position="0 -0.47 0"\n render-order="menuitemtext"></a-entity>\n\n <a-entity\n id="victoryInfoMaxCombo"\n mixin="font"\n bind__text="color: colorSecondary"\n bind__text-counter="enabled: isVictory; value: score.maxCombo"\n text="align: center; wrapCount: 22; baseline: top; width: 1"\n text-counter="prefix: MAX STREAK: ; emit: true"\n proxy-event="event: textcounterdone; to: .accuracyTextCounterSubscribe"\n position="0 -0.58 0"\n render-order="menuitemtext"></a-entity>\n\n <a-entity\n id="victoryButtons"\n play-sound="event: mouseenter; sound: #hoverSound; volume: 0.03"\n play-sound__click="event: click; sound: #confirmSound; volume: 0.25"\n render-order="menubutton">\n <a-entity\n id="victoryRestartButton"\n class="accuracyTextCounterSubscribe"\n mixin="gameMenuButton"\n bind-toggle__raycastable="isVictory"\n bind__material="opacity: isVictory && 0 || 0"\n animation="property: components.material.material.uniforms.opacity.value; from: 0; to: 1; startEvents: textcounterdone"\n position="-0.56 -0.79 0.05"\n proxy-event="event: click; to: a-scene; as: gamemenurestart">\n <a-entity\n class="accuracyTextCounterSubscribe"\n mixin="gameMenuButtonText"\n bind__text="opacity: isVictory && 0 || 0"\n animation="property: components.text.material.uniforms.opacity.value; from: 0; to: 1; startEvents: textcounterdone"\n render-order="menuitemtext"\n text="opacity: 0; value: PLAY AGAIN"></a-entity>\n </a-entity>\n\n <a-entity\n id="victoryExitButton"\n class="accuracyTextCounterSubscribe"\n mixin="gameMenuButton"\n bind-toggle__raycastable="isVictory"\n bind__material="opacity: isVictory && 0 || 0"\n animation="property: components.material.material.uniforms.opacity.value; from: 0; to: 1; startEvents: textcounterdone"\n position="0.56 -0.79 0.05"\n proxy-event="event: click; to: a-scene; as: gamemenuexit">\n <a-entity\n class="accuracyTextCounterSubscribe"\n mixin="gameMenuButtonText"\n bind__text="opacity: isVictory && 0 || 0"\n animation="property: components.text.material.uniforms.opacity.value; from: 0; to: 1; startEvents: textcounterdone"\n render-order="menuitemtext"\n text="opacity: 0; value: BACK TO MENU"></a-entity>\n </a-entity>\n </a-entity>\n</a-entity>\n\x3c!-- </require> --\x3e</require>\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/leaderboard.html"> --\x3e\n<a-entity\n id="leaderboard"\n class="accuracyTextCounterSubscribe"\n bind__animation="enabled: isVictory"\n bind__scale="isVictory && \'0 0 0\' || \'1 1 1\'"\n bind__visible="(!!menuSelectedChallenge.id || !!challenge.id) && (menuActive || isPaused || isVictory || isLoading) && !genreMenuOpen && gameMode !== \'ride\'"\n position="2.36 1.5 -1.19"\n rotation="0 -60 0"\n animation="property: scale; from: 0 0 0; to: 1 1 1; easing: easeOutBack; startEvents: textcounterdone"\n render-order="menuitem">\n\n <a-entity\n bind-toggle__raycastable="leaderboardActive"\n id="leaderboardBackground" position="0 0 0"\n geometry="primitive: plane; width: 2; height: 2"\n material="shader: panelShader; ratio: 1.16; brightness: 0.2"></a-entity>\n\n <a-entity\n id="leaderboardChallengeImage"\n bind__menu-selected-challenge-image="coverURL: menuSelectedChallenge.coverURL"\n bind__visible="!isVictory"\n geometry="primitive: plane; height: 0.12; width: 0.12"\n material="shader: flat"\n position="-0.44 0.63 0.001"></a-entity>\n\n <a-entity\n id="leaderboardTitle"\n mixin="font"\n text="align: center; width: 2.5; value: LEADERBOARD"\n position="0.05 0.55 0.001"\n bind__visible="!leaderboardQualified"></a-entity>\n\n <a-entity\n id="leaderboardNames"\n mixin="font"\n bind__text="color: colorSecondary; value: leaderboardNames"\n bind__visible="!leaderboardQualified && !leaderboardEmpty"\n text="baseline: top; width: 1.2; anchor: left; wrapCount: 28; lineHeight: 53;"\n position="-0.7 0.3 0.001"></a-entity>\n\n <a-entity\n id="leaderboardScores"\n mixin="font"\n bind__text="value: leaderboardScores"\n bind__visible="!leaderboardQualified && !leaderboardEmpty"\n text="baseline: top; align: right; width: 1.2; anchor: right; color: #fff; wrapCount: 28; lineHeight: 53;"\n position="0.7 0.3 0.001"></a-entity>\n\n <a-entity\n id="leaderboardEmpty"\n mixin="font"\n bind__visible="leaderboard.length === 0 && !leaderboardQualified && !leaderboardLoading"\n text="align: center; color: #999; baseline: center; width: 2; value: No high scores. Be the first!"\n position="0 0 0.001"></a-entity>\n\n <a-entity\n id="leaderboardKeyboard"\n bind__super-keyboard="hand: activeHand === \'left\' && \'#leftHand\' || \'#rightHand\'; show: leaderboardQualified"\n super-keyboard="inputColor: #fff; hand: #rightHand; imagePath: assets/img/keyboard; font: assets/fonts/Viga-Regular.json; align: center; model: superkeyboard; keyColor: #fff; injectToRaycasterObjects: false; filters: allupper; keyHoverColor: #fff; maxLength: 15; width: 1.5; label: NEW HIGH SCORE!\nENTER THE LEADERBOARD; labelColor: #FAFAFA"\n position="0 -0.08 0.02"\n proxy-event__change="event: superkeyboardchange; to: a-scene; as: leaderboardusername"\n keyboard-raycastable="condition: leaderboardQualified"\n render-order="menutext"\n render-order-recursive>\n </a-entity>\n\n <a-entity id="leaderboardSubmit"\n position="0 -0.67 0.002"\n mixin="bigMenuButton"\n bind__visible-raycastable="leaderboardQualified"\n proxy-event="event: click; to: a-scene; as: leaderboardsubmit">\n <a-entity mixin="font" text="align: center; color: #FFF; wrapCount: 26; value: SUBMIT HIGH SCORE" position="0 -0.055 0.01"></a-entity>\n \x3c!--slice9="width: 1.5; height: 0.24"--\x3e\n </a-entity>\n</a-entity>\n\x3c!-- </require> --\x3e</require>\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/multiplayerLobby.html"> --\x3e\n\x3c!--\n Multiplayer lobby panel + in-game HUD + victory results overlay.\n All conditional colors / opacities / labels are precomputed in state to\n avoid ternary expressions in bind__ attributes (aframe-state-component\n evaluates simple property paths reliably; complex JS is fragile).\n--\x3e\n\n\n\n<a-entity\n id="multiplayerLobby"\n bind__visible="mpLobbyVisible"\n position="0 1.55 -1.4"\n render-order="menu">\n\n \x3c!-- Background --\x3e\n <a-entity\n bind-toggle__raycastable="mpLobbyVisible"\n geometry="primitive: plane; width: 1.7; height: 1.35"\n material="shader: panelShader; brightness: 0.18; ratio: 1.26; borderWidth: 0.005; borderRadius: 0.04"\n render-order="menu"\n position="0 0 -0.02"></a-entity>\n\n \x3c!-- Title --\x3e\n <a-entity\n mixin="font"\n text="align: center; value: MULTIPLAYER; width: 1.5; lineHeight: 50; color: #FFF"\n render-order="menutext"\n position="0 0.60 0"></a-entity>\n\n \x3c!-- Room code --\x3e\n <a-entity\n mixin="font"\n bind__text="value: mpRoomCodeText; color: colorSecondaryBright"\n text="align: center; width: 1.5; lineHeight: 80"\n render-order="menutext"\n position="0 0.46 0"></a-entity>\n\n \x3c!-- Status / instructions --\x3e\n <a-entity\n mixin="font"\n bind__text="value: mpStatusText; color: colorPrimary"\n text="align: center; width: 1.5; wrapCount: 38; lineHeight: 50"\n render-order="menutext"\n position="0 0.34 0"></a-entity>\n\n \x3c!-- Player rows --\x3e\n <a-entity position="0 0.13 0">\n \n<a-entity position="0 0 0" bind__visible="multiplayer.row0Visible">\n <a-entity\n geometry="primitive: plane; width: 1.45; height: 0.115"\n bind__material="opacity: multiplayer.row0BgOpacity"\n material="shader: flat; color: #ffffff; transparent: true"\n position="0 0 -0.005"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.row0Name; color: multiplayer.row0NameColor"\n text="align: left; width: 1.4; lineHeight: 55"\n render-order="menutext"\n position="-0.62 0 0"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.row0Score; color: multiplayer.row0ScoreColor"\n text="align: right; width: 1.4; lineHeight: 55"\n render-order="menutext"\n position="0.62 0 0"></a-entity>\n</a-entity>\n\n \n<a-entity position="0 -0.13 0" bind__visible="multiplayer.row1Visible">\n <a-entity\n geometry="primitive: plane; width: 1.45; height: 0.115"\n bind__material="opacity: multiplayer.row1BgOpacity"\n material="shader: flat; color: #ffffff; transparent: true"\n position="0 0 -0.005"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.row1Name; color: multiplayer.row1NameColor"\n text="align: left; width: 1.4; lineHeight: 55"\n render-order="menutext"\n position="-0.62 0 0"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.row1Score; color: multiplayer.row1ScoreColor"\n text="align: right; width: 1.4; lineHeight: 55"\n render-order="menutext"\n position="0.62 0 0"></a-entity>\n</a-entity>\n\n \n<a-entity position="0 -0.26 0" bind__visible="multiplayer.row2Visible">\n <a-entity\n geometry="primitive: plane; width: 1.45; height: 0.115"\n bind__material="opacity: multiplayer.row2BgOpacity"\n material="shader: flat; color: #ffffff; transparent: true"\n position="0 0 -0.005"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.row2Name; color: multiplayer.row2NameColor"\n text="align: left; width: 1.4; lineHeight: 55"\n render-order="menutext"\n position="-0.62 0 0"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.row2Score; color: multiplayer.row2ScoreColor"\n text="align: right; width: 1.4; lineHeight: 55"\n render-order="menutext"\n position="0.62 0 0"></a-entity>\n</a-entity>\n\n \n<a-entity position="0 -0.39 0" bind__visible="multiplayer.row3Visible">\n <a-entity\n geometry="primitive: plane; width: 1.45; height: 0.115"\n bind__material="opacity: multiplayer.row3BgOpacity"\n material="shader: flat; color: #ffffff; transparent: true"\n position="0 0 -0.005"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.row3Name; color: multiplayer.row3NameColor"\n text="align: left; width: 1.4; lineHeight: 55"\n render-order="menutext"\n position="-0.62 0 0"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.row3Score; color: multiplayer.row3ScoreColor"\n text="align: right; width: 1.4; lineHeight: 55"\n render-order="menutext"\n position="0.62 0 0"></a-entity>\n</a-entity>\n\n </a-entity>\n\n \x3c!-- Action button row 1: idle (no room) --\x3e\n <a-entity position="0 -0.42 0">\n <a-entity\n bind__visible="!mpInRoom"\n bind-toggle__raycastable="mpLobbyVisible && !mpInRoom"\n position="-0.40 0 0"\n mixin="modeBackgroundHover"\n geometry="primitive: plane; width: 0.65; height: 0.16"\n material="shader: panelShader; brightness: 0.30; ratio: 4.0; borderWidth: 0.004"\n proxy-event="event: click; as: mpcreate; to: a-scene"\n play-sound__click="event: click; sound: #confirmSound; volume: 0.1">\n <a-entity\n mixin="font"\n text="align: center; value: CREATE ROOM; width: 0.6; lineHeight: 60; color: #FFF"\n position="0 0 0.001"></a-entity>\n </a-entity>\n\n <a-entity\n bind__visible="!mpInRoom"\n bind-toggle__raycastable="mpLobbyVisible && !mpInRoom"\n position="0.40 0 0"\n mixin="modeBackgroundHover"\n geometry="primitive: plane; width: 0.65; height: 0.16"\n material="shader: panelShader; brightness: 0.30; ratio: 4.0; borderWidth: 0.004"\n multiplayer-join-button\n play-sound__click="event: click; sound: #confirmSound; volume: 0.1">\n <a-entity\n mixin="font"\n bind__text="value: mpJoinButtonText"\n text="align: center; width: 0.6; lineHeight: 60; color: #FFF"\n position="0 0 0.001"></a-entity>\n </a-entity>\n\n \x3c!-- READY (in lobby phase) --\x3e\n <a-entity\n bind__visible="mpInLobbyPhase"\n bind-toggle__raycastable="mpInLobbyPhase"\n position="-0.55 0 0"\n mixin="modeBackgroundHover"\n geometry="primitive: plane; width: 0.50; height: 0.16"\n bind__material="brightness: mpReadyButtonBrightness"\n material="shader: panelShader; ratio: 3.1; borderWidth: 0.004"\n multiplayer-ready-button\n play-sound__click="event: click; sound: #confirmSound; volume: 0.1">\n <a-entity\n mixin="font"\n bind__text="value: mpReadyButtonText; color: mpReadyButtonColor"\n text="align: center; width: 0.5; lineHeight: 60"\n position="0 0 0.001"></a-entity>\n </a-entity>\n\n \x3c!-- Share link (in room) --\x3e\n <a-entity\n bind__visible="mpInRoom"\n bind-toggle__raycastable="mpInRoom"\n position="0 0 0"\n mixin="modeBackgroundHover"\n geometry="primitive: plane; width: 0.55; height: 0.16"\n material="shader: panelShader; brightness: 0.20; ratio: 3.4; borderWidth: 0.004"\n proxy-event="event: click; as: mpsharelink; to: a-scene"\n play-sound__click="event: click; sound: #confirmSound; volume: 0.1">\n <a-entity\n mixin="font"\n bind__text="value: mpShareButtonText; color: mpShareButtonColor"\n text="align: center; width: 0.55; lineHeight: 65"\n position="0 0 0.001"></a-entity>\n </a-entity>\n\n \x3c!-- Name editor (in room) --\x3e\n <a-entity\n bind__visible="mpInRoom"\n bind-toggle__raycastable="mpInRoom"\n position="0.55 0 0"\n mixin="modeBackgroundHover"\n geometry="primitive: plane; width: 0.50; height: 0.16"\n material="shader: panelShader; brightness: 0.20; ratio: 3.1; borderWidth: 0.004"\n multiplayer-name-button\n play-sound__click="event: click; sound: #confirmSound; volume: 0.1">\n <a-entity\n mixin="font"\n text="align: center; value: SET NAME; width: 0.5; lineHeight: 60; color: #FFF"\n position="0 0 0.001"></a-entity>\n </a-entity>\n </a-entity>\n\n \x3c!-- Action button row 2: leave + back --\x3e\n <a-entity position="0 -0.59 0">\n <a-entity\n bind__visible="mpInRoom"\n bind-toggle__raycastable="mpInRoom"\n position="0 0 0"\n geometry="primitive: plane; width: 0.55; height: 0.13"\n material="shader: panelShader; brightness: 0.10; ratio: 4.2; borderWidth: 0.003"\n proxy-event="event: click; as: mpleave; to: a-scene">\n <a-entity\n mixin="font"\n text="align: center; value: LEAVE ROOM; width: 0.55; lineHeight: 70; color: #888"\n position="0 0 0.001"></a-entity>\n </a-entity>\n <a-entity\n bind__visible="!mpInRoom"\n bind-toggle__raycastable="mpLobbyVisible && !mpInRoom"\n position="0 0 0"\n proxy-event="event: click; as: mpclose; to: a-scene">\n <a-entity\n mixin="font"\n text="align: center; value: < back to modes; width: 1.2; lineHeight: 60; color: #555"\n render-order="menutext"></a-entity>\n </a-entity>\n </a-entity>\n</a-entity>\n\n\n\x3c!-- ===================== IN-GAME COUNTDOWN OVERLAY ===================== --\x3e\n<a-entity\n id="mpCountdown"\n bind__visible="mpCountdownVisible"\n position="0 1.7 -2"\n render-order="menu">\n <a-entity\n geometry="primitive: plane; width: 1.4; height: 0.4"\n material="shader: panelShader; brightness: 0.30; ratio: 3.5; borderWidth: 0.005"\n position="0 0 -0.01"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.countdownText; color: colorSecondaryBright"\n text="align: center; width: 1.3; lineHeight: 30"\n render-order="menutext"></a-entity>\n</a-entity>\n\n\n\x3c!-- ===================== IN-GAME OPPONENT HUD ===================== --\x3e\n<a-entity\n id="mpHud"\n bind__visible="mpHudVisible"\n position="-1.45 1.65 -1.0"\n rotation="0 35 0"\n render-order="menu">\n <a-entity\n geometry="primitive: plane; width: 0.85; height: 0.55"\n material="shader: panelShader; brightness: 0.10; ratio: 1.55; borderWidth: 0.002"\n position="0 0 -0.01"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: mpRankHudText; color: colorSecondaryBright"\n text="align: left; width: 0.75; lineHeight: 60"\n position="-0.34 0.22 0"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.scoreDeltaText; color: mpDeltaColor"\n text="align: right; width: 0.75; lineHeight: 65"\n position="0.34 0.22 0"></a-entity>\n <a-entity\n mixin="font"\n text="align: left; value: OPPONENTS; width: 0.75; lineHeight: 80; color: #888"\n position="-0.34 0.10 0"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.opponentText; color: colorPrimary"\n text="align: left; width: 0.75; lineHeight: 60"\n position="-0.34 -0.02 0"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.opponentScores"\n text="align: right; width: 0.75; lineHeight: 60; color: #FFF"\n position="0.34 -0.02 0"></a-entity>\n</a-entity>\n\n\n\x3c!-- ===================== VICTORY RESULTS ===================== --\x3e\n<a-entity\n id="mpResults"\n bind__visible="mpResultsVisible"\n position="0 1.05 -1.6"\n render-order="menu">\n <a-entity\n geometry="primitive: plane; width: 1.6; height: 0.7"\n material="shader: panelShader; brightness: 0.20; ratio: 2.3; borderWidth: 0.004"\n position="0 0 -0.02"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: mpWinnerBanner; color: colorSecondaryBright"\n text="align: center; width: 1.5; lineHeight: 30"\n position="0 0.27 0"></a-entity>\n <a-entity\n mixin="font"\n text="align: center; value: ROOM RESULTS; width: 1.4; lineHeight: 70; color: #888"\n position="0 0.13 0"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.resultsText"\n text="align: left; width: 1.4; lineHeight: 50; color: #FFF"\n position="-0.65 -0.02 0"></a-entity>\n <a-entity\n mixin="font"\n bind__text="value: multiplayer.resultsScores"\n text="align: right; width: 1.4; lineHeight: 50; color: #FFF"\n position="0.65 -0.02 0"></a-entity>\n <a-entity\n bind__visible="multiplayer.isHost"\n bind-toggle__raycastable="multiplayer.isHost && mpResultsVisible"\n position="0 -0.27 0"\n mixin="modeBackgroundHover"\n geometry="primitive: plane; width: 0.7; height: 0.13"\n material="shader: panelShader; brightness: 0.30; ratio: 5.4; borderWidth: 0.003"\n proxy-event="event: click; as: mprematch; to: a-scene">\n <a-entity\n mixin="font"\n text="align: center; value: REMATCH; width: 0.7; lineHeight: 65; color: #FFF"\n position="0 0 0.001"></a-entity>\n </a-entity>\n</a-entity>\n\n\n\x3c!-- ===================== ROOM-CODE KEYBOARD (in-VR) ===================== --\x3e\n<a-entity\n id="mpKeyboard"\n bind__super-keyboard="hand: activeHand === \'left\' && \'#leftHand\' || \'#rightHand\'; show: mpKeyboardOpen"\n super-keyboard="hand: #rightHand; imagePath: assets/img/keyboard; font: assets/fonts/Viga-Regular.json; align: center; model: superkeyboard; keyColor: #fff; injectToRaycasterObjects: false; filters: allupper; keyHoverColor: #fff; maxLength: 4; width: 1.3; label: ENTER ROOM CODE; labelColor: #FAFAFA; inputColor: #fff"\n position="0 1.3 -1.3"\n render-order="menutext"\n multiplayer-keyboard-bridge\n proxy-event__change="event: superkeyboardchange; to: a-scene; as: mpcodeinput"\n proxy-event__submit="event: superkeyboarddismiss; to: a-scene; as: mpkeyboardsubmit"\n bind-toggle__raycastable="mpKeyboardOpen"\n render-order-recursive>\n</a-entity>\n\n\n\x3c!-- ===================== NAME KEYBOARD (in-VR) ===================== --\x3e\n<a-entity\n id="mpNameKeyboard"\n bind__super-keyboard="hand: activeHand === \'left\' && \'#leftHand\' || \'#rightHand\'; show: mpNameKeyboardOpen"\n super-keyboard="hand: #rightHand; imagePath: assets/img/keyboard; font: assets/fonts/Viga-Regular.json; align: center; model: superkeyboard; keyColor: #fff; injectToRaycasterObjects: false; filters: allupper; keyHoverColor: #fff; maxLength: 14; width: 1.3; label: ENTER YOUR NAME; labelColor: #FAFAFA; inputColor: #fff"\n position="0 1.3 -1.3"\n render-order="menutext"\n proxy-event__change="event: superkeyboardchange; to: a-scene; as: mpnameinput"\n proxy-event__submit="event: superkeyboarddismiss; to: a-scene; as: mpnamekeyboardsubmit"\n bind-toggle__raycastable="mpNameKeyboardOpen"\n render-order-recursive>\n</a-entity>\n\x3c!-- </require> --\x3e</require>\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/news.html"> --\x3e\n\n\n\n\n\n<a-entity\n id="news"\n bind__visible="menuActive && !menuSelectedChallenge.id && !isMenuOpening"\n position="2.365374194652176 1.6 -1.1952715561051024"\n rotation="0 -60 0"\n render-order="menuitem">\n\n <a-entity\n id="newsBackground"\n bind-toggle__raycastable="menuActive && !menuSelectedChallenge.id && !isMenuOpening"\n geometry="primitive: plane; width: 2.1; height: 1.9"\n material="shader: panelShader; ratio: 1.14; brightness: 0.2"></a-entity>\n\n <a-entity\n id="newsText"\n mixin="font"\n text="align: left; color: #FAFAFA; baseline: center; width: 1.6; wrapCount: 50; value: three.ws\n\nGive your AI a body. three.ws is an open-source, browser-native 3D AI agent platform.\n\nDrop a GLB file, add an LLM brain, register on-chain, and embed anywhere — no plugins, no installs.\n\nVisit three.ws to build your agent."\n position="0 -0.04 0.001"></a-entity>\n</a-entity>\n\n<a-entity\n id="support"\n bind__visible="menuActive && !menuSelectedChallenge.id && !isMenuOpening && inVR"\n position="2.365374194652176 0.25 -1.1952715561051024"\n rotation="-15 -60 0"\n render-order="menuitem">\n\n <a-entity\n id="supportBackground"\n bind-toggle__raycastable="menuActive && !menuSelectedChallenge.id && !isMenuOpening"\n geometry="primitive: plane; width: 2.1; height: 0.9"\n material="shader: panelShader; ratio: 1.14; brightness: 0.2"></a-entity>\n\n <a-entity\n id="supportImage"\n geometry="primitive: plane; width: 0.6; height: 0.5"\n material="shader: flat; src: assets/img/banner.jpg"\n position="-0.5 0 0.001"></a-entity>\n\n <a-entity\n id="supportText"\n mixin="font"\n text="align: left; color: #FAFAFA; baseline: center; width: 1; wrapCount: 30; value: Support three.ws development.\n\nVisit three.ws for more."\n position="0.35 -0.04 0.001"></a-entity>\n</a-entity>\n\x3c!-- </require> --\x3e</require>\n\n <a-mixin\n id="cursorMesh"\n material="shader: flat; transparent: true; src: #cursorMeshImg; depthTest: false"\n sub-object="from: #cursorLaser; name: glow"></a-mixin>\n\n <a-entity\n id="curve"\n material="shader: supercurve"\n supercurve\n supercurve-color\n render-order="curve"></a-entity>\n\n <a-entity\n id="tunnelsContainer"\n render-order="curve"\n bind__visible="isPlaying || isPaused"></a-entity>\n\n <a-entity\n id="beatContainer"\n beat-hit-sound\n bind__visible="isPlaying"></a-entity>\n\n <a-entity\n id="wallContainer"\n bind__visible="isPlaying"></a-entity>\n\n <a-entity id="curveFollowRig"\n bind__curve-follow-rig-reset="isVictory: isVictory"\n bind__supercurve-follow="enabled: isPlaying; speed: speed"\n supercurve-follow="target: #curve">\n\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/stageFollow.html"> --\x3e\n<a-entity\n id="tube"\n bind__visible="isPlaying"\n rotation="90 180 0"\n position="0 0 -5"\n geometry="primitive: cylinder; radius: 3; openEnded: true; height: 20"\n materials="name: tube"\n animation="property: components.materials.material.uniforms.opacity.value; from: 1; to: 0; easing: easeInOutCubic; startEvents: pulse"></a-entity>\n\n<a-entity\n id="platformShadow"\n obj-model="obj: #homeShadowObj"\n position="0 0.02 0"\n material="src: #homeShadowImg; shader: flat; blending: multiply; transparent: true;"\n raycastable-game\n render-order="curveshadow"\n stepback></a-entity>\n\n<a-entity\n id="platform"\n obj-model="obj: #homeObj"\n materials="name: home"\n bind__materials="animate: isPlaying"></a-entity>\n\n<a-entity\n id="sideGlows"\n bind__visible="isPlaying || isPaused">\n <a-entity\n id="leftSideGlow"\n geometry="primitive: plane; width: 8; height: 2"\n materials="name: leftsideglow"\n position="-2.1 .5 -3"\n rotation="20 -90 0"\n render-order="sideglow">\n </a-entity>\n <a-entity\n id="rightSideGlow"\n geometry="primitive: plane; width: 8; height: 2"\n materials="name: rightsideglow"\n position="2.1 .5 -3"\n rotation="-20 -90 0"\n render-order="sideglow">\n </a-entity>\n</a-entity>\n\n<a-entity\n id="light"\n light="type: hemisphere; color: #666"\n position="0 10 20"></a-entity>\n\n\n\x3c!-- </require> --\x3e</require>\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/score.html"> --\x3e\n<a-mixin\n id="scoreText"\n mixin="font"\n text="lineHeight: 40; color: #FAFAFA; letterSpacing: -2; align: center; opacity: 0.7"></a-mixin>\n\n<a-entity\n id="scoreContainer"\n bind__score-texts="isLoading: isLoading"\n bind__visible="score.active"\n render-order="score">\n\n <a-entity\n id="songProgressRing"\n bind__material="color: colorSecondary"\n bind__song-progress-info="enabled: isPlaying || isPaused && challenge.isBeatsPreloaded"\n geometry="primitive: plane; width: 0.57; height: 0.03"\n material="shader: flat"\n position="1.525 0.1 -3.94"\n rotation="-30 0 0">\n </a-entity>\n\n <a-entity id="scoreNumberContainer" position="1.5 0.13 -4">\n <a-entity\n id="combo"\n mixin="scoreText"\n bind__text="color: colorPrimary; value: \'STREAK \' + score.combo"\n text="width: 3.5; align: left; anchor: left"\n rotation="-20 0 0"\n position="-0.025 0.175 0"></a-entity>\n\n <a-entity\n id="accuracy"\n mixin="scoreText"\n bind__text="color: colorSecondary; value: score.accuracyInt + \'%\' + \' / \' + score.score"\n text="width: 3.5; align: left; anchor: left"\n rotation="-20 0 0"></a-entity>\n </a-entity>\n</a-entity>\n\x3c!-- </require> --\x3e</require>\n \x3c!-- <require path="/workspaces/three.ws/rider/src/templates/gameMenu.html"> --\x3e\n<a-mixin\n id="gameMenuButton"\n mixin="bigMenuButton"\n animation__mouseenter="property: components.material.material.uniforms.activePanel.value; from: 0; to: 1; startEvents: mouseenter; pauseEvents: mouseleave; dur: 70"\n animation__mouseleave="property: components.material.material.uniforms.activePanel.value; from: 1; to: 0; startEvents: mouseleave; pauseEvents: mouseenter; dur: 70"\n geometry="height: 0.28"></a-mixin>\n\n<a-mixin\n id="gameMenuButtonText"\n mixin="font"\n position="0 -0.08 0.01"\n render-order="menutext"\n text="align: center; wrapCount: 17"></a-mixin>\n\n\x3c!-- Titles. --\x3e\n<a-entity id="inGameMenuTitles" position="0 2.2 -2.3">\n <a-entity mixin="gameMenuButtonText" text="value: GAME OVER; color: #f01978; width: 3.5" bind__visible="isGameOver"></a-entity>\n <a-entity mixin="gameMenuButtonText" text="value: SONG CLEARED; color: #FFF; width: 3.5" bind__visible="isVictory" position="0 0.1 0"></a-entity>\n <a-entity mixin="gameMenuButtonText" bind__text="color: colorPrimary" text="value: PAUSED; width: 3.5" bind__visible="isPaused"></a-entity>\n</a-entity>\n\n<a-entity\n id="gameMenu"\n bind__visible="isPaused || isVictory"\n position="0 1.5 -2"\n play-sound="event: mouseenter; sound: #hoverSound; volume: 0.1"\n play-sound__click="event: click; sound: #confirmSound; volume: 0.25">\n\n \x3c!-- Actions. --\x3e\n <a-entity\n id="resumeButton"\n mixin="gameMenuButton"\n bind-toggle__raycastable="isPaused"\n bind__visible="isPaused"\n position="0 0.35 0"\n proxy-event="event: click; to: a-scene; as: gamemenuresume">\n <a-entity mixin="gameMenuButtonText" text="value: RESUME"></a-entity>\n </a-entity>\n\n <a-entity\n id="restartButton"\n mixin="gameMenuButton"\n bind__visible="!isVictory"\n bind-toggle__raycastable="isPaused || isGameOver"\n proxy-event="event: click; to: a-scene; as: gamemenurestart">\n <a-entity mixin="gameMenuButtonText" text="value: RESTART SONG"></a-entity>\n </a-entity>\n\n <a-entity\n id="exitButton"\n mixin="gameMenuButton"\n bind__visible="!isVictory"\n bind-toggle__raycastable="isPaused || isGameOver"\n position="0 -0.35 0"\n proxy-event="event: click; to: a-scene; as: gamemenuexit">\n <a-entity mixin="gameMenuButtonText" text="value: EXIT TO MENU"></a-entity>\n </a-entity>\n\n \x3c!-- Song info. --\x3e\n <a-entity id="gameMenuSongInfoContainer"\n position="0 -1 0.15473"\n rotation="-20 0 0"\n song-info-positioner\n bind__song-info-positioner="victory: isVictory">\n <a-entity id="gameMenuSongBackground"\n bind-toggle__raycastable="isPaused || isVictory"\n render-order="menu"\n geometry="primitive: plane; width: 2.5; height: 0.3"\n material="shader: panelShader; transparent: true; ratio: 4; borderRadius: 0.5; borderWidth: 0.02"\n position="0 0 -0.03"></a-entity>\n\n <a-entity id="gameMenuSongImage"\n copy-texture="from: #menuSelectedChallengeImage"\n geometry="primitive: plane; buffer: false; skipCache: true; height: 0.3; width: 0.3"\n material="shader: flat"\n position="-1 0 0"></a-entity>\n\n <a-entity id="gameMenuSongInfo">\n <a-entity\n id="gameMenuSongName"\n position="0 0.01 0"\n mixin="font" text="align: center; color: #fff; wrapCount: 30; baseline: top; lineHeight: 36; width: 1.2"\n bind__text="value: challenge.metadata.songName"></a-entity>\n <a-entity\n id="gameMenuSongSubName"\n mixin="font"\n position="0 -0.09 0"\n bind__text="color: colorSecondary"\n bind__text-truncate="value: challenge.metadata.songSubName + \' - \' + challenge.metadata.songAuthorName"\n text-truncate="length: 80"\n text="wrapCount: 80; align: center; width: 2.4" bind__text="value: menuSelectedChallenge.songSubName"></a-entity>\n </a-entity>\n </a-entity>\n</a-entity>\n\x3c!-- </require> --\x3e</require>\n\n \x3c!-- Beat pieces, explosions, fx, and weapon trail. --\x3e\n <a-entity id="rigContainer"></a-entity>\n\n \x3c!-- Supercut FX rings. --\x3e\n \n <a-entity class="superCutFx" mixin="superCut"></a-entity>\n \n <a-entity class="superCutFx" mixin="superCut"></a-entity>\n \n <a-entity class="superCutFx" mixin="superCut"></a-entity>\n \n <a-entity class="superCutFx" mixin="superCut"></a-entity>\n \n\n \x3c!-- Player. --\x3e\n <a-entity id="cameraRig">\n <a-entity\n id="camera"\n bind__wasd-controls="enabled: !inVr"\n position="0 1.6 0.5"\n camera="far: 10000"\n look-controls\n player-height\n wasd-controls="acceleration: 15"></a-entity>\n \x3c!-- Agent companion seated next to player. The GLB has its origin at\n the feet, so we drop it ~0.45m below camera height; rider has no\n visible floor at the player position, so the lower legs fade out\n and only the seated upper body is visible. --\x3e\n <a-entity\n id="agentCompanion"\n gltf-model="#agentGlb"\n agent-dance="initial: sitidle"\n position="0.7 0.45 0.5"\n rotation="0 165 0"\n scale="0.9 0.9 0.9"></a-entity>\n <a-entity\n id="cameraWallCollider"\n bind__raycaster__wall="enabled: isPlaying && gameMode !== \'ride\'"\n proxy-event__wallhitstart="event: raycaster-intersection; to: a-scene; as: wallhitstart"\n proxy-event__wallhitend="event: raycaster-intersection-cleared; to: a-scene; as: wallhitend"\n follow-position="target: #camera"\n raycaster__wall="objects: [data-wall-active]; interval: 150; direction: 0 -1 0; far: 5"\n visible="false"></a-entity>\n </a-entity>\n\n <a-entity\n id="controllerRig"\n proxy-event="event: recentered; to: #cameraRig; captureBubbles: true; as: recenter">\n \n\n \n <a-entity id="leftHand"\n class="weapon"\n bind__hand-swapper="enabled: rightRaycasterActive"\n bind__haptics-wall="enabled: isPlaying && gameMode === \'classic\'"\n bind__headfist="isPlaying: isPlaying"\n bind__menu-controls="enabled: mainMenuActive"\n bind__pauser="enabled: isPlaying"\n bind__punch="enabled: isPlaying && gameMode === \'punch\'"\n bind__raycaster="enabled: leftRaycasterActive"\n bind__raycaster__game="enabled: isPlaying && (gameMode === \'classic\' || gameMode === \'punch\')"\n bind__blade="enabled: isPlaying && gameMode === \'classic\'"\n bind__weapon-particles="enabled: isPlaying; gameMode: gameMode"\n bind__trail="colorScheme: colorScheme; enabled: isPlaying && gameMode === \'classic\'"\n controller="hand: left"\n desktop-input="hand: left"\n data-hand="left"\n haptics="events: mouseenter; dur: 35; force: 0.075"\n haptics__beat="events: beathaptic; dur: 90; force: 0.55"\n haptics__draw="events: drawblade; dur: 750; force: 0.025"\n haptics__plume="events: plumepulse; dur: 35; force: 0.1"\n headfist="hand: left"\n raycaster="objects: [raycastable]; far: 5; showLine: false"\n raycaster__game="objects: [raycastable-game]; far: 1; interval: 71; direction: 0 1 -1"\n weapon="hand: left"\n weapon-particles="hand: left"\n thumb-controls\n thumb-controls-debug="enabled: false; hand: left; controllerType: vive-controls"\n render-order="weapon"\n trail="color: primary; hand: left">\n <a-entity bind__position="has3DOFVR && \'0 0 -0.5\' || \'0 0 0\'">\n <a-entity\n id="leftLaser"\n class="laser"\n bind__material="color: colorPrimary"\n bind__cursor-laser="enabled: activeHand === \'left\' && !isPlaying"\n geometry="primitive: cylinder; height: 1; radius: 0.005"\n material="shader: flat; opacity: 0.25; transparent: true"\n rotation="-90 0 0"></a-entity>\n </a-entity>\n\n \x3c!-- Blade. --\x3e\n <a-entity bind__position="has3DOFVR && \'0 0 -0.5\' || \'0 0 0\'"\n bind__rotation="controllerType.indexOf(\'oculus\') !== -1 && \'135 0 0\' || \'90 0 0\'">\n <a-entity\n class="bladeContainer"\n bind__visible="isPlaying && gameMode === \'classic\'"\n animation="property: scale; from: 0 0 0; to: 1 1 1; dur: 750; easing: linear; startEvents: drawblade"\n scale="0.001 0.001 0.001">\n <a-entity\n class="blade bladeleft"\n obj-model="obj: #weaponObj"\n materials="name: leftWeapon"\n render-order="weapon"\n position="0 -0.43 0">\n <a-entity class="bladeTipHelper" position="0 -0.45 0"></a-entity>\n </a-entity>\n </a-entity>\n\n <a-entity\n class="bladeHandle"\n bind__visible="!isPlaying || gameMode === \'classic\'"\n obj-model="obj: #weaponHandleObj"\n materials="name: leftWeaponHandle">\n <a-entity class="bladeHandleHelper"></a-entity>\n </a-entity>\n </a-entity>\n\n \x3c!-- Punch. --\x3e\n <a-entity\n id="leftpunch"\n class="punch"\n render-order="weapon"\n bind__visible="isPlaying && gameMode === \'punch\'"\n bind__position="has3DOFVR && \'0 0 -0.75\' || \'0 0 0\'"\n rotation="0 0 0">\n <a-entity\n class="punchFist"\n obj-model="obj: #leftFistObj"\n materials="name: leftFist"></a-entity>\n <a-entity\n class="punchBbox"\n geometry="primitive: box; width: 0.2; height: 0.23; depth: 0.15"\n material="shader: flat; opacity: 0.5"\n position="0 0.05 0.1"\n rotation="30 0 0"\n visible="false"></a-entity>\n <a-entity\n obj-model="obj: #leftFistWeaponObj"\n materials="name: leftFistWeapon"></a-entity>\n </a-entity>\n\n \x3c!-- Ride. --\x3e\n <a-entity\n id="leftstar"\n class="handStar"\n render-order="weapon"\n bind__visible="isPlaying && gameMode === \'ride\'">\n <a-entity\n class="handStar"\n bind__material="colorPrimary: colorPrimary; colorSecondary: colorSecondary; colorTertiary: colorTertiary"\n geometry="primitive: sphere; radius: 0.1"\n material="shader: handStar"\n animation__pulse="property: components.material.material.uniforms.pulse.value; from: 2; to: 0; dur: 300; startEvents: plumepulse; easing: easeInOutQuad"\n animation__scale="property: scale; from: 2 2 2; to: 1 1 1; dur: 1200; startEvents: plumepulse; easing: easeInOutQuad"></a-entity>\n </a-entity>\n </a-entity>\n\n <a-entity\n id="leftCursorMesh"\n mixin="cursorMesh"\n bind__cursor-mesh="active: leftRaycasterActive && !isPlaying"\n bind__material="color: colorPrimary"\n cursor-mesh="cursorEl: #leftHand"\n material\n render-order="cursor"\n scale="1.3 1.3 1.3"></a-entity>\n \n \n <a-entity id="rightHand"\n class="weapon"\n bind__hand-swapper="enabled: leftRaycasterActive"\n bind__haptics-wall="enabled: isPlaying && gameMode === \'classic\'"\n bind__headfist="isPlaying: isPlaying"\n bind__menu-controls="enabled: mainMenuActive"\n bind__pauser="enabled: isPlaying"\n bind__punch="enabled: isPlaying && gameMode === \'punch\'"\n bind__raycaster="enabled: rightRaycasterActive"\n bind__raycaster__game="enabled: isPlaying && (gameMode === \'classic\' || gameMode === \'punch\')"\n bind__blade="enabled: isPlaying && gameMode === \'classic\'"\n bind__weapon-particles="enabled: isPlaying; gameMode: gameMode"\n bind__trail="colorScheme: colorScheme; enabled: isPlaying && gameMode === \'classic\'"\n controller="hand: right"\n desktop-input="hand: right"\n data-hand="right"\n haptics="events: mouseenter; dur: 35; force: 0.075"\n haptics__beat="events: beathaptic; dur: 90; force: 0.55"\n haptics__draw="events: drawblade; dur: 750; force: 0.025"\n haptics__plume="events: plumepulse; dur: 35; force: 0.1"\n headfist="hand: right"\n raycaster="objects: [raycastable]; far: 5; showLine: false"\n raycaster__game="objects: [raycastable-game]; far: 1; interval: 70; direction: 0 1 -1"\n weapon="hand: right"\n weapon-particles="hand: right"\n thumb-controls\n thumb-controls-debug="enabled: false; hand: right; controllerType: vive-controls"\n render-order="weapon"\n trail="color: secondary; hand: right">\n <a-entity bind__position="has3DOFVR && \'0 0 -0.5\' || \'0 0 0\'">\n <a-entity\n id="rightLaser"\n class="laser"\n bind__material="color: colorSecondary"\n bind__cursor-laser="enabled: activeHand === \'right\' && !isPlaying"\n geometry="primitive: cylinder; height: 1; radius: 0.005"\n material="shader: flat; opacity: 0.25; transparent: true"\n rotation="-90 0 0"></a-entity>\n </a-entity>\n\n \x3c!-- Blade. --\x3e\n <a-entity bind__position="has3DOFVR && \'0 0 -0.5\' || \'0 0 0\'"\n bind__rotation="controllerType.indexOf(\'oculus\') !== -1 && \'135 0 0\' || \'90 0 0\'">\n <a-entity\n class="bladeContainer"\n bind__visible="isPlaying && gameMode === \'classic\'"\n animation="property: scale; from: 0 0 0; to: 1 1 1; dur: 750; easing: linear; startEvents: drawblade"\n scale="0.001 0.001 0.001">\n <a-entity\n class="blade bladeright"\n obj-model="obj: #weaponObj"\n materials="name: rightWeapon"\n render-order="weapon"\n position="0 -0.43 0">\n <a-entity class="bladeTipHelper" position="0 -0.45 0"></a-entity>\n </a-entity>\n </a-entity>\n\n <a-entity\n class="bladeHandle"\n bind__visible="!isPlaying || gameMode === \'classic\'"\n obj-model="obj: #weaponHandleObj"\n materials="name: rightWeaponHandle">\n <a-entity class="bladeHandleHelper"></a-entity>\n </a-entity>\n </a-entity>\n\n \x3c!-- Punch. --\x3e\n <a-entity\n id="rightpunch"\n class="punch"\n render-order="weapon"\n bind__visible="isPlaying && gameMode === \'punch\'"\n bind__position="has3DOFVR && \'0 0 -0.75\' || \'0 0 0\'"\n rotation="0 0 0">\n <a-entity\n class="punchFist"\n obj-model="obj: #rightFistObj"\n materials="name: rightFist"></a-entity>\n <a-entity\n class="punchBbox"\n geometry="primitive: box; width: 0.2; height: 0.23; depth: 0.15"\n material="shader: flat; opacity: 0.5"\n position="0 0.05 0.1"\n rotation="30 0 0"\n visible="false"></a-entity>\n <a-entity\n obj-model="obj: #rightFistWeaponObj"\n materials="name: rightFistWeapon"></a-entity>\n </a-entity>\n\n \x3c!-- Ride. --\x3e\n <a-entity\n id="rightstar"\n class="handStar"\n render-order="weapon"\n bind__visible="isPlaying && gameMode === \'ride\'">\n <a-entity\n class="handStar"\n bind__material="colorPrimary: colorPrimary; colorSecondary: colorSecondary; colorTertiary: colorTertiary"\n geometry="primitive: sphere; radius: 0.1"\n material="shader: handStar"\n animation__pulse="property: components.material.material.uniforms.pulse.value; from: 2; to: 0; dur: 300; startEvents: plumepulse; easing: easeInOutQuad"\n animation__scale="property: scale; from: 2 2 2; to: 1 1 1; dur: 1200; startEvents: plumepulse; easing: easeInOutQuad"></a-entity>\n </a-entity>\n </a-entity>\n\n <a-entity\n id="rightCursorMesh"\n mixin="cursorMesh"\n bind__cursor-mesh="active: rightRaycasterActive && !isPlaying"\n bind__material="color: colorSecondary"\n cursor-mesh="cursorEl: #rightHand"\n material\n render-order="cursor"\n scale="1.3 1.3 1.3"></a-entity>\n \n </a-entity>\n\n <a-entity\n id="stepback"\n position="0 1.6 -1.55"\n geometry="primitive: plane; width: 0.25; height: 0.25;"\n material="shader: flat; src: #stepbackImg; transparent: true; opacity: 0"\n render-order="stepback"></a-entity>\n </a-entity>\n\n <a-entity\n id="mouseCursor"\n bind__raycaster="enabled: !inVR"\n cursor="rayOrigin: mouse"\n raycaster="objects: [raycastable]"></a-entity>\n <a-entity\n id="mouseCursorMesh"\n mixin="cursorMesh"\n cursor-mesh="cursorEl: #mouseCursor"\n bind__cursor-mesh="active: menuActive"\n render-order="cursor"></a-entity>\n\n <a-entity\n tail="target: #leftstar"\n render-order="weapon"\n bind__visible="isPlaying && gameMode === \'ride\'"></a-entity>\n <a-entity\n tail="target: #rightstar"\n render-order="weapon"\n bind__visible="isPlaying && gameMode === \'ride\'"></a-entity>\n</a-scene>\n';document.addEventListener("DOMContentLoaded",(function(){let e=document.getElementById("app");e||(e=document.createElement("div"),e.id="app",document.body.appendChild(e));e.innerHTML=r}));{const t=n(240).DiffDOM;if(e.hot.accept(),e.hot.data&&e.hot.data.oldHtml){const n=e.hot.data.oldHtml,i=new t,o=document.createElement("div");o.innerHTML=n;const a=document.createElement("div");a.innerHTML=r;const s=i.diff(o.querySelector("a-scene"),a.querySelector("a-scene"));i.apply(document.querySelector("a-scene"),s)}e.hot.dispose(e=>{e.oldHtml=r})}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function r(e,t,n){let i;return"#text"===e.nodeName?i=n.document.createTextNode(e.data):"#comment"===e.nodeName?i=n.document.createComment(e.data):("svg"===e.nodeName||t?(i=n.document.createElementNS("http://www.w3.org/2000/svg",e.nodeName),t=!0):i=n.document.createElement(e.nodeName),e.attributes&&Object.entries(e.attributes).forEach(([e,t])=>i.setAttribute(e,t)),e.childNodes&&e.childNodes.forEach(e=>i.appendChild(r(e,t,n))),n.valueDiffing&&(e.value&&(i.value=e.value),e.checked&&(i.checked=e.checked),e.selected&&(i.selected=e.selected))),i}function i(e,t){for(t=t.slice();t.length>0;){if(!e.childNodes)return!1;const n=t.splice(0,1)[0];e=e.childNodes[n]}return e}function o(e,t,n){let o,a,s,c,l,u=i(e,t[n._const.route]);const h={diff:t,node:u};if(n.preDiffApply(h))return!0;switch(t[n._const.action]){case n._const.addAttribute:if(!u||!u.setAttribute)return!1;u.setAttribute(t[n._const.name],t[n._const.value]);break;case n._const.modifyAttribute:if(!u||!u.setAttribute)return!1;u.setAttribute(t[n._const.name],t[n._const.newValue]),"INPUT"===u.nodeName&&"value"===t[n._const.name]&&(u.value=t[n._const.oldValue]);break;case n._const.removeAttribute:if(!u||!u.removeAttribute)return!1;u.removeAttribute(t[n._const.name]);break;case n._const.modifyTextElement:if(!u||3!==u.nodeType)return!1;n.textDiff(u,u.data,t[n._const.oldValue],t[n._const.newValue]);break;case n._const.modifyValue:if(!u||void 0===u.value)return!1;u.value=t[n._const.newValue];break;case n._const.modifyComment:if(!u||void 0===u.data)return!1;n.textDiff(u,u.data,t[n._const.oldValue],t[n._const.newValue]);break;case n._const.modifyChecked:if(!u||void 0===u.checked)return!1;u.checked=t[n._const.newValue];break;case n._const.modifySelected:if(!u||void 0===u.selected)return!1;u.selected=t[n._const.newValue];break;case n._const.replaceElement:u.parentNode.replaceChild(r(t[n._const.newValue],"http://www.w3.org/2000/svg"===u.namespaceURI,n),u);break;case n._const.relocateGroup:c=Array(...new Array(t.groupLength)).map(()=>u.removeChild(u.childNodes[t[n._const.from]])),c.forEach((e,r)=>{0===r&&(a=u.childNodes[t[n._const.to]]),u.insertBefore(e,a||null)});break;case n._const.removeElement:u.parentNode.removeChild(u);break;case n._const.addElement:s=t[n._const.route].slice(),l=s.splice(s.length-1,1)[0],u=i(e,s),u.insertBefore(r(t[n._const.element],"http://www.w3.org/2000/svg"===u.namespaceURI,n),u.childNodes[l]||null);break;case n._const.removeTextElement:if(!u||3!==u.nodeType)return!1;u.parentNode.removeChild(u);break;case n._const.addTextElement:if(s=t[n._const.route].slice(),l=s.splice(s.length-1,1)[0],o=n.document.createTextNode(t[n._const.value]),u=i(e,s),!u||!u.childNodes)return!1;u.insertBefore(o,u.childNodes[l]||null);break;default:console.log("unknown action")}return h.newNode=o,n.postDiffApply(h),!0}function a(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function s(e,t,n){t.length||(t=[t]),(t=t.slice()).reverse(),t.forEach(t=>{!function(e,t,n){switch(t[n._const.action]){case n._const.addAttribute:t[n._const.action]=n._const.removeAttribute,o(e,t,n);break;case n._const.modifyAttribute:a(t,n._const.oldValue,n._const.newValue),o(e,t,n);break;case n._const.removeAttribute:t[n._const.action]=n._const.addAttribute,o(e,t,n);break;case n._const.modifyTextElement:case n._const.modifyValue:case n._const.modifyComment:case n._const.modifyChecked:case n._const.modifySelected:case n._const.replaceElement:a(t,n._const.oldValue,n._const.newValue),o(e,t,n);break;case n._const.relocateGroup:a(t,n._const.from,n._const.to),o(e,t,n);break;case n._const.removeElement:t[n._const.action]=n._const.addElement,o(e,t,n);break;case n._const.addElement:t[n._const.action]=n._const.removeElement,o(e,t,n);break;case n._const.removeTextElement:t[n._const.action]=n._const.addTextElement,o(e,t,n);break;case n._const.addTextElement:t[n._const.action]=n._const.removeTextElement,o(e,t,n);break;default:console.log("unknown action")}}(e,t,n)})}n.r(t),n.d(t,"DiffDOM",(function(){return x})),n.d(t,"TraceLogger",(function(){return S}));class c{constructor(e={}){Object.entries(e).forEach(([e,t])=>this[e]=t)}toString(){return JSON.stringify(this)}setValue(e,t){return this[e]=t,this}}function l(e){const t=[];return"#text"!==e.nodeName&&"#comment"!==e.nodeName&&(t.push(e.nodeName),e.attributes&&(e.attributes.class&&t.push(`${e.nodeName}.${e.attributes.class.replace(/ /g,".")}`),e.attributes.id&&t.push(`${e.nodeName}#${e.attributes.id}`))),t}function u(e){const t={},n={};return e.forEach(e=>{l(e).forEach(e=>{const r=e in t;r||e in n?r&&(delete t[e],n[e]=!0):t[e]=!0})}),t}function h(e,t){const n=u(e),r=u(t),i={};return Object.keys(n).forEach(e=>{r[e]&&(i[e]=!0)}),i}function d(e){return delete e.outerDone,delete e.innerDone,delete e.valueDone,!e.childNodes||e.childNodes.every(d)}function p(e,t){if(!["nodeName","value","checked","selected","data"].every(n=>e[n]===t[n]))return!1;if(Boolean(e.attributes)!==Boolean(t.attributes))return!1;if(Boolean(e.childNodes)!==Boolean(t.childNodes))return!1;if(e.attributes){const n=Object.keys(e.attributes),r=Object.keys(t.attributes);if(n.length!==r.length)return!1;if(!n.every(n=>e.attributes[n]===t.attributes[n]))return!1}if(e.childNodes){if(e.childNodes.length!==t.childNodes.length)return!1;if(!e.childNodes.every((e,n)=>p(e,t.childNodes[n])))return!1}return!0}function f(e,t,n,r,i){if(!e||!t)return!1;if(e.nodeName!==t.nodeName)return!1;if("#text"===e.nodeName)return!!i||e.data===t.data;if(e.nodeName in n)return!0;if(e.attributes&&t.attributes){if(e.attributes.id){if(e.attributes.id!==t.attributes.id)return!1;if(`${e.nodeName}#${e.attributes.id}`in n)return!0}if(e.attributes.class&&e.attributes.class===t.attributes.class){if(`${e.nodeName}.${e.attributes.class.replace(/ /g,".")}`in n)return!0}}if(r)return!0;const o=e.childNodes?e.childNodes.slice().reverse():[],a=t.childNodes?t.childNodes.slice().reverse():[];if(o.length!==a.length)return!1;if(i)return o.every((e,t)=>e.nodeName===a[t].nodeName);{const e=h(o,a);return o.every((t,n)=>f(t,a[n],e,!0,!0))}}function m(e){return JSON.parse(JSON.stringify(e))}function g(e,t,n,r){let i=0,o=[];const a=e.length,s=t.length,c=Array(...new Array(a+1)).map(()=>[]),u=h(e,t);let d=a===s;d&&e.some((e,n)=>{const r=l(e),i=l(t[n]);return r.length!==i.length?(d=!1,!0):(r.some((e,t)=>{if(e!==i[t])return d=!1,!0}),!d||void 0)});for(let l=0;l<a;l++){const a=e[l];for(let e=0;e<s;e++){const s=t[e];n[l]||r[e]||!f(a,s,u,d)?c[l+1][e+1]=0:(c[l+1][e+1]=c[l][e]?c[l][e]+1:1,c[l+1][e+1]>=i&&(i=c[l+1][e+1],o=[l+1,e+1]))}}return 0!==i&&{oldValue:o[0]-i,newValue:o[1]-i,length:i}}function y(e,t){return Array(...new Array(e)).map(()=>t)}class v{constructor(){this.list=[]}add(e){this.list.push(...e)}forEach(e){this.list.forEach(t=>e(t))}}function b(e,t){let n,r,i=e;for(t=t.slice();t.length>0;){if(!i.childNodes)return!1;r=t.splice(0,1)[0],n=i,i=i.childNodes[r]}return{node:i,parentNode:n,nodeIndex:r}}function _(e,t,n){return t.forEach(t=>{!function(e,t,n){const r=b(e,t[n._const.route]);let i=r.node;const o=r.parentNode,a=r.nodeIndex,s=[],c={diff:t,node:i};if(n.preDiffApply(c))return!0;let l,u,h,d;switch(t[n._const.action]){case n._const.addAttribute:i.attributes||(i.attributes={}),i.attributes[t[n._const.name]]=t[n._const.value],"checked"===t[n._const.name]?i.checked=!0:"selected"===t[n._const.name]?i.selected=!0:"INPUT"===i.nodeName&&"value"===t[n._const.name]&&(i.value=t[n._const.value]);break;case n._const.modifyAttribute:i.attributes[t[n._const.name]]=t[n._const.newValue];break;case n._const.removeAttribute:delete i.attributes[t[n._const.name]],0===Object.keys(i.attributes).length&&delete i.attributes,"checked"===t[n._const.name]?i.checked=!1:"selected"===t[n._const.name]?delete i.selected:"INPUT"===i.nodeName&&"value"===t[n._const.name]&&delete i.value;break;case n._const.modifyTextElement:i.data=t[n._const.newValue];break;case n._const.modifyValue:i.value=t[n._const.newValue];break;case n._const.modifyComment:i.data=t[n._const.newValue];break;case n._const.modifyChecked:i.checked=t[n._const.newValue];break;case n._const.modifySelected:i.selected=t[n._const.newValue];break;case n._const.replaceElement:l=m(t[n._const.newValue]),l.outerDone=!0,l.innerDone=!0,l.valueDone=!0,o.childNodes[a]=l;break;case n._const.relocateGroup:u=i.childNodes.splice(t[n._const.from],t.groupLength).reverse(),u.forEach(e=>i.childNodes.splice(t[n._const.to],0,e)),i.subsets&&i.subsets.forEach(e=>{if(t[n._const.from]<t[n._const.to]&&e.oldValue<=t[n._const.to]&&e.oldValue>t[n._const.from]){e.oldValue-=t.groupLength;const r=e.oldValue+e.length-t[n._const.to];r>0&&(s.push({oldValue:t[n._const.to]+t.groupLength,newValue:e.newValue+e.length-r,length:r}),e.length-=r)}else if(t[n._const.from]>t[n._const.to]&&e.oldValue>t[n._const.to]&&e.oldValue<t[n._const.from]){e.oldValue+=t.groupLength;const r=e.oldValue+e.length-t[n._const.to];r>0&&(s.push({oldValue:t[n._const.to]+t.groupLength,newValue:e.newValue+e.length-r,length:r}),e.length-=r)}else e.oldValue===t[n._const.from]&&(e.oldValue=t[n._const.to])});break;case n._const.removeElement:o.childNodes.splice(a,1),o.subsets&&o.subsets.forEach(e=>{e.oldValue>a?e.oldValue-=1:e.oldValue===a?e.delete=!0:e.oldValue<a&&e.oldValue+e.length>a&&(e.oldValue+e.length-1===a?e.length--:(s.push({newValue:e.newValue+a-e.oldValue,oldValue:a,length:e.length-a+e.oldValue-1}),e.length=a-e.oldValue))}),i=o;break;case n._const.addElement:h=t[n._const.route].slice(),d=h.splice(h.length-1,1)[0],i=b(e,h).node,l=m(t[n._const.element]),l.outerDone=!0,l.innerDone=!0,l.valueDone=!0,i.childNodes||(i.childNodes=[]),d>=i.childNodes.length?i.childNodes.push(l):i.childNodes.splice(d,0,l),i.subsets&&i.subsets.forEach(e=>{if(e.oldValue>=d)e.oldValue+=1;else if(e.oldValue<d&&e.oldValue+e.length>d){const t=e.oldValue+e.length-d;s.push({newValue:e.newValue+e.length-t,oldValue:d+1,length:t}),e.length-=t}});break;case n._const.removeTextElement:o.childNodes.splice(a,1),"TEXTAREA"===o.nodeName&&delete o.value,o.subsets&&o.subsets.forEach(e=>{e.oldValue>a?e.oldValue-=1:e.oldValue===a?e.delete=!0:e.oldValue<a&&e.oldValue+e.length>a&&(e.oldValue+e.length-1===a?e.length--:(s.push({newValue:e.newValue+a-e.oldValue,oldValue:a,length:e.length-a+e.oldValue-1}),e.length=a-e.oldValue))}),i=o;break;case n._const.addTextElement:h=t[n._const.route].slice(),d=h.splice(h.length-1,1)[0],l={},l.nodeName="#text",l.data=t[n._const.value],i=b(e,h).node,i.childNodes||(i.childNodes=[]),d>=i.childNodes.length?i.childNodes.push(l):i.childNodes.splice(d,0,l),"TEXTAREA"===i.nodeName&&(i.value=t[n._const.newValue]),i.subsets&&i.subsets.forEach(e=>{if(e.oldValue>=d&&(e.oldValue+=1),e.oldValue<d&&e.oldValue+e.length>d){const t=e.oldValue+e.length-d;s.push({newValue:e.newValue+e.length-t,oldValue:d+1,length:t}),e.length-=t}});break;default:console.log("unknown action")}i.subsets&&(i.subsets=i.subsets.filter(e=>!e.delete&&e.oldValue!==e.newValue),s.length&&(i.subsets=i.subsets.concat(s))),c.newNode=l,n.postDiffApply(c)}(e,t,n)}),!0}function w(e,t){const n={};if(n.nodeName=e.nodeName,"#text"===n.nodeName||"#comment"===n.nodeName)n.data=e.data;else{if(e.attributes&&e.attributes.length>0){n.attributes={};Array.prototype.slice.call(e.attributes).forEach(e=>n.attributes[e.name]=e.value)}if("TEXTAREA"===n.nodeName)n.value=e.value;else if(e.childNodes&&e.childNodes.length>0){n.childNodes=[];Array.prototype.slice.call(e.childNodes).forEach(e=>n.childNodes.push(w(e,t)))}t.valueDiffing&&(void 0!==e.checked&&e.type&&["radio","checkbox"].includes(e.type.toLowerCase())?n.checked=e.checked:void 0!==e.value&&(n.value=e.value),void 0!==e.selected&&(n.selected=e.selected))}return n}class E{constructor(e,t,n){this.options=n,this.t1=w(e,this.options),this.t2=w(t,this.options),this.diffcount=0,this.foundAll=!1,this.debug&&(this.t1Orig=w(e,this.options),this.t2Orig=w(t,this.options)),this.tracker=new v}init(){return this.findDiffs(this.t1,this.t2)}findDiffs(e,t){let n;do{if(this.options.debug&&(this.diffcount+=1,this.diffcount>this.options.diffcap))throw window.diffError=[this.t1Orig,this.t2Orig],new Error(`surpassed diffcap:${JSON.stringify(this.t1Orig)} -> ${JSON.stringify(this.t2Orig)}`);n=this.findNextDiff(e,t,[]),0===n.length&&(p(e,t)||(this.foundAll?(console.error("Could not find remaining diffs!"),console.log({t1:e,t2:t})):(this.foundAll=!0,d(e),n=this.findNextDiff(e,t,[])))),n.length>0&&(this.foundAll=!1,this.tracker.add(n),_(e,n,this.options))}while(n.length>0);return this.tracker.list}findNextDiff(e,t,n){let r,i;if(this.options.maxDepth&&n.length>this.options.maxDepth)return[];if(!e.outerDone){if(r=this.findOuterDiff(e,t,n),this.filterOuterDiff&&(i=this.filterOuterDiff(e,t,r),i&&(r=i)),r.length>0)return e.outerDone=!0,r;e.outerDone=!0}if(!e.innerDone){if(r=this.findInnerDiff(e,t,n),r.length>0)return r;e.innerDone=!0}if(this.options.valueDiffing&&!e.valueDone){if(r=this.findValueDiff(e,t,n),r.length>0)return e.valueDone=!0,r;e.valueDone=!0}return[]}findOuterDiff(e,t,n){const r=[];let i,o,a,s,l,u;if(e.nodeName!==t.nodeName)return[(new c).setValue(this.options._const.action,this.options._const.replaceElement).setValue(this.options._const.oldValue,m(e)).setValue(this.options._const.newValue,m(t)).setValue(this.options._const.route,n)];if(n.length&&this.options.maxChildCount&&e.childNodes&&t.childNodes&&e.childNodes.length>this.options.maxChildCount&&t.childNodes.length>this.options.maxChildCount){const r=e.childNodes.length<t.childNodes.length?e.childNodes.length:t.childNodes.length;let i=0,o=0;for(;i<this.options.maxChildDiffCount&&o<r;)p(e.childNodes[o],t.childNodes[o])||i++,o++;if(i===this.options.maxChildDiffCount)return[(new c).setValue(this.options._const.action,this.options._const.replaceElement).setValue(this.options._const.oldValue,m(e)).setValue(this.options._const.newValue,m(t)).setValue(this.options._const.route,n)]}if(e.data!==t.data)return"#text"===e.nodeName?[(new c).setValue(this.options._const.action,this.options._const.modifyTextElement).setValue(this.options._const.route,n).setValue(this.options._const.oldValue,e.data).setValue(this.options._const.newValue,t.data)]:[(new c).setValue(this.options._const.action,this.options._const.modifyComment).setValue(this.options._const.route,n).setValue(this.options._const.oldValue,e.data).setValue(this.options._const.newValue,t.data)];for(o=e.attributes?Object.keys(e.attributes).sort():[],a=t.attributes?Object.keys(t.attributes).sort():[],s=o.length,u=0;u<s;u++)i=o[u],l=a.indexOf(i),-1===l?r.push((new c).setValue(this.options._const.action,this.options._const.removeAttribute).setValue(this.options._const.route,n).setValue(this.options._const.name,i).setValue(this.options._const.value,e.attributes[i])):(a.splice(l,1),e.attributes[i]!==t.attributes[i]&&r.push((new c).setValue(this.options._const.action,this.options._const.modifyAttribute).setValue(this.options._const.route,n).setValue(this.options._const.name,i).setValue(this.options._const.oldValue,e.attributes[i]).setValue(this.options._const.newValue,t.attributes[i])));for(s=a.length,u=0;u<s;u++)i=a[u],r.push((new c).setValue(this.options._const.action,this.options._const.addAttribute).setValue(this.options._const.route,n).setValue(this.options._const.name,i).setValue(this.options._const.value,t.attributes[i]));return r}findInnerDiff(e,t,n){const r=e.subsets&&e.subsetsAge--?e.subsets:e.childNodes&&t.childNodes?function(e,t){const n=e.childNodes?e.childNodes:[],r=t.childNodes?t.childNodes:[],i=y(n.length,!1),o=y(r.length,!1),a=[];let s=!0;const c=function(){return arguments[1]},l=e=>{i[s.oldValue+e]=!0,o[s.newValue+e]=!0};for(;s;)if(s=g(n,r,i,o),s){a.push(s);Array(...new Array(s.length)).map(c).forEach(e=>l(e))}return e.subsets=a,e.subsetsAge=100,a}(e,t):[],i=e.childNodes?e.childNodes:[],o=t.childNodes?t.childNodes:[];let a,s=[],l=0;if(r.length>0&&(s=this.attemptGroupRelocation(e,t,r,n),s.length>0))return s;const u=Math.max(i.length,o.length);i.length!==o.length&&(a=!0);for(let e=0;e<u;e+=1){const t=i[e],r=o[e];a&&(t&&!r?"#text"===t.nodeName?(s.push((new c).setValue(this.options._const.action,this.options._const.removeTextElement).setValue(this.options._const.route,n.concat(l)).setValue(this.options._const.value,t.data)),l-=1):(s.push((new c).setValue(this.options._const.action,this.options._const.removeElement).setValue(this.options._const.route,n.concat(l)).setValue(this.options._const.element,m(t))),l-=1):r&&!t&&("#text"===r.nodeName?s.push((new c).setValue(this.options._const.action,this.options._const.addTextElement).setValue(this.options._const.route,n.concat(l)).setValue(this.options._const.value,r.data)):s.push((new c).setValue(this.options._const.action,this.options._const.addElement).setValue(this.options._const.route,n.concat(l)).setValue(this.options._const.element,m(r))))),t&&r&&(s=s.concat(this.findNextDiff(t,r,n.concat(l)))),l+=1}return e.innerDone=!0,s}attemptGroupRelocation(e,t,n,r){const i=function(e,t,n){const r=e.childNodes?y(e.childNodes.length,!0):[],i=t.childNodes?y(t.childNodes.length,!0):[];let o=0;return n.forEach(e=>{const t=e.oldValue+e.length,n=e.newValue+e.length;for(let n=e.oldValue;n<t;n+=1)r[n]=o;for(let t=e.newValue;t<n;t+=1)i[t]=o;o+=1}),{gaps1:r,gaps2:i}}(e,t,n),o=i.gaps1,a=i.gaps2;let s,l,u,h,d,p,g=Math.min(o.length,a.length);const v=[];for(let i=0,y=0;i<g;y+=1,i+=1)if(!0===o[i])if(h=e.childNodes[y],"#text"===h.nodeName){if("#text"===t.childNodes[i].nodeName&&h.data!==t.childNodes[i].data){for(p=y;e.childNodes.length>p+1&&"#text"===e.childNodes[p+1].nodeName;)if(p+=1,t.childNodes[i].data===e.childNodes[p].data){d=!0;break}if(!d)return v.push((new c).setValue(this.options._const.action,this.options._const.modifyTextElement).setValue(this.options._const.route,r.concat(i)).setValue(this.options._const.oldValue,h.data).setValue(this.options._const.newValue,t.childNodes[i].data)),v}v.push((new c).setValue(this.options._const.action,this.options._const.removeTextElement).setValue(this.options._const.route,r.concat(i)).setValue(this.options._const.value,h.data)),o.splice(i,1),g=Math.min(o.length,a.length),i-=1}else v.push((new c).setValue(this.options._const.action,this.options._const.removeElement).setValue(this.options._const.route,r.concat(i)).setValue(this.options._const.element,m(h))),o.splice(i,1),g=Math.min(o.length,a.length),i-=1;else if(!0===a[i])h=t.childNodes[i],"#text"===h.nodeName?(v.push((new c).setValue(this.options._const.action,this.options._const.addTextElement).setValue(this.options._const.route,r.concat(i)).setValue(this.options._const.value,h.data)),o.splice(i,0,!0),g=Math.min(o.length,a.length),y-=1):(v.push((new c).setValue(this.options._const.action,this.options._const.addElement).setValue(this.options._const.route,r.concat(i)).setValue(this.options._const.element,m(h))),o.splice(i,0,!0),g=Math.min(o.length,a.length),y-=1);else if(o[i]!==a[i]){if(v.length>0)return v;if(u=n[o[i]],l=Math.min(u.newValue,e.childNodes.length-u.length),l!==u.oldValue){s=!1;for(let t=0;t<u.length;t+=1)f(e.childNodes[l+t],e.childNodes[u.oldValue+t],[],!1,!0)||(s=!0);if(s)return[(new c).setValue(this.options._const.action,this.options._const.relocateGroup).setValue("groupLength",u.length).setValue(this.options._const.from,u.oldValue).setValue(this.options._const.to,l).setValue(this.options._const.route,r)]}}return v}findValueDiff(e,t,n){const r=[];return e.selected!==t.selected&&r.push((new c).setValue(this.options._const.action,this.options._const.modifySelected).setValue(this.options._const.oldValue,e.selected).setValue(this.options._const.newValue,t.selected).setValue(this.options._const.route,n)),(e.value||t.value)&&e.value!==t.value&&"OPTION"!==e.nodeName&&r.push((new c).setValue(this.options._const.action,this.options._const.modifyValue).setValue(this.options._const.oldValue,e.value||"").setValue(this.options._const.newValue,t.value||"").setValue(this.options._const.route,n)),e.checked!==t.checked&&r.push((new c).setValue(this.options._const.action,this.options._const.modifyChecked).setValue(this.options._const.oldValue,e.checked).setValue(this.options._const.newValue,t.checked).setValue(this.options._const.route,n)),r}}const A={debug:!1,diffcap:10,maxDepth:!1,maxChildCount:50,maxChildDiffCount:3,valueDiffing:!0,textDiff(e,t,n,r){e.data=r},preVirtualDiffApply(){},postVirtualDiffApply(){},preDiffApply(){},postDiffApply(){},filterOuterDiff:null,compress:!1,_const:!1,document:!(!window||!window.document)&&window.document};class x{constructor(e={}){if(this.options=e,Object.entries(A).forEach(([e,t])=>{Object.prototype.hasOwnProperty.call(this.options,e)||(this.options[e]=t)}),!this.options._const){const e=["addAttribute","modifyAttribute","removeAttribute","modifyTextElement","relocateGroup","removeElement","addElement","removeTextElement","addTextElement","replaceElement","modifyValue","modifyChecked","modifySelected","modifyComment","action","route","oldValue","newValue","element","group","from","to","name","value","data","attributes","nodeName","childNodes","checked","selected"];this.options._const={},this.options.compress?e.forEach((e,t)=>this.options._const[e]=t):e.forEach(e=>this.options._const[e]=e)}this.DiffFinder=E}apply(e,t){return function(e,t,n){return t.every(t=>o(e,t,n))}(e,t,this.options)}undo(e,t){return s(e,t,this.options)}diff(e,t){return new this.DiffFinder(e,t,this.options).init()}}class S{constructor(e={}){this.pad="│ ",this.padding="",this.tick=1,this.messages=[];const t=(e,t)=>{const n=e[t];e[t]=(...r)=>{this.fin(t,Array.prototype.slice.call(r));const i=n.apply(e,r);return this.fout(t,i),i}};for(let n in e)"function"==typeof e[n]&&t(e,n);this.log("┌ TRACELOG START")}fin(e,t){this.padding+=this.pad,this.log("├─> entering "+e,t)}fout(e,t){this.log("│<──┘ generated return value",t),this.padding=this.padding.substring(0,this.padding.length-this.pad.length)}format(e,t){return`${function(e){for(e=""+e;e.length<4;)e="0"+e;return e}(t)}> ${this.padding}${e}`}log(){let e=Array.prototype.slice.call(arguments);const t=function(e){return e?"string"==typeof e?e:e instanceof HTMLElement?e.outerHTML||"<empty>":e instanceof Array?`[${e.map(t).join(",")}]`:e.toString()||e.valueOf()||"<unknown>":"<falsey>"};e=e.map(t).join(", "),this.messages.push(this.format(e,this.tick++))}toString(){let e="└───";for(;e.length<=this.padding.length+this.pad.length;)e+="× ";let t=this.padding;return this.padding="",e=this.format(e,this.tick),this.padding=t,`${this.messages.join("\n")}\n${e}`}}},function(e,t,n){"use strict";n.r(t);var r=THREE.ExtrudeGeometry;class i extends r{constructor(e,t={}){const n=t.font;if(void 0===n)super();else{const r=n.generateShapes(e,t.size);t.depth=void 0!==t.height?t.height:50,void 0===t.bevelThickness&&(t.bevelThickness=10),void 0===t.bevelSize&&(t.bevelSize=8),void 0===t.bevelEnabled&&(t.bevelEnabled=!1),super(r,t)}this.type="TextGeometry"}}function o(){}void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}),void 0===Math.sign&&(Math.sign=function(e){return e<0?-1:e>0?1:+e}),"name"in Function.prototype==!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t}),Object.assign(o.prototype,{addEventListener:function(e,t){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)},hasEventListener:function(e,t){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)},removeEventListener:function(e,t){if(void 0!==this._listeners){var n=this._listeners[e];if(void 0!==n){var r=n.indexOf(t);-1!==r&&n.splice(r,1)}}},dispatchEvent:function(e){if(void 0!==this._listeners){var t=this._listeners[e.type];if(void 0!==t){e.target=this;for(var n=t.slice(0),r=0,i=n.length;r<i;r++)n[r].call(this,e)}}}});var a,s,c,l,u,h,d,p,f,m={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var e=[],t=0;t<256;t++)e[t]=(t<16?"0":"")+t.toString(16).toUpperCase();return function(){var t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return e[255&t]+e[t>>8&255]+e[t>>16&255]+e[t>>24&255]+"-"+e[255&n]+e[n>>8&255]+"-"+e[n>>16&15|64]+e[n>>24&255]+"-"+e[63&r|128]+e[r>>8&255]+"-"+e[r>>16&255]+e[r>>24&255]+e[255&i]+e[i>>8&255]+e[i>>16&255]+e[i>>24&255]}}(),clamp:function(e,t,n){return Math.max(t,Math.min(n,e))},euclideanModulo:function(e,t){return(e%t+t)%t},mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},lerp:function(e,t,n){return(1-n)*e+n*t},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},degToRad:function(e){return e*m.DEG2RAD},radToDeg:function(e){return e*m.RAD2DEG},isPowerOfTwo:function(e){return 0==(e&e-1)&&0!==e},ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}};function g(e,t){this.x=e||0,this.y=t||0}function y(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function v(e,t,n,r){this._x=e||0,this._y=t||0,this._z=n||0,this._w=void 0!==r?r:1}function b(e,t,n){this.x=e||0,this.y=t||0,this.z=n||0}function _(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}Object.defineProperties(g.prototype,{width:{get:function(){return this.x},set:function(e){this.x=e}},height:{get:function(){return this.y},set:function(e){this.y=e}}}),Object.assign(g.prototype,{isVector2:!0,set:function(e,t){return this.x=e,this.y=t,this},setScalar:function(e){return this.x=e,this.y=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(e){return this.x=e.x,this.y=e.y,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)},addScalar:function(e){return this.x+=e,this.y+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)},subScalar:function(e){return this.x-=e,this.y-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this},multiply:function(e){return this.x*=e.x,this.y*=e.y,this},multiplyScalar:function(e){return this.x*=e,this.y*=e,this},divide:function(e){return this.x/=e.x,this.y/=e.y,this},divideScalar:function(e){return this.multiplyScalar(1/e)},applyMatrix3:function(e){var t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this},clampScalar:(a=new g,s=new g,function(e,t){return a.set(e,e),s.set(t,t),this.clamp(a,s)}),clampLength:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this},negate:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(e){return this.x*e.x+this.y*e.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var e=Math.atan2(this.y,this.x);return e<0&&(e+=2*Math.PI),e},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},manhattanDistanceTo:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this},lerpVectors:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},equals:function(e){return e.x===this.x&&e.y===this.y},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e},fromBufferAttribute:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this},rotateAround:function(e,t){var n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,o=this.y-e.y;return this.x=i*n-o*r+e.x,this.y=i*r+o*n+e.y,this}}),Object.assign(y.prototype,{isMatrix4:!0,set:function(e,t,n,r,i,o,a,s,c,l,u,h,d,p,f,m){var g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=o,g[9]=a,g[13]=s,g[2]=c,g[6]=l,g[10]=u,g[14]=h,g[3]=d,g[7]=p,g[11]=f,g[15]=m,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return(new y).fromArray(this.elements)},copy:function(e){var t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this},copyPosition:function(e){var t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this},extractBasis:function(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this},extractRotation:(p=new b,function(e){var t=this.elements,n=e.elements,r=1/p.setFromMatrixColumn(e,0).length(),i=1/p.setFromMatrixColumn(e,1).length(),o=1/p.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[8]=n[8]*o,t[9]=n[9]*o,t[10]=n[10]*o,this}),makeRotationFromEuler:function(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var t=this.elements,n=e.x,r=e.y,i=e.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),c=Math.sin(r),l=Math.cos(i),u=Math.sin(i);if("XYZ"===e.order){var h=o*l,d=o*u,p=a*l,f=a*u;t[0]=s*l,t[4]=-s*u,t[8]=c,t[1]=d+p*c,t[5]=h-f*c,t[9]=-a*s,t[2]=f-h*c,t[6]=p+d*c,t[10]=o*s}else if("YXZ"===e.order){var m=s*l,g=s*u,y=c*l,v=c*u;t[0]=m+v*a,t[4]=y*a-g,t[8]=o*c,t[1]=o*u,t[5]=o*l,t[9]=-a,t[2]=g*a-y,t[6]=v+m*a,t[10]=o*s}else if("ZXY"===e.order){m=s*l,g=s*u,y=c*l,v=c*u;t[0]=m-v*a,t[4]=-o*u,t[8]=y+g*a,t[1]=g+y*a,t[5]=o*l,t[9]=v-m*a,t[2]=-o*c,t[6]=a,t[10]=o*s}else if("ZYX"===e.order){h=o*l,d=o*u,p=a*l,f=a*u;t[0]=s*l,t[4]=p*c-d,t[8]=h*c+f,t[1]=s*u,t[5]=f*c+h,t[9]=d*c-p,t[2]=-c,t[6]=a*s,t[10]=o*s}else if("YZX"===e.order){var b=o*s,_=o*c,w=a*s,E=a*c;t[0]=s*l,t[4]=E-b*u,t[8]=w*u+_,t[1]=u,t[5]=o*l,t[9]=-a*l,t[2]=-c*l,t[6]=_*u+w,t[10]=b-E*u}else if("XZY"===e.order){b=o*s,_=o*c,w=a*s,E=a*c;t[0]=s*l,t[4]=-u,t[8]=c*l,t[1]=b*u+E,t[5]=o*l,t[9]=_*u-w,t[2]=w*u-_,t[6]=a*l,t[10]=E*u+b}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},makeRotationFromQuaternion:function(e){var t=this.elements,n=e._x,r=e._y,i=e._z,o=e._w,a=n+n,s=r+r,c=i+i,l=n*a,u=n*s,h=n*c,d=r*s,p=r*c,f=i*c,m=o*a,g=o*s,y=o*c;return t[0]=1-(d+f),t[4]=u-y,t[8]=h+g,t[1]=u+y,t[5]=1-(l+f),t[9]=p-m,t[2]=h-g,t[6]=p+m,t[10]=1-(l+d),t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},lookAt:(u=new b,h=new b,d=new b,function(e,t,n){var r=this.elements;return d.subVectors(e,t),0===d.lengthSq()&&(d.z=1),d.normalize(),u.crossVectors(n,d),0===u.lengthSq()&&(1===Math.abs(n.z)?d.x+=1e-4:d.z+=1e-4,d.normalize(),u.crossVectors(n,d)),u.normalize(),h.crossVectors(d,u),r[0]=u.x,r[4]=h.x,r[8]=d.x,r[1]=u.y,r[5]=h.y,r[9]=d.y,r[2]=u.z,r[6]=h.z,r[10]=d.z,this}),multiply:function(e,t){return void 0!==t?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)},premultiply:function(e){return this.multiplyMatrices(e,this)},multiplyMatrices:function(e,t){var n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[4],s=n[8],c=n[12],l=n[1],u=n[5],h=n[9],d=n[13],p=n[2],f=n[6],m=n[10],g=n[14],y=n[3],v=n[7],b=n[11],_=n[15],w=r[0],E=r[4],A=r[8],x=r[12],S=r[1],T=r[5],M=r[9],R=r[13],C=r[2],k=r[6],I=r[10],P=r[14],O=r[3],N=r[7],D=r[11],L=r[15];return i[0]=o*w+a*S+s*C+c*O,i[4]=o*E+a*T+s*k+c*N,i[8]=o*A+a*M+s*I+c*D,i[12]=o*x+a*R+s*P+c*L,i[1]=l*w+u*S+h*C+d*O,i[5]=l*E+u*T+h*k+d*N,i[9]=l*A+u*M+h*I+d*D,i[13]=l*x+u*R+h*P+d*L,i[2]=p*w+f*S+m*C+g*O,i[6]=p*E+f*T+m*k+g*N,i[10]=p*A+f*M+m*I+g*D,i[14]=p*x+f*R+m*P+g*L,i[3]=y*w+v*S+b*C+_*O,i[7]=y*E+v*T+b*k+_*N,i[11]=y*A+v*M+b*I+_*D,i[15]=y*x+v*R+b*P+_*L,this},multiplyScalar:function(e){var t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this},applyToBufferAttribute:function(){var e=new b;return function(t){for(var n=0,r=t.count;n<r;n++)e.x=t.getX(n),e.y=t.getY(n),e.z=t.getZ(n),e.applyMatrix4(this),t.setXYZ(n,e.x,e.y,e.z);return t}}(),determinant:function(){var e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],o=e[1],a=e[5],s=e[9],c=e[13],l=e[2],u=e[6],h=e[10],d=e[14];return e[3]*(+i*s*u-r*c*u-i*a*h+n*c*h+r*a*d-n*s*d)+e[7]*(+t*s*d-t*c*h+i*o*h-r*o*d+r*c*l-i*s*l)+e[11]*(+t*c*u-t*a*d-i*o*u+n*o*d+i*a*l-n*c*l)+e[15]*(-r*a*l-t*s*u+t*a*h+r*o*u-n*o*h+n*s*l)},transpose:function(){var e,t=this.elements;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this},setPosition:function(e){var t=this.elements;return t[12]=e.x,t[13]=e.y,t[14]=e.z,this},getInverse:function(e,t){var n=this.elements,r=e.elements,i=r[0],o=r[1],a=r[2],s=r[3],c=r[4],l=r[5],u=r[6],h=r[7],d=r[8],p=r[9],f=r[10],m=r[11],g=r[12],y=r[13],v=r[14],b=r[15],_=p*v*h-y*f*h+y*u*m-l*v*m-p*u*b+l*f*b,w=g*f*h-d*v*h-g*u*m+c*v*m+d*u*b-c*f*b,E=d*y*h-g*p*h+g*l*m-c*y*m-d*l*b+c*p*b,A=g*p*u-d*y*u-g*l*f+c*y*f+d*l*v-c*p*v,x=i*_+o*w+a*E+s*A;if(0===x){var S="THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0";if(!0===t)throw new Error(S);return console.warn(S),this.identity()}var T=1/x;return n[0]=_*T,n[1]=(y*f*s-p*v*s-y*a*m+o*v*m+p*a*b-o*f*b)*T,n[2]=(l*v*s-y*u*s+y*a*h-o*v*h-l*a*b+o*u*b)*T,n[3]=(p*u*s-l*f*s-p*a*h+o*f*h+l*a*m-o*u*m)*T,n[4]=w*T,n[5]=(d*v*s-g*f*s+g*a*m-i*v*m-d*a*b+i*f*b)*T,n[6]=(g*u*s-c*v*s-g*a*h+i*v*h+c*a*b-i*u*b)*T,n[7]=(c*f*s-d*u*s+d*a*h-i*f*h-c*a*m+i*u*m)*T,n[8]=E*T,n[9]=(g*p*s-d*y*s-g*o*m+i*y*m+d*o*b-i*p*b)*T,n[10]=(c*y*s-g*l*s+g*o*h-i*y*h-c*o*b+i*l*b)*T,n[11]=(d*l*s-c*p*s-d*o*h+i*p*h+c*o*m-i*l*m)*T,n[12]=A*T,n[13]=(d*y*a-g*p*a+g*o*f-i*y*f-d*o*v+i*p*v)*T,n[14]=(g*l*a-c*y*a-g*o*u+i*y*u+c*o*v-i*l*v)*T,n[15]=(c*p*a-d*l*a+d*o*u-i*p*u-c*o*f+i*l*f)*T,this},scale:function(e){var t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this},getMaxScaleOnAxis:function(){var e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))},makeTranslation:function(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this},makeRotationX:function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this},makeRotationY:function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this},makeRotationZ:function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(e,t){var n=Math.cos(t),r=Math.sin(t),i=1-n,o=e.x,a=e.y,s=e.z,c=i*o,l=i*a;return this.set(c*o+n,c*a-r*s,c*s+r*a,0,c*a+r*s,l*a+n,l*s-r*o,0,c*s-r*a,l*s+r*o,i*s*s+n,0,0,0,0,1),this},makeScale:function(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(e,t,n){return this.set(1,t,n,0,e,1,n,0,e,t,1,0,0,0,0,1),this},compose:function(e,t,n){return this.makeRotationFromQuaternion(t),this.scale(n),this.setPosition(e),this},decompose:(c=new b,l=new y,function(e,t,n){var r=this.elements,i=c.set(r[0],r[1],r[2]).length(),o=c.set(r[4],r[5],r[6]).length(),a=c.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],l.copy(this);var s=1/i,u=1/o,h=1/a;return l.elements[0]*=s,l.elements[1]*=s,l.elements[2]*=s,l.elements[4]*=u,l.elements[5]*=u,l.elements[6]*=u,l.elements[8]*=h,l.elements[9]*=h,l.elements[10]*=h,t.setFromRotationMatrix(l),n.x=i,n.y=o,n.z=a,this}),makePerspective:function(e,t,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var a=this.elements,s=2*i/(t-e),c=2*i/(n-r),l=(t+e)/(t-e),u=(n+r)/(n-r),h=-(o+i)/(o-i),d=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=l,a[12]=0,a[1]=0,a[5]=c,a[9]=u,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=d,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makeOrthographic:function(e,t,n,r,i,o){var a=this.elements,s=1/(t-e),c=1/(n-r),l=1/(o-i),u=(t+e)*s,h=(n+r)*c,d=(o+i)*l;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-u,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*l,a[14]=-d,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(e){for(var t=this.elements,n=e.elements,r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0},fromArray:function(e,t){void 0===t&&(t=0);for(var n=0;n<16;n++)this.elements[n]=e[n+t];return this},toArray:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}),Object.assign(v,{slerp:function(e,t,n,r){return n.copy(e).slerp(t,r)},slerpFlat:function(e,t,n,r,i,o,a){var s=n[r+0],c=n[r+1],l=n[r+2],u=n[r+3],h=i[o+0],d=i[o+1],p=i[o+2],f=i[o+3];if(u!==f||s!==h||c!==d||l!==p){var m=1-a,g=s*h+c*d+l*p+u*f,y=g>=0?1:-1,v=1-g*g;if(v>Number.EPSILON){var b=Math.sqrt(v),_=Math.atan2(b,g*y);m=Math.sin(m*_)/b,a=Math.sin(a*_)/b}var w=a*y;if(s=s*m+h*w,c=c*m+d*w,l=l*m+p*w,u=u*m+f*w,m===1-a){var E=1/Math.sqrt(s*s+c*c+l*l+u*u);s*=E,c*=E,l*=E,u*=E}}e[t]=s,e[t+1]=c,e[t+2]=l,e[t+3]=u}}),Object.defineProperties(v.prototype,{x:{get:function(){return this._x},set:function(e){this._x=e,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(e){this._y=e,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(e){this._z=e,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(e){this._w=e,this.onChangeCallback()}}}),Object.assign(v.prototype,{set:function(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this.onChangeCallback(),this},setFromEuler:function(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=e._x,r=e._y,i=e._z,o=e.order,a=Math.cos,s=Math.sin,c=a(n/2),l=a(r/2),u=a(i/2),h=s(n/2),d=s(r/2),p=s(i/2);return"XYZ"===o?(this._x=h*l*u+c*d*p,this._y=c*d*u-h*l*p,this._z=c*l*p+h*d*u,this._w=c*l*u-h*d*p):"YXZ"===o?(this._x=h*l*u+c*d*p,this._y=c*d*u-h*l*p,this._z=c*l*p-h*d*u,this._w=c*l*u+h*d*p):"ZXY"===o?(this._x=h*l*u-c*d*p,this._y=c*d*u+h*l*p,this._z=c*l*p+h*d*u,this._w=c*l*u-h*d*p):"ZYX"===o?(this._x=h*l*u-c*d*p,this._y=c*d*u+h*l*p,this._z=c*l*p-h*d*u,this._w=c*l*u+h*d*p):"YZX"===o?(this._x=h*l*u+c*d*p,this._y=c*d*u+h*l*p,this._z=c*l*p-h*d*u,this._w=c*l*u-h*d*p):"XZY"===o&&(this._x=h*l*u-c*d*p,this._y=c*d*u-h*l*p,this._z=c*l*p+h*d*u,this._w=c*l*u+h*d*p),!1!==t&&this.onChangeCallback(),this},setFromAxisAngle:function(e,t){var n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this.onChangeCallback(),this},setFromRotationMatrix:function(e){var t,n=e.elements,r=n[0],i=n[4],o=n[8],a=n[1],s=n[5],c=n[9],l=n[2],u=n[6],h=n[10],d=r+s+h;return d>0?(t=.5/Math.sqrt(d+1),this._w=.25/t,this._x=(u-c)*t,this._y=(o-l)*t,this._z=(a-i)*t):r>s&&r>h?(t=2*Math.sqrt(1+r-s-h),this._w=(u-c)/t,this._x=.25*t,this._y=(i+a)/t,this._z=(o+l)/t):s>h?(t=2*Math.sqrt(1+s-r-h),this._w=(o-l)/t,this._x=(i+a)/t,this._y=.25*t,this._z=(c+u)/t):(t=2*Math.sqrt(1+h-r-s),this._w=(a-i)/t,this._x=(o+l)/t,this._y=(c+u)/t,this._z=.25*t),this.onChangeCallback(),this},setFromUnitVectors:function(){var e,t=new b;return function(n,r){return void 0===t&&(t=new b),(e=n.dot(r)+1)<1e-6?(e=0,Math.abs(n.x)>Math.abs(n.z)?t.set(-n.y,n.x,0):t.set(0,-n.z,n.y)):t.crossVectors(n,r),this._x=t.x,this._y=t.y,this._z=t.z,this._w=e,this.normalize()}}(),inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this.onChangeCallback(),this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)},premultiply:function(e){return this.multiplyQuaternions(e,this)},multiplyQuaternions:function(e,t){var n=e._x,r=e._y,i=e._z,o=e._w,a=t._x,s=t._y,c=t._z,l=t._w;return this._x=n*l+o*a+r*c-i*s,this._y=r*l+o*s+i*a-n*c,this._z=i*l+o*c+n*s-r*a,this._w=o*l-n*a-r*s-i*c,this.onChangeCallback(),this},slerp:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var n=this._x,r=this._y,i=this._z,o=this._w,a=o*e._w+n*e._x+r*e._y+i*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;var s=Math.sqrt(1-a*a);if(Math.abs(s)<.001)return this._w=.5*(o+this._w),this._x=.5*(n+this._x),this._y=.5*(r+this._y),this._z=.5*(i+this._z),this;var c=Math.atan2(s,a),l=Math.sin((1-t)*c)/s,u=Math.sin(t*c)/s;return this._w=o*l+this._w*u,this._x=n*l+this._x*u,this._y=r*l+this._y*u,this._z=i*l+this._z*u,this.onChangeCallback(),this},equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w},fromArray:function(e,t){return void 0===t&&(t=0),this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this.onChangeCallback(),this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e},onChange:function(e){return this.onChangeCallback=e,this},onChangeCallback:function(){}}),Object.assign(b.prototype,{isVector3:!0,set:function(e,t,n){return this.x=e,this.y=t,this.z=n,this},setScalar:function(e){return this.x=e,this.y=e,this.z=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)},multiplyScalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this},multiplyVectors:function(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this},applyEuler:(f=new v,function(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(f.setFromEuler(e))}),applyAxisAngle:function(){var e=new v;return function(t,n){return this.applyQuaternion(e.setFromAxisAngle(t,n))}}(),applyMatrix3:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this},applyMatrix4:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements,o=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*o,this},applyQuaternion:function(e){var t=this.x,n=this.y,r=this.z,i=e.x,o=e.y,a=e.z,s=e.w,c=s*t+o*r-a*n,l=s*n+a*t-i*r,u=s*r+i*n-o*t,h=-i*t-o*n-a*r;return this.x=c*s+h*-i+l*-a-u*-o,this.y=l*s+h*-o+u*-i-c*-a,this.z=u*s+h*-a+c*-o-l*-i,this},project:function(){var e=new y;return function(t){return e.multiplyMatrices(t.projectionMatrix,e.getInverse(t.matrixWorld)),this.applyMatrix4(e)}}(),unproject:function(){var e=new y;return function(t){return e.multiplyMatrices(t.matrixWorld,e.getInverse(t.projectionMatrix)),this.applyMatrix4(e)}}(),transformDirection:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()},divide:function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this},divideScalar:function(e){return this.multiplyScalar(1/e)},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this},clampScalar:function(){var e=new b,t=new b;return function(n,r){return e.set(n,n,n),t.set(r,r,r),this.clamp(e,t)}}(),clampLength:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this},lerpVectors:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},cross:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)},crossVectors:function(e,t){var n=e.x,r=e.y,i=e.z,o=t.x,a=t.y,s=t.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this},projectOnVector:function(e){var t=e.dot(this)/e.lengthSq();return this.copy(e).multiplyScalar(t)},projectOnPlane:function(){var e=new b;return function(t){return e.copy(this).projectOnVector(t),this.sub(e)}}(),reflect:function(){var e=new b;return function(t){return this.sub(e.copy(t).multiplyScalar(2*this.dot(t)))}}(),angleTo:function(e){var t=this.dot(e)/Math.sqrt(this.lengthSq()*e.lengthSq());return Math.acos(m.clamp(t,-1,1))},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r},manhattanDistanceTo:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)},setFromSpherical:function(e){var t=Math.sin(e.phi)*e.radius;return this.x=t*Math.sin(e.theta),this.y=Math.cos(e.phi)*e.radius,this.z=t*Math.cos(e.theta),this},setFromCylindrical:function(e){return this.x=e.radius*Math.sin(e.theta),this.y=e.y,this.z=e.radius*Math.cos(e.theta),this},setFromMatrixPosition:function(e){var t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this},setFromMatrixScale:function(e){var t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this},setFromMatrixColumn:function(e,t){return this.fromArray(e.elements,4*t)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e},fromBufferAttribute:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}}),Object.assign(_.prototype,{isMatrix3:!0,set:function(e,t,n,r,i,o,a,s,c){var l=this.elements;return l[0]=e,l[1]=r,l[2]=a,l[3]=t,l[4]=i,l[5]=s,l[6]=n,l[7]=o,l[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(e){var t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this},setFromMatrix4:function(e){var t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this},applyToBufferAttribute:function(){var e=new b;return function(t){for(var n=0,r=t.count;n<r;n++)e.x=t.getX(n),e.y=t.getY(n),e.z=t.getZ(n),e.applyMatrix3(this),t.setXYZ(n,e.x,e.y,e.z);return t}}(),multiply:function(e){return this.multiplyMatrices(this,e)},premultiply:function(e){return this.multiplyMatrices(e,this)},multiplyMatrices:function(e,t){var n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[3],s=n[6],c=n[1],l=n[4],u=n[7],h=n[2],d=n[5],p=n[8],f=r[0],m=r[3],g=r[6],y=r[1],v=r[4],b=r[7],_=r[2],w=r[5],E=r[8];return i[0]=o*f+a*y+s*_,i[3]=o*m+a*v+s*w,i[6]=o*g+a*b+s*E,i[1]=c*f+l*y+u*_,i[4]=c*m+l*v+u*w,i[7]=c*g+l*b+u*E,i[2]=h*f+d*y+p*_,i[5]=h*m+d*v+p*w,i[8]=h*g+d*b+p*E,this},multiplyScalar:function(e){var t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this},determinant:function(){var e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],c=e[7],l=e[8];return t*o*l-t*a*c-n*i*l+n*a*s+r*i*c-r*o*s},getInverse:function(e,t){e&&e.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var n=e.elements,r=this.elements,i=n[0],o=n[1],a=n[2],s=n[3],c=n[4],l=n[5],u=n[6],h=n[7],d=n[8],p=d*c-l*h,f=l*u-d*s,m=h*s-c*u,g=i*p+o*f+a*m;if(0===g){var y="THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0";if(!0===t)throw new Error(y);return console.warn(y),this.identity()}var v=1/g;return r[0]=p*v,r[1]=(a*h-d*o)*v,r[2]=(l*o-a*c)*v,r[3]=f*v,r[4]=(d*i-a*u)*v,r[5]=(a*s-l*i)*v,r[6]=m*v,r[7]=(o*u-h*i)*v,r[8]=(c*i-o*s)*v,this},transpose:function(){var e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this},getNormalMatrix:function(e){return this.setFromMatrix4(e).getInverse(this).transpose()},transposeIntoArray:function(e){var t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this},setUvTransform:function(e,t,n,r,i,o,a){var s=Math.cos(i),c=Math.sin(i);this.set(n*s,n*c,-n*(s*o+c*a)+o+e,-r*c,r*s,-r*(-c*o+s*a)+a+t,0,0,1)},scale:function(e,t){var n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=t,n[4]*=t,n[7]*=t,this},rotate:function(e){var t=Math.cos(e),n=Math.sin(e),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],c=r[4],l=r[7];return r[0]=t*i+n*s,r[3]=t*o+n*c,r[6]=t*a+n*l,r[1]=-n*i+t*s,r[4]=-n*o+t*c,r[7]=-n*a+t*l,this},translate:function(e,t){var n=this.elements;return n[0]+=e*n[2],n[3]+=e*n[5],n[6]+=e*n[8],n[1]+=t*n[2],n[4]+=t*n[5],n[7]+=t*n[8],this},equals:function(e){for(var t=this.elements,n=e.elements,r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0},fromArray:function(e,t){void 0===t&&(t=0);for(var n=0;n<9;n++)this.elements[n]=e[n+t];return this},toArray:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}});var w=0;function E(e,t,n,r,i,o,a,s,c,l){Object.defineProperty(this,"id",{value:w++}),this.uuid=m.generateUUID(),this.name="",this.image=void 0!==e?e:E.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==t?t:E.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:1001,this.wrapT=void 0!==r?r:1001,this.magFilter=void 0!==i?i:1006,this.minFilter=void 0!==o?o:1008,this.anisotropy=void 0!==c?c:1,this.format=void 0!==a?a:1023,this.type=void 0!==s?s:1009,this.offset=new g(0,0),this.repeat=new g(1,1),this.center=new g(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new _,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==l?l:3e3,this.version=0,this.onUpdate=null}function A(e,t,n,r){this.x=e||0,this.y=t||0,this.z=n||0,this.w=void 0!==r?r:1}function x(e,t,n){this.uuid=m.generateUUID(),this.width=e,this.height=t,this.scissor=new A(0,0,e,t),this.scissorTest=!1,this.viewport=new A(0,0,e,t),void 0===(n=n||{}).minFilter&&(n.minFilter=1006),this.texture=new E(void 0,void 0,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0===n.stencilBuffer||n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}function S(e,t,n){x.call(this,e,t,n),this.activeCubeFace=0,this.activeMipMapLevel=0}function T(e,t,n,r,i,o,a,s,c,l,u,h){E.call(this,null,o,a,s,c,l,r,i,u,h),this.image={data:e,width:t,height:n},this.magFilter=void 0!==c?c:1003,this.minFilter=void 0!==l?l:1003,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function M(e,t,n,r,i,o,a,s,c,l){e=void 0!==e?e:[],t=void 0!==t?t:301,E.call(this,e,t,n,r,i,o,a,s,c,l),this.flipY=!1}E.DEFAULT_IMAGE=void 0,E.DEFAULT_MAPPING=300,E.prototype=Object.assign(Object.create(o.prototype),{constructor:E,isTexture:!0,clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.name=e.name,this.image=e.image,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this},toJSON:function(e){var t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var r=this.image;void 0===r.uuid&&(r.uuid=m.generateUUID()),t||void 0!==e.images[r.uuid]||(e.images[r.uuid]={uuid:r.uuid,url:function(e){var t;if(e instanceof HTMLCanvasElement)t=e;else{(t=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")).width=e.width,t.height=e.height;var n=t.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height)}return t.width>2048||t.height>2048?t.toDataURL("image/jpeg",.6):t.toDataURL("image/png")}(r)}),n.image=r.uuid}return t||(e.textures[this.uuid]=n),n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(e){if(300===this.mapping){if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case 1e3:e.x=e.x-Math.floor(e.x);break;case 1001:e.x=e.x<0?0:1;break;case 1002:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case 1e3:e.y=e.y-Math.floor(e.y);break;case 1001:e.y=e.y<0?0:1;break;case 1002:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}this.flipY&&(e.y=1-e.y)}}}),Object.defineProperty(E.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(A.prototype,{isVector4:!0,set:function(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this},setScalar:function(e){return this.x=e,this.y=e,this.z=e,this.w=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setW:function(e){return this.w=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this},multiplyScalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},applyMatrix4:function(e){var t=this.x,n=this.y,r=this.z,i=this.w,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*t+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*t+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*t+o[7]*n+o[11]*r+o[15]*i,this},divideScalar:function(e){return this.multiplyScalar(1/e)},setAxisAngleFromQuaternion:function(e){this.w=2*Math.acos(e.w);var t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this},setAxisAngleFromRotationMatrix:function(e){var t,n,r,i,o=e.elements,a=o[0],s=o[4],c=o[8],l=o[1],u=o[5],h=o[9],d=o[2],p=o[6],f=o[10];if(Math.abs(s-l)<.01&&Math.abs(c-d)<.01&&Math.abs(h-p)<.01){if(Math.abs(s+l)<.1&&Math.abs(c+d)<.1&&Math.abs(h+p)<.1&&Math.abs(a+u+f-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;var m=(a+1)/2,g=(u+1)/2,y=(f+1)/2,v=(s+l)/4,b=(c+d)/4,_=(h+p)/4;return m>g&&m>y?m<.01?(n=0,r=.707106781,i=.707106781):(r=v/(n=Math.sqrt(m)),i=b/n):g>y?g<.01?(n=.707106781,r=0,i=.707106781):(n=v/(r=Math.sqrt(g)),i=_/r):y<.01?(n=.707106781,r=.707106781,i=0):(n=b/(i=Math.sqrt(y)),r=_/i),this.set(n,r,i,t),this}var w=Math.sqrt((p-h)*(p-h)+(c-d)*(c-d)+(l-s)*(l-s));return Math.abs(w)<.001&&(w=1),this.x=(p-h)/w,this.y=(c-d)/w,this.z=(l-s)/w,this.w=Math.acos((a+u+f-1)/2),this},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this},clampScalar:function(){var e,t;return function(n,r){return void 0===e&&(e=new A,t=new A),e.set(n,n,n,n),t.set(r,r,r,r),this.clamp(e,t)}}(),clampLength:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this},lerpVectors:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e},fromBufferAttribute:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}}),x.prototype=Object.assign(Object.create(o.prototype),{constructor:x,isWebGLRenderTarget:!0,setSize:function(e,t){this.width===e&&this.height===t||(this.width=e,this.height=t,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.width=e.width,this.height=e.height,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),S.prototype=Object.create(x.prototype),S.prototype.constructor=S,S.prototype.isWebGLRenderTargetCube=!0,T.prototype=Object.create(E.prototype),T.prototype.constructor=T,T.prototype.isDataTexture=!0,M.prototype=Object.create(E.prototype),M.prototype.constructor=M,M.prototype.isCubeTexture=!0,Object.defineProperty(M.prototype,"images",{get:function(){return this.image},set:function(e){this.image=e}});var R=new E,C=new M;function k(){this.seq=[],this.map={}}var I=[],P=[],O=new Float32Array(16),N=new Float32Array(9);function D(e,t,n){var r=e[0];if(r<=0||r>0)return e;var i=t*n,o=I[i];if(void 0===o&&(o=new Float32Array(i),I[i]=o),0!==t){r.toArray(o,0);for(var a=1,s=0;a!==t;++a)s+=n,e[a].toArray(o,s)}return o}function L(e,t){var n=P[t];void 0===n&&(n=new Int32Array(t),P[t]=n);for(var r=0;r!==t;++r)n[r]=e.allocTextureUnit();return n}function F(e,t){e.uniform1f(this.addr,t)}function j(e,t){e.uniform1i(this.addr,t)}function U(e,t){void 0===t.x?e.uniform2fv(this.addr,t):e.uniform2f(this.addr,t.x,t.y)}function B(e,t){void 0!==t.x?e.uniform3f(this.addr,t.x,t.y,t.z):void 0!==t.r?e.uniform3f(this.addr,t.r,t.g,t.b):e.uniform3fv(this.addr,t)}function V(e,t){void 0===t.x?e.uniform4fv(this.addr,t):e.uniform4f(this.addr,t.x,t.y,t.z,t.w)}function H(e,t){e.uniformMatrix2fv(this.addr,!1,t.elements||t)}function z(e,t){void 0===t.elements?e.uniformMatrix3fv(this.addr,!1,t):(N.set(t.elements),e.uniformMatrix3fv(this.addr,!1,N))}function q(e,t){void 0===t.elements?e.uniformMatrix4fv(this.addr,!1,t):(O.set(t.elements),e.uniformMatrix4fv(this.addr,!1,O))}function G(e,t,n){var r=n.allocTextureUnit();e.uniform1i(this.addr,r),n.setTexture2D(t||R,r)}function W(e,t,n){var r=n.allocTextureUnit();e.uniform1i(this.addr,r),n.setTextureCube(t||C,r)}function J(e,t){e.uniform2iv(this.addr,t)}function Z(e,t){e.uniform3iv(this.addr,t)}function Y(e,t){e.uniform4iv(this.addr,t)}function X(e,t){e.uniform1fv(this.addr,t)}function Q(e,t){e.uniform1iv(this.addr,t)}function K(e,t){e.uniform2fv(this.addr,D(t,this.size,2))}function $(e,t){e.uniform3fv(this.addr,D(t,this.size,3))}function ee(e,t){e.uniform4fv(this.addr,D(t,this.size,4))}function te(e,t){e.uniformMatrix2fv(this.addr,!1,D(t,this.size,4))}function ne(e,t){e.uniformMatrix3fv(this.addr,!1,D(t,this.size,9))}function re(e,t){e.uniformMatrix4fv(this.addr,!1,D(t,this.size,16))}function ie(e,t,n){var r=t.length,i=L(n,r);e.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTexture2D(t[o]||R,i[o])}function oe(e,t,n){var r=t.length,i=L(n,r);e.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTextureCube(t[o]||C,i[o])}function ae(e,t,n){this.id=e,this.addr=n,this.setValue=function(e){switch(e){case 5126:return F;case 35664:return U;case 35665:return B;case 35666:return V;case 35674:return H;case 35675:return z;case 35676:return q;case 35678:case 36198:return G;case 35680:return W;case 5124:case 35670:return j;case 35667:case 35671:return J;case 35668:case 35672:return Z;case 35669:case 35673:return Y}}(t.type)}function se(e,t,n){this.id=e,this.addr=n,this.size=t.size,this.setValue=function(e){switch(e){case 5126:return X;case 35664:return K;case 35665:return $;case 35666:return ee;case 35674:return te;case 35675:return ne;case 35676:return re;case 35678:return ie;case 35680:return oe;case 5124:case 35670:return Q;case 35667:case 35671:return J;case 35668:case 35672:return Z;case 35669:case 35673:return Y}}(t.type)}function ce(e){this.id=e,k.call(this)}ce.prototype.setValue=function(e,t){for(var n=this.seq,r=0,i=n.length;r!==i;++r){var o=n[r];o.setValue(e,t[o.id])}};var le=/([\w\d_]+)(\])?(\[|\.)?/g;function ue(e,t){e.seq.push(t),e.map[t.id]=t}function he(e,t,n){var r=e.name,i=r.length;for(le.lastIndex=0;;){var o=le.exec(r),a=le.lastIndex,s=o[1],c="]"===o[2],l=o[3];if(c&&(s|=0),void 0===l||"["===l&&a+2===i){ue(n,void 0===l?new ae(s,e,t):new se(s,e,t));break}var u=n.map[s];void 0===u&&ue(n,u=new ce(s)),n=u}}function de(e,t,n){k.call(this),this.renderer=n;for(var r=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),i=0;i<r;++i){var o=e.getActiveUniform(t,i),a=o.name;he(o,e.getUniformLocation(t,a),this)}}de.prototype.setValue=function(e,t,n){var r=this.map[t];void 0!==r&&r.setValue(e,n,this.renderer)},de.prototype.setOptional=function(e,t,n){var r=t[n];void 0!==r&&this.setValue(e,n,r)},de.upload=function(e,t,n,r){for(var i=0,o=t.length;i!==o;++i){var a=t[i],s=n[a.id];!1!==s.needsUpdate&&a.setValue(e,s.value,r)}},de.seqWithValue=function(e,t){for(var n=[],r=0,i=e.length;r!==i;++r){var o=e[r];o.id in t&&n.push(o)}return n};var pe={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function fe(e,t,n){return void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}Object.assign(fe.prototype,{isColor:!0,r:1,g:1,b:1,set:function(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this},setScalar:function(e){return this.r=e,this.g=e,this.b=e,this},setHex:function(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this},setRGB:function(e,t,n){return this.r=e,this.g=t,this.b=n,this},setHSL:function(){function e(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}return function(t,n,r){if(t=m.euclideanModulo(t,1),n=m.clamp(n,0,1),r=m.clamp(r,0,1),0===n)this.r=this.g=this.b=r;else{var i=r<=.5?r*(1+n):r+n-r*n,o=2*r-i;this.r=e(o,i,t+1/3),this.g=e(o,i,t),this.b=e(o,i,t-1/3)}return this}}(),setStyle:function(e){function t(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(e)){var r,i=n[1],o=n[2];switch(i){case"rgb":case"rgba":if(r=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,t(r[5]),this;if(r=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,t(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o)){var a=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,c=parseInt(r[3],10)/100;return t(r[5]),this.setHSL(a,s,c)}}}else if(n=/^\#([A-Fa-f0-9]+)$/.exec(e)){var l,u=(l=n[1]).length;if(3===u)return this.r=parseInt(l.charAt(0)+l.charAt(0),16)/255,this.g=parseInt(l.charAt(1)+l.charAt(1),16)/255,this.b=parseInt(l.charAt(2)+l.charAt(2),16)/255,this;if(6===u)return this.r=parseInt(l.charAt(0)+l.charAt(1),16)/255,this.g=parseInt(l.charAt(2)+l.charAt(3),16)/255,this.b=parseInt(l.charAt(4)+l.charAt(5),16)/255,this}e&&e.length>0&&(void 0!==(l=pe[e])?this.setHex(l):console.warn("THREE.Color: Unknown color "+e));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(e){return this.r=e.r,this.g=e.g,this.b=e.b,this},copyGammaToLinear:function(e,t){return void 0===t&&(t=2),this.r=Math.pow(e.r,t),this.g=Math.pow(e.g,t),this.b=Math.pow(e.b,t),this},copyLinearToGamma:function(e,t){void 0===t&&(t=2);var n=t>0?1/t:1;return this.r=Math.pow(e.r,n),this.g=Math.pow(e.g,n),this.b=Math.pow(e.b,n),this},convertGammaToLinear:function(){var e=this.r,t=this.g,n=this.b;return this.r=e*e,this.g=t*t,this.b=n*n,this},convertLinearToGamma:function(){return this.r=Math.sqrt(this.r),this.g=Math.sqrt(this.g),this.b=Math.sqrt(this.b),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(e){var t,n,r=e||{h:0,s:0,l:0},i=this.r,o=this.g,a=this.b,s=Math.max(i,o,a),c=Math.min(i,o,a),l=(c+s)/2;if(c===s)t=0,n=0;else{var u=s-c;switch(n=l<=.5?u/(s+c):u/(2-s-c),s){case i:t=(o-a)/u+(o<a?6:0);break;case o:t=(a-i)/u+2;break;case a:t=(i-o)/u+4}t/=6}return r.h=t,r.s=n,r.l=l,r},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(e,t,n){var r=this.getHSL();return r.h+=e,r.s+=t,r.l+=n,this.setHSL(r.h,r.s,r.l),this},add:function(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this},addColors:function(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this},addScalar:function(e){return this.r+=e,this.g+=e,this.b+=e,this},sub:function(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this},multiply:function(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this},multiplyScalar:function(e){return this.r*=e,this.g*=e,this.b*=e,this},lerp:function(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this},equals:function(e){return e.r===this.r&&e.g===this.g&&e.b===this.b},fromArray:function(e,t){return void 0===t&&(t=0),this.r=e[t],this.g=e[t+1],this.b=e[t+2],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e},toJSON:function(){return this.getHex()}});var me={common:{diffuse:{value:new fe(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new _},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new g(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new fe(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new fe(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new _}}},ge={merge:function(e){for(var t={},n=0;n<e.length;n++){var r=this.clone(e[n]);for(var i in r)t[i]=r[i]}return t},clone:function(e){var t={};for(var n in e)for(var r in t[n]={},e[n]){var i=e[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?t[n][r]=i.clone():Array.isArray(i)?t[n][r]=i.slice():t[n][r]=i}return t}},ye={alphamap_fragment:"#ifdef USE_ALPHAMAP\r\n\r\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\r\n\r\n#endif\r\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\r\n\r\n\tuniform sampler2D alphaMap;\r\n\r\n#endif\r\n",alphatest_fragment:"#ifdef ALPHATEST\r\n\r\n\tif ( diffuseColor.a < ALPHATEST ) discard;\r\n\r\n#endif\r\n",aomap_fragment:"#ifdef USE_AOMAP\r\n\r\n\t// reads channel R, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\r\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\r\n\r\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\r\n\r\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\r\n\r\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\r\n\r\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\r\n\r\n\t#endif\r\n\r\n#endif\r\n",aomap_pars_fragment:"#ifdef USE_AOMAP\r\n\r\n\tuniform sampler2D aoMap;\r\n\tuniform float aoMapIntensity;\r\n\r\n#endif",begin_vertex:"\r\nvec3 transformed = vec3( position );\r\n",beginnormal_vertex:"\r\nvec3 objectNormal = vec3( normal );\r\n",bsdfs:'float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\r\n\r\n\tif( decayExponent > 0.0 ) {\r\n\r\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\r\n\r\n\t\t// based upon Frostbite 3 Moving to Physically-based Rendering\r\n\t\t// page 32, equation 26: E[window1]\r\n\t\t// https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\r\n\t\t// this is intended to be used on spot and point lights who are represented as luminous intensity\r\n\t\t// but who must be converted to luminous irradiance for surface lighting calculation\r\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\r\n\t\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\r\n\t\treturn distanceFalloff * maxDistanceCutoffFactor;\r\n\r\n#else\r\n\r\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\r\n\r\n#endif\r\n\r\n\t}\r\n\r\n\treturn 1.0;\r\n\r\n}\r\n\r\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\r\n\r\n\treturn RECIPROCAL_PI * diffuseColor;\r\n\r\n} // validated\r\n\r\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\r\n\r\n\t// Original approximation by Christophe Schlick \'94\r\n\t// float fresnel = pow( 1.0 - dotLH, 5.0 );\r\n\r\n\t// Optimized variant (presented by Epic at SIGGRAPH \'13)\r\n\t// https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf\r\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\r\n\r\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\r\n\r\n} // validated\r\n\r\n// Microfacet Models for Refraction through Rough Surfaces - equation (34)\r\n// http://graphicrants.blogspot.com/2013/08/specular-brdf-reference.html\r\n// alpha is "roughness squared" in Disney’s reparameterization\r\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\r\n\r\n\t// geometry term (normalized) = G(l)⋅G(v) / 4(n⋅l)(n⋅v)\r\n\t// also see #12151\r\n\r\n\tfloat a2 = pow2( alpha );\r\n\r\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\r\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\r\n\r\n\treturn 1.0 / ( gl * gv );\r\n\r\n} // validated\r\n\r\n// Moving Frostbite to Physically Based Rendering 3.0 - page 12, listing 2\r\n// https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\r\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\r\n\r\n\tfloat a2 = pow2( alpha );\r\n\r\n\t// dotNL and dotNV are explicitly swapped. This is not a mistake.\r\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\r\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\r\n\r\n\treturn 0.5 / max( gv + gl, EPSILON );\r\n\r\n}\r\n\r\n// Microfacet Models for Refraction through Rough Surfaces - equation (33)\r\n// http://graphicrants.blogspot.com/2013/08/specular-brdf-reference.html\r\n// alpha is "roughness squared" in Disney’s reparameterization\r\nfloat D_GGX( const in float alpha, const in float dotNH ) {\r\n\r\n\tfloat a2 = pow2( alpha );\r\n\r\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; // avoid alpha = 0 with dotNH = 1\r\n\r\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\r\n\r\n}\r\n\r\n// GGX Distribution, Schlick Fresnel, GGX-Smith Visibility\r\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\r\n\r\n\tfloat alpha = pow2( roughness ); // UE4\'s roughness\r\n\r\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\r\n\r\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\r\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\r\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\r\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\r\n\r\n\tvec3 F = F_Schlick( specularColor, dotLH );\r\n\r\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\r\n\r\n\tfloat D = D_GGX( alpha, dotNH );\r\n\r\n\treturn F * ( G * D );\r\n\r\n} // validated\r\n\r\n// Rect Area Light\r\n\r\n// Real-Time Polygonal-Light Shading with Linearly Transformed Cosines\r\n// by Eric Heitz, Jonathan Dupuy, Stephen Hill and David Neubelt\r\n// code: https://github.com/selfshadow/ltc_code/\r\n\r\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\r\n\r\n\tconst float LUT_SIZE = 64.0;\r\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\r\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\r\n\r\n\tfloat dotNV = saturate( dot( N, V ) );\r\n\r\n\t// texture parameterized by sqrt( GGX alpha ) and sqrt( 1 - cos( theta ) )\r\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\r\n\r\n\tuv = uv * LUT_SCALE + LUT_BIAS;\r\n\r\n\treturn uv;\r\n\r\n}\r\n\r\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\r\n\r\n\t// Real-Time Area Lighting: a Journey from Research to Production (p.102)\r\n\t// An approximation of the form factor of a horizon-clipped rectangle.\r\n\r\n\tfloat l = length( f );\r\n\r\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\r\n\r\n}\r\n\r\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\r\n\r\n\tfloat x = dot( v1, v2 );\r\n\r\n\tfloat y = abs( x );\r\n\r\n\t// rational polynomial approximation to theta / sin( theta ) / 2PI\r\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\r\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\r\n\tfloat v = a / b;\r\n\r\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\r\n\r\n\treturn cross( v1, v2 ) * theta_sintheta;\r\n\r\n}\r\n\r\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\r\n\r\n\t// bail if point is on back side of plane of light\r\n\t// assumes ccw winding order of light vertices\r\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\r\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\r\n\tvec3 lightNormal = cross( v1, v2 );\r\n\r\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\r\n\r\n\t// construct orthonormal basis around N\r\n\tvec3 T1, T2;\r\n\tT1 = normalize( V - N * dot( V, N ) );\r\n\tT2 = - cross( N, T1 ); // negated from paper; possibly due to a different handedness of world coordinate system\r\n\r\n\t// compute transform\r\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\r\n\r\n\t// transform rect\r\n\tvec3 coords[ 4 ];\r\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\r\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\r\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\r\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\r\n\r\n\t// project rect onto sphere\r\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\r\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\r\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\r\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\r\n\r\n\t// calculate vector form factor\r\n\tvec3 vectorFormFactor = vec3( 0.0 );\r\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\r\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\r\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\r\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\r\n\r\n\t// adjust for horizon clipping\r\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\r\n\r\n\r\n\r\n\treturn vec3( result );\r\n\r\n}\r\n\r\n// End Rect Area Light\r\n\r\n// ref: https://www.unrealengine.com/blog/physically-based-shading-on-mobile - environmentBRDF for GGX on mobile\r\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\r\n\r\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\r\n\r\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\r\n\r\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\r\n\r\n\tvec4 r = roughness * c0 + c1;\r\n\r\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\r\n\r\n\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\r\n\r\n\treturn specularColor * AB.x + AB.y;\r\n\r\n} // validated\r\n\r\n\r\nfloat G_BlinnPhong_Implicit( ) {\r\n\r\n\t// geometry term is (n dot l)(n dot v) / 4(n dot l)(n dot v)\r\n\treturn 0.25;\r\n\r\n}\r\n\r\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\r\n\r\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\r\n\r\n}\r\n\r\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\r\n\r\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\r\n\r\n\t//float dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\r\n\t//float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\r\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\r\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\r\n\r\n\tvec3 F = F_Schlick( specularColor, dotLH );\r\n\r\n\tfloat G = G_BlinnPhong_Implicit( );\r\n\r\n\tfloat D = D_BlinnPhong( shininess, dotNH );\r\n\r\n\treturn F * ( G * D );\r\n\r\n} // validated\r\n\r\n// source: http://simonstechblog.blogspot.ca/2011/12/microfacet-brdf.html\r\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\r\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\r\n}\r\n\r\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\r\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\r\n}\r\n',bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\r\n\r\n\tuniform sampler2D bumpMap;\r\n\tuniform float bumpScale;\r\n\r\n\t// Derivative maps - bump mapping unparametrized surfaces by Morten Mikkelsen\r\n\t// http://mmikkelsen3d.blogspot.sk/2011/07/derivative-maps.html\r\n\r\n\t// Evaluate the derivative of the height w.r.t. screen-space using forward differencing (listing 2)\r\n\r\n\tvec2 dHdxy_fwd() {\r\n\r\n\t\tvec2 dSTdx = dFdx( vUv );\r\n\t\tvec2 dSTdy = dFdy( vUv );\r\n\r\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\r\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\r\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\r\n\r\n\t\treturn vec2( dBx, dBy );\r\n\r\n\t}\r\n\r\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\r\n\r\n\t\t// Workaround for Adreno 3XX dFd*( vec3 ) bug. See #9988\r\n\r\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\r\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\r\n\t\tvec3 vN = surf_norm;\t\t// normalized\r\n\r\n\t\tvec3 R1 = cross( vSigmaY, vN );\r\n\t\tvec3 R2 = cross( vN, vSigmaX );\r\n\r\n\t\tfloat fDet = dot( vSigmaX, R1 );\r\n\r\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\r\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\r\n\r\n\t}\r\n\r\n#endif\r\n",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\r\n\r\n\tvec4 plane;\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\r\n\r\n\t\tplane = clippingPlanes[ i ];\r\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\r\n\r\n\t}\r\n\r\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\r\n\r\n\t\tbool clipped = true;\r\n\r\n\t\t#pragma unroll_loop\r\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\r\n\r\n\t\t\tplane = clippingPlanes[ i ];\r\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\r\n\r\n\t\t}\r\n\r\n\t\tif ( clipped ) discard;\r\n\r\n\t#endif\r\n\r\n#endif\r\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\r\n\r\n\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\r\n\t\tvarying vec3 vViewPosition;\r\n\t#endif\r\n\r\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\r\n\r\n#endif\r\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\r\n\tvarying vec3 vViewPosition;\r\n#endif\r\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\r\n\tvViewPosition = - mvPosition.xyz;\r\n#endif\r\n\r\n",color_fragment:"#ifdef USE_COLOR\r\n\r\n\tdiffuseColor.rgb *= vColor;\r\n\r\n#endif",color_pars_fragment:"#ifdef USE_COLOR\r\n\r\n\tvarying vec3 vColor;\r\n\r\n#endif\r\n",color_pars_vertex:"#ifdef USE_COLOR\r\n\r\n\tvarying vec3 vColor;\r\n\r\n#endif",color_vertex:"#ifdef USE_COLOR\r\n\r\n\tvColor.xyz = color.xyz;\r\n\r\n#endif",common:"#define PI 3.14159265359\r\n#define PI2 6.28318530718\r\n#define PI_HALF 1.5707963267949\r\n#define RECIPROCAL_PI 0.31830988618\r\n#define RECIPROCAL_PI2 0.15915494\r\n#define LOG2 1.442695\r\n#define EPSILON 1e-6\r\n\r\n#define saturate(a) clamp( a, 0.0, 1.0 )\r\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\r\n\r\nfloat pow2( const in float x ) { return x*x; }\r\nfloat pow3( const in float x ) { return x*x*x; }\r\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\r\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\r\n// expects values in the range of [0,1]x[0,1], returns values in the [0,1] range.\r\n// do not collapse into a single function per: http://byteblacksmith.com/improvements-to-the-canonical-one-liner-glsl-rand-for-opengl-es-2-0/\r\nhighp float rand( const in vec2 uv ) {\r\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\r\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\r\n\treturn fract(sin(sn) * c);\r\n}\r\n\r\nstruct IncidentLight {\r\n\tvec3 color;\r\n\tvec3 direction;\r\n\tbool visible;\r\n};\r\n\r\nstruct ReflectedLight {\r\n\tvec3 directDiffuse;\r\n\tvec3 directSpecular;\r\n\tvec3 indirectDiffuse;\r\n\tvec3 indirectSpecular;\r\n};\r\n\r\nstruct GeometricContext {\r\n\tvec3 position;\r\n\tvec3 normal;\r\n\tvec3 viewDir;\r\n};\r\n\r\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\r\n\r\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\r\n\r\n}\r\n\r\n// http://en.wikibooks.org/wiki/GLSL_Programming/Applying_Matrix_Transformations\r\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\r\n\r\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\r\n\r\n}\r\n\r\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\r\n\r\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\r\n\r\n\treturn - distance * planeNormal + point;\r\n\r\n}\r\n\r\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\r\n\r\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\r\n\r\n}\r\n\r\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\r\n\r\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\r\n\r\n}\r\n\r\nmat3 transposeMat3( const in mat3 m ) {\r\n\r\n\tmat3 tmp;\r\n\r\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\r\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\r\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\r\n\r\n\treturn tmp;\r\n\r\n}\r\n\r\n// https://en.wikipedia.org/wiki/Relative_luminance\r\nfloat linearToRelativeLuminance( const in vec3 color ) {\r\n\r\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\r\n\r\n\treturn dot( weights, color.rgb );\r\n\r\n}\r\n",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\r\n\r\n#define cubeUV_textureSize (1024.0)\r\n\r\nint getFaceFromDirection(vec3 direction) {\r\n\tvec3 absDirection = abs(direction);\r\n\tint face = -1;\r\n\tif( absDirection.x > absDirection.z ) {\r\n\t\tif(absDirection.x > absDirection.y )\r\n\t\t\tface = direction.x > 0.0 ? 0 : 3;\r\n\t\telse\r\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\r\n\t}\r\n\telse {\r\n\t\tif(absDirection.z > absDirection.y )\r\n\t\t\tface = direction.z > 0.0 ? 2 : 5;\r\n\t\telse\r\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\r\n\t}\r\n\treturn face;\r\n}\r\n#define cubeUV_maxLods1 (log2(cubeUV_textureSize*0.25) - 1.0)\r\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\r\n\r\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\r\n\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\r\n\tfloat dxRoughness = dFdx(roughness);\r\n\tfloat dyRoughness = dFdy(roughness);\r\n\tvec3 dx = dFdx( vec * scale * dxRoughness );\r\n\tvec3 dy = dFdy( vec * scale * dyRoughness );\r\n\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\r\n\t// Clamp the value to the max mip level counts. hard coded to 6 mips\r\n\td = clamp(d, 1.0, cubeUV_rangeClamp);\r\n\tfloat mipLevel = 0.5 * log2(d);\r\n\treturn vec2(floor(mipLevel), fract(mipLevel));\r\n}\r\n\r\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\r\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\r\n\r\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\r\n\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\r\n\tfloat a = 16.0 * cubeUV_rcpTextureSize;\r\n\r\n\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\r\n\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\r\n\t// float powScale = exp2(roughnessLevel + mipLevel);\r\n\tfloat powScale = exp2_packed.x * exp2_packed.y;\r\n\t// float scale = 1.0 / exp2(roughnessLevel + 2.0 + mipLevel);\r\n\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\r\n\t// float mipOffset = 0.75*(1.0 - 1.0/exp2(mipLevel))/exp2(roughnessLevel);\r\n\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\r\n\r\n\tbool bRes = mipLevel == 0.0;\r\n\tscale = bRes && (scale < a) ? a : scale;\r\n\r\n\tvec3 r;\r\n\tvec2 offset;\r\n\tint face = getFaceFromDirection(direction);\r\n\r\n\tfloat rcpPowScale = 1.0 / powScale;\r\n\r\n\tif( face == 0) {\r\n\t\tr = vec3(direction.x, -direction.z, direction.y);\r\n\t\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\r\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\r\n\t}\r\n\telse if( face == 1) {\r\n\t\tr = vec3(direction.y, direction.x, direction.z);\r\n\t\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\r\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\r\n\t}\r\n\telse if( face == 2) {\r\n\t\tr = vec3(direction.z, direction.x, direction.y);\r\n\t\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\r\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\r\n\t}\r\n\telse if( face == 3) {\r\n\t\tr = vec3(direction.x, direction.z, direction.y);\r\n\t\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\r\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\r\n\t}\r\n\telse if( face == 4) {\r\n\t\tr = vec3(direction.y, direction.x, -direction.z);\r\n\t\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\r\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\r\n\t}\r\n\telse {\r\n\t\tr = vec3(direction.z, -direction.x, direction.y);\r\n\t\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\r\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\r\n\t}\r\n\tr = normalize(r);\r\n\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\r\n\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\r\n\tvec2 base = offset + vec2( texelOffset );\r\n\treturn base + s * ( scale - 2.0 * texelOffset );\r\n}\r\n\r\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\r\n\r\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\r\n\tfloat roughnessVal = roughness* cubeUV_maxLods3;\r\n\tfloat r1 = floor(roughnessVal);\r\n\tfloat r2 = r1 + 1.0;\r\n\tfloat t = fract(roughnessVal);\r\n\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\r\n\tfloat s = mipInfo.y;\r\n\tfloat level0 = mipInfo.x;\r\n\tfloat level1 = level0 + 1.0;\r\n\tlevel1 = level1 > 5.0 ? 5.0 : level1;\r\n\r\n\t// round to nearest mipmap if we are not interpolating.\r\n\tlevel0 += min( floor( s + 0.5 ), 5.0 );\r\n\r\n\t// Tri linear interpolation.\r\n\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\r\n\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\r\n\r\n\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\r\n\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\r\n\r\n\tvec4 result = mix(color10, color20, t);\r\n\r\n\treturn vec4(result.rgb, 1.0);\r\n}\r\n\r\n#endif\r\n",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\r\n\r\n#ifdef FLIP_SIDED\r\n\r\n\ttransformedNormal = - transformedNormal;\r\n\r\n#endif\r\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\r\n\r\n\tuniform sampler2D displacementMap;\r\n\tuniform float displacementScale;\r\n\tuniform float displacementBias;\r\n\r\n#endif\r\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\r\n\r\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\r\n\r\n#endif\r\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\r\n\r\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\r\n\r\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\r\n\r\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\r\n\r\n#endif\r\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\r\n\r\n\tuniform sampler2D emissiveMap;\r\n\r\n#endif\r\n",encodings_fragment:" gl_FragColor = linearToOutputTexel( gl_FragColor );\r\n",encodings_pars_fragment:"// For a discussion of what this is, please read this: http://lousodrome.net/blog/light/2013/05/26/gamma-correct-and-hdr-rendering-in-a-32-bits-buffer/\r\n\r\nvec4 LinearToLinear( in vec4 value ) {\r\n\treturn value;\r\n}\r\n\r\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\r\n\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\r\n}\r\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\r\n\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\r\n}\r\n\r\nvec4 sRGBToLinear( in vec4 value ) {\r\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\r\n}\r\nvec4 LinearTosRGB( in vec4 value ) {\r\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\r\n}\r\n\r\nvec4 RGBEToLinear( in vec4 value ) {\r\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\r\n}\r\nvec4 LinearToRGBE( in vec4 value ) {\r\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\r\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\r\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\r\n// return vec4( value.brg, ( 3.0 + 128.0 ) / 256.0 );\r\n}\r\n\r\n// reference: http://iwasbeingirony.blogspot.ca/2010/06/difference-between-rgbm-and-rgbd.html\r\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\r\n\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\r\n}\r\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\r\n\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\r\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\r\n\tM = ceil( M * 255.0 ) / 255.0;\r\n\treturn vec4( value.rgb / ( M * maxRange ), M );\r\n}\r\n\r\n// reference: http://iwasbeingirony.blogspot.ca/2010/06/difference-between-rgbm-and-rgbd.html\r\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\r\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\r\n}\r\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\r\n\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\r\n\tfloat D = max( maxRange / maxRGB, 1.0 );\r\n\tD = min( floor( D ) / 255.0, 1.0 );\r\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\r\n}\r\n\r\n// LogLuv reference: http://graphicrants.blogspot.ca/2009/04/rgbm-color-encoding.html\r\n\r\n// M matrix, for encoding\r\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\r\nvec4 LinearToLogLuv( in vec4 value ) {\r\n\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\r\n\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\r\n\tvec4 vResult;\r\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\r\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\r\n\tvResult.w = fract(Le);\r\n\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\r\n\treturn vResult;\r\n}\r\n\r\n// Inverse M matrix, for decoding\r\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\r\nvec4 LogLuvToLinear( in vec4 value ) {\r\n\tfloat Le = value.z * 255.0 + value.w;\r\n\tvec3 Xp_Y_XYZp;\r\n\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\r\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\r\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\r\n\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\r\n\treturn vec4( max(vRGB, 0.0), 1.0 );\r\n}\r\n",envmap_fragment:"#ifdef USE_ENVMAP\r\n\r\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\r\n\r\n\t\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\r\n\r\n\t\t// Transforming Normal Vectors with the Inverse Transformation\r\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\r\n\r\n\t\t#ifdef ENVMAP_MODE_REFLECTION\r\n\r\n\t\t\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\r\n\r\n\t\t#else\r\n\r\n\t\t\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\r\n\r\n\t\t#endif\r\n\r\n\t#else\r\n\r\n\t\tvec3 reflectVec = vReflect;\r\n\r\n\t#endif\r\n\r\n\t#ifdef ENVMAP_TYPE_CUBE\r\n\r\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\r\n\r\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\r\n\r\n\t\tvec2 sampleUV;\r\n\r\n\t\treflectVec = normalize( reflectVec );\r\n\r\n\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\r\n\r\n\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\r\n\r\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\r\n\r\n\t#elif defined( ENVMAP_TYPE_SPHERE )\r\n\r\n\t\treflectVec = normalize( reflectVec );\r\n\r\n\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\r\n\r\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\r\n\r\n\t#else\r\n\r\n\t\tvec4 envColor = vec4( 0.0 );\r\n\r\n\t#endif\r\n\r\n\tenvColor = envMapTexelToLinear( envColor );\r\n\r\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\r\n\r\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\r\n\r\n\t#elif defined( ENVMAP_BLENDING_MIX )\r\n\r\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\r\n\r\n\t#elif defined( ENVMAP_BLENDING_ADD )\r\n\r\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\r\n\r\n\t#endif\r\n\r\n#endif\r\n",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\r\n\tuniform float reflectivity;\r\n\tuniform float envMapIntensity;\r\n#endif\r\n\r\n#ifdef USE_ENVMAP\r\n\r\n\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\r\n\t\tvarying vec3 vWorldPosition;\r\n\t#endif\r\n\r\n\t#ifdef ENVMAP_TYPE_CUBE\r\n\t\tuniform samplerCube envMap;\r\n\t#else\r\n\t\tuniform sampler2D envMap;\r\n\t#endif\r\n\tuniform float flipEnvMap;\r\n\r\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\r\n\t\tuniform float refractionRatio;\r\n\t#else\r\n\t\tvarying vec3 vReflect;\r\n\t#endif\r\n\r\n#endif\r\n",envmap_pars_vertex:"#ifdef USE_ENVMAP\r\n\r\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\r\n\t\tvarying vec3 vWorldPosition;\r\n\r\n\t#else\r\n\r\n\t\tvarying vec3 vReflect;\r\n\t\tuniform float refractionRatio;\r\n\r\n\t#endif\r\n\r\n#endif\r\n",envmap_vertex:"#ifdef USE_ENVMAP\r\n\r\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\r\n\r\n\t\tvWorldPosition = worldPosition.xyz;\r\n\r\n\t#else\r\n\r\n\t\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\r\n\r\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\r\n\r\n\t\t#ifdef ENVMAP_MODE_REFLECTION\r\n\r\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\r\n\r\n\t\t#else\r\n\r\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\r\n\r\n\t\t#endif\r\n\r\n\t#endif\r\n\r\n#endif\r\n",fog_vertex:"\r\n#ifdef USE_FOG\r\nfogDepth = -mvPosition.z;\r\n#endif",fog_pars_vertex:"#ifdef USE_FOG\r\n\r\n varying float fogDepth;\r\n\r\n#endif\r\n",fog_fragment:"#ifdef USE_FOG\r\n\r\n\t#ifdef FOG_EXP2\r\n\r\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\r\n\r\n\t#else\r\n\r\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\r\n\r\n\t#endif\r\n\r\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\r\n\r\n#endif\r\n",fog_pars_fragment:"#ifdef USE_FOG\r\n\r\n\tuniform vec3 fogColor;\r\n\tvarying float fogDepth;\r\n\r\n\t#ifdef FOG_EXP2\r\n\r\n\t\tuniform float fogDensity;\r\n\r\n\t#else\r\n\r\n\t\tuniform float fogNear;\r\n\t\tuniform float fogFar;\r\n\r\n\t#endif\r\n\r\n#endif\r\n",gradientmap_pars_fragment:"#ifdef TOON\r\n\r\n\tuniform sampler2D gradientMap;\r\n\r\n\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\r\n\r\n\t\t// dotNL will be from -1.0 to 1.0\r\n\t\tfloat dotNL = dot( normal, lightDirection );\r\n\t\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\r\n\r\n\t\t#ifdef USE_GRADIENTMAP\r\n\r\n\t\t\treturn texture2D( gradientMap, coord ).rgb;\r\n\r\n\t\t#else\r\n\r\n\t\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\r\n\r\n\t\t#endif\r\n\r\n\r\n\t}\r\n\r\n#endif\r\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\r\n\r\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity; // factor of PI should not be present; included here to prevent breakage\r\n\r\n#endif\r\n",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\r\n\r\n\tuniform sampler2D lightMap;\r\n\tuniform float lightMapIntensity;\r\n\r\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\r\n\r\nGeometricContext geometry;\r\ngeometry.position = mvPosition.xyz;\r\ngeometry.normal = normalize( transformedNormal );\r\ngeometry.viewDir = normalize( -mvPosition.xyz );\r\n\r\nGeometricContext backGeometry;\r\nbackGeometry.position = geometry.position;\r\nbackGeometry.normal = -geometry.normal;\r\nbackGeometry.viewDir = geometry.viewDir;\r\n\r\nvLightFront = vec3( 0.0 );\r\n\r\n#ifdef DOUBLE_SIDED\r\n\tvLightBack = vec3( 0.0 );\r\n#endif\r\n\r\nIncidentLight directLight;\r\nfloat dotNL;\r\nvec3 directLightColor_Diffuse;\r\n\r\n#if NUM_POINT_LIGHTS > 0\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\r\n\r\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\r\n\r\n\t\tdotNL = dot( geometry.normal, directLight.direction );\r\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\r\n\r\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\r\n\r\n\t\t#ifdef DOUBLE_SIDED\r\n\r\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\r\n\r\n\t\t#endif\r\n\r\n\t}\r\n\r\n#endif\r\n\r\n#if NUM_SPOT_LIGHTS > 0\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\r\n\r\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\r\n\r\n\t\tdotNL = dot( geometry.normal, directLight.direction );\r\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\r\n\r\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\r\n\r\n\t\t#ifdef DOUBLE_SIDED\r\n\r\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\r\n\r\n\t\t#endif\r\n\t}\r\n\r\n#endif\r\n\r\n\r\n\r\n#if NUM_DIR_LIGHTS > 0\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\r\n\r\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\r\n\r\n\t\tdotNL = dot( geometry.normal, directLight.direction );\r\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\r\n\r\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\r\n\r\n\t\t#ifdef DOUBLE_SIDED\r\n\r\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\r\n\r\n\t\t#endif\r\n\r\n\t}\r\n\r\n#endif\r\n\r\n#if NUM_HEMI_LIGHTS > 0\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\r\n\r\n\t\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\r\n\r\n\t\t#ifdef DOUBLE_SIDED\r\n\r\n\t\t\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\r\n\r\n\t\t#endif\r\n\r\n\t}\r\n\r\n#endif\r\n",lights_pars:"uniform vec3 ambientLightColor;\r\n\r\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\r\n\r\n\tvec3 irradiance = ambientLightColor;\r\n\r\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\r\n\r\n\t\tirradiance *= PI;\r\n\r\n\t#endif\r\n\r\n\treturn irradiance;\r\n\r\n}\r\n\r\n#if NUM_DIR_LIGHTS > 0\r\n\r\n\tstruct DirectionalLight {\r\n\t\tvec3 direction;\r\n\t\tvec3 color;\r\n\r\n\t\tint shadow;\r\n\t\tfloat shadowBias;\r\n\t\tfloat shadowRadius;\r\n\t\tvec2 shadowMapSize;\r\n\t};\r\n\r\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\r\n\r\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\r\n\r\n\t\tdirectLight.color = directionalLight.color;\r\n\t\tdirectLight.direction = directionalLight.direction;\r\n\t\tdirectLight.visible = true;\r\n\r\n\t}\r\n\r\n#endif\r\n\r\n\r\n#if NUM_POINT_LIGHTS > 0\r\n\r\n\tstruct PointLight {\r\n\t\tvec3 position;\r\n\t\tvec3 color;\r\n\t\tfloat distance;\r\n\t\tfloat decay;\r\n\r\n\t\tint shadow;\r\n\t\tfloat shadowBias;\r\n\t\tfloat shadowRadius;\r\n\t\tvec2 shadowMapSize;\r\n\t\tfloat shadowCameraNear;\r\n\t\tfloat shadowCameraFar;\r\n\t};\r\n\r\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\r\n\r\n\t// directLight is an out parameter as having it as a return value caused compiler errors on some devices\r\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\r\n\r\n\t\tvec3 lVector = pointLight.position - geometry.position;\r\n\t\tdirectLight.direction = normalize( lVector );\r\n\r\n\t\tfloat lightDistance = length( lVector );\r\n\r\n\t\tdirectLight.color = pointLight.color;\r\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\r\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\r\n\r\n\t}\r\n\r\n#endif\r\n\r\n\r\n#if NUM_SPOT_LIGHTS > 0\r\n\r\n\tstruct SpotLight {\r\n\t\tvec3 position;\r\n\t\tvec3 direction;\r\n\t\tvec3 color;\r\n\t\tfloat distance;\r\n\t\tfloat decay;\r\n\t\tfloat coneCos;\r\n\t\tfloat penumbraCos;\r\n\r\n\t\tint shadow;\r\n\t\tfloat shadowBias;\r\n\t\tfloat shadowRadius;\r\n\t\tvec2 shadowMapSize;\r\n\t};\r\n\r\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\r\n\r\n\t// directLight is an out parameter as having it as a return value caused compiler errors on some devices\r\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\r\n\r\n\t\tvec3 lVector = spotLight.position - geometry.position;\r\n\t\tdirectLight.direction = normalize( lVector );\r\n\r\n\t\tfloat lightDistance = length( lVector );\r\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\r\n\r\n\t\tif ( angleCos > spotLight.coneCos ) {\r\n\r\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\r\n\r\n\t\t\tdirectLight.color = spotLight.color;\r\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\r\n\t\t\tdirectLight.visible = true;\r\n\r\n\t\t} else {\r\n\r\n\t\t\tdirectLight.color = vec3( 0.0 );\r\n\t\t\tdirectLight.visible = false;\r\n\r\n\t\t}\r\n\t}\r\n\r\n#endif\r\n\r\n\r\n#if NUM_RECT_AREA_LIGHTS > 0\r\n\r\n\tstruct RectAreaLight {\r\n\t\tvec3 color;\r\n\t\tvec3 position;\r\n\t\tvec3 halfWidth;\r\n\t\tvec3 halfHeight;\r\n\t};\r\n\r\n\t// Pre-computed values of LinearTransformedCosine approximation of BRDF\r\n\t// BRDF approximation Texture is 64x64\r\n\tuniform sampler2D ltc_1; // RGBA Float\r\n\tuniform sampler2D ltc_2; // RGBA Float\r\n\r\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\r\n\r\n#endif\r\n\r\n\r\n#if NUM_HEMI_LIGHTS > 0\r\n\r\n\tstruct HemisphereLight {\r\n\t\tvec3 direction;\r\n\t\tvec3 skyColor;\r\n\t\tvec3 groundColor;\r\n\t};\r\n\r\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\r\n\r\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\r\n\r\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\r\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\r\n\r\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\r\n\r\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\r\n\r\n\t\t\tirradiance *= PI;\r\n\r\n\t\t#endif\r\n\r\n\t\treturn irradiance;\r\n\r\n\t}\r\n\r\n#endif\r\n\r\n\r\n#if defined( USE_ENVMAP ) && defined( PHYSICAL )\r\n\r\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\r\n\r\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\r\n\r\n\t\t#ifdef ENVMAP_TYPE_CUBE\r\n\r\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\r\n\r\n\t\t\t// TODO: replace with properly filtered cubemaps and access the irradiance LOD level, be it the last LOD level\r\n\t\t\t// of a specular cubemap, or just the default level of a specially created irradiance cubemap.\r\n\r\n\t\t\t#ifdef TEXTURE_LOD_EXT\r\n\r\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\r\n\r\n\t\t\t#else\r\n\r\n\t\t\t\t// force the bias high to get the last LOD level as it is the most blurred.\r\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\r\n\r\n\t\t\t#endif\r\n\r\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\r\n\r\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\r\n\r\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\r\n\t\t\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\r\n\r\n\t\t#else\r\n\r\n\t\t\tvec4 envMapColor = vec4( 0.0 );\r\n\r\n\t\t#endif\r\n\r\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\r\n\r\n\t}\r\n\r\n\t// taken from here: http://casual-effects.blogspot.ca/2011/08/plausible-environment-lighting-in-two.html\r\n\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\r\n\r\n\t\t//float envMapWidth = pow( 2.0, maxMIPLevelScalar );\r\n\t\t//float desiredMIPLevel = log2( envMapWidth * sqrt( 3.0 ) ) - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\r\n\r\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\r\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\r\n\r\n\t\t// clamp to allowable LOD ranges.\r\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\r\n\r\n\t}\r\n\r\n\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\r\n\r\n\t\t#ifdef ENVMAP_MODE_REFLECTION\r\n\r\n\t\t\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\r\n\r\n\t\t#else\r\n\r\n\t\t\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\r\n\r\n\t\t#endif\r\n\r\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\r\n\r\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\r\n\r\n\t\t#ifdef ENVMAP_TYPE_CUBE\r\n\r\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\r\n\r\n\t\t\t#ifdef TEXTURE_LOD_EXT\r\n\r\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\r\n\r\n\t\t\t#else\r\n\r\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\r\n\r\n\t\t\t#endif\r\n\r\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\r\n\r\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\r\n\r\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\r\n\t\t\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\r\n\r\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\r\n\r\n\t\t\tvec2 sampleUV;\r\n\t\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\r\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\r\n\r\n\t\t\t#ifdef TEXTURE_LOD_EXT\r\n\r\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\r\n\r\n\t\t\t#else\r\n\r\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\r\n\r\n\t\t\t#endif\r\n\r\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\r\n\r\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\r\n\r\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\r\n\r\n\t\t\t#ifdef TEXTURE_LOD_EXT\r\n\r\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\r\n\r\n\t\t\t#else\r\n\r\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\r\n\r\n\t\t\t#endif\r\n\r\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\r\n\r\n\t\t#endif\r\n\r\n\t\treturn envMapColor.rgb * envMapIntensity;\r\n\r\n\t}\r\n\r\n#endif\r\n",lights_phong_fragment:"BlinnPhongMaterial material;\r\nmaterial.diffuseColor = diffuseColor.rgb;\r\nmaterial.specularColor = specular;\r\nmaterial.specularShininess = shininess;\r\nmaterial.specularStrength = specularStrength;\r\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\r\n\r\n#ifndef FLAT_SHADED\r\n\r\n\tvarying vec3 vNormal;\r\n\r\n#endif\r\n\r\n\r\nstruct BlinnPhongMaterial {\r\n\r\n\tvec3\tdiffuseColor;\r\n\tvec3\tspecularColor;\r\n\tfloat\tspecularShininess;\r\n\tfloat\tspecularStrength;\r\n\r\n};\r\n\r\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\r\n\r\n\t#ifdef TOON\r\n\r\n\t\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\r\n\r\n\t#else\r\n\r\n\t\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\r\n\t\tvec3 irradiance = dotNL * directLight.color;\r\n\r\n\t#endif\r\n\r\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\r\n\r\n\t\tirradiance *= PI; // punctual light\r\n\r\n\t#endif\r\n\r\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\r\n\r\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\r\n\r\n}\r\n\r\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\r\n\r\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\r\n\r\n}\r\n\r\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\r\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\r\n\r\n#define Material_LightProbeLOD( material )\t(0)\r\n",lights_physical_fragment:"PhysicalMaterial material;\r\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\r\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\r\n#ifdef STANDARD\r\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\r\n#else\r\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\r\n\tmaterial.clearCoat = saturate( clearCoat ); // Burley clearcoat model\r\n\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\r\n#endif\r\n",lights_physical_pars_fragment:"struct PhysicalMaterial {\r\n\r\n\tvec3\tdiffuseColor;\r\n\tfloat\tspecularRoughness;\r\n\tvec3\tspecularColor;\r\n\r\n\t#ifndef STANDARD\r\n\t\tfloat clearCoat;\r\n\t\tfloat clearCoatRoughness;\r\n\t#endif\r\n\r\n};\r\n\r\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\r\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\r\n\r\n// Clear coat directional hemishperical reflectance (this approximation should be improved)\r\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\r\n\r\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\r\n\r\n}\r\n\r\n#if NUM_RECT_AREA_LIGHTS > 0\r\n\r\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\r\n\r\n\t\tvec3 normal = geometry.normal;\r\n\t\tvec3 viewDir = geometry.viewDir;\r\n\t\tvec3 position = geometry.position;\r\n\t\tvec3 lightPos = rectAreaLight.position;\r\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\r\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\r\n\t\tvec3 lightColor = rectAreaLight.color;\r\n\t\tfloat roughness = material.specularRoughness;\r\n\r\n\t\tvec3 rectCoords[ 4 ];\r\n\t\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight; // counterclockwise\r\n\t\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\r\n\t\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\r\n\t\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\r\n\r\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\r\n\r\n\t\tvec4 t1 = texture2D( ltc_1, uv );\r\n\t\tvec4 t2 = texture2D( ltc_2, uv );\r\n\r\n\t\tmat3 mInv = mat3(\r\n\t\t\tvec3( t1.x, 0, t1.y ),\r\n\t\t\tvec3( 0, 1, 0 ),\r\n\t\t\tvec3( t1.z, 0, t1.w )\r\n\t\t);\r\n\r\n\t\t// LTC Fresnel Approximation by Stephen Hill\r\n\t\t// http://blog.selfshadow.com/publications/s2016-advances/s2016_ltc_fresnel.pdf\r\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\r\n\r\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\r\n\r\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\r\n\r\n\t}\r\n\r\n#endif\r\n\r\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\r\n\r\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\r\n\r\n\tvec3 irradiance = dotNL * directLight.color;\r\n\r\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\r\n\r\n\t\tirradiance *= PI; // punctual light\r\n\r\n\t#endif\r\n\r\n\t#ifndef STANDARD\r\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\r\n\t#else\r\n\t\tfloat clearCoatDHR = 0.0;\r\n\t#endif\r\n\r\n\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\r\n\r\n\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\r\n\r\n\t#ifndef STANDARD\r\n\r\n\t\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\r\n\r\n\t#endif\r\n\r\n}\r\n\r\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\r\n\r\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\r\n\r\n}\r\n\r\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\r\n\r\n\t#ifndef STANDARD\r\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\r\n\t\tfloat dotNL = dotNV;\r\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\r\n\t#else\r\n\t\tfloat clearCoatDHR = 0.0;\r\n\t#endif\r\n\r\n\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\r\n\r\n\t#ifndef STANDARD\r\n\r\n\t\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\r\n\r\n\t#endif\r\n\r\n}\r\n\r\n#define RE_Direct\t\t\t\tRE_Direct_Physical\r\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\r\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\r\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\r\n\r\n#define Material_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.specularRoughness )\r\n#define Material_ClearCoat_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\r\n\r\n// ref: https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\r\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\r\n\r\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\r\n\r\n}\r\n",lights_template:"\r\n\r\nGeometricContext geometry;\r\n\r\ngeometry.position = - vViewPosition;\r\ngeometry.normal = normal;\r\ngeometry.viewDir = normalize( vViewPosition );\r\n\r\nIncidentLight directLight;\r\n\r\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\r\n\r\n\tPointLight pointLight;\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\r\n\r\n\t\tpointLight = pointLights[ i ];\r\n\r\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\r\n\r\n\t\t#ifdef USE_SHADOWMAP\r\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\r\n\t\t#endif\r\n\r\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\r\n\r\n\t}\r\n\r\n#endif\r\n\r\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\r\n\r\n\tSpotLight spotLight;\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\r\n\r\n\t\tspotLight = spotLights[ i ];\r\n\r\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\r\n\r\n\t\t#ifdef USE_SHADOWMAP\r\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\r\n\t\t#endif\r\n\r\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\r\n\r\n\t}\r\n\r\n#endif\r\n\r\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\r\n\r\n\tDirectionalLight directionalLight;\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\r\n\r\n\t\tdirectionalLight = directionalLights[ i ];\r\n\r\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\r\n\r\n\t\t#ifdef USE_SHADOWMAP\r\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\r\n\t\t#endif\r\n\r\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\r\n\r\n\t}\r\n\r\n#endif\r\n\r\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\r\n\r\n\tRectAreaLight rectAreaLight;\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\r\n\r\n\t\trectAreaLight = rectAreaLights[ i ];\r\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\r\n\r\n\t}\r\n\r\n#endif\r\n\r\n#if defined( RE_IndirectDiffuse )\r\n\r\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\r\n\r\n\t#ifdef USE_LIGHTMAP\r\n\r\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\r\n\r\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\r\n\r\n\t\t\tlightMapIrradiance *= PI; // factor of PI should not be present; included here to prevent breakage\r\n\r\n\t\t#endif\r\n\r\n\t\tirradiance += lightMapIrradiance;\r\n\r\n\t#endif\r\n\r\n\t#if ( NUM_HEMI_LIGHTS > 0 )\r\n\r\n\t\t#pragma unroll_loop\r\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\r\n\r\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\r\n\r\n\t\t}\r\n\r\n\t#endif\r\n\r\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\r\n\r\n\t\t// TODO, replace 8 with the real maxMIPLevel\r\n\t\tirradiance += getLightProbeIndirectIrradiance( geometry, 8 );\r\n\r\n\t#endif\r\n\r\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\r\n\r\n#endif\r\n\r\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\r\n\r\n\t// TODO, replace 8 with the real maxMIPLevel\r\n\tvec3 radiance = getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), 8 );\r\n\r\n\t#ifndef STANDARD\r\n\t\tvec3 clearCoatRadiance = getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), 8 );\r\n\t#else\r\n\t\tvec3 clearCoatRadiance = vec3( 0.0 );\r\n\t#endif\r\n\r\n\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\r\n\r\n#endif\r\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\r\n\r\n\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\r\n\r\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\r\n\r\n\tuniform float logDepthBufFC;\r\n\r\n\t#ifdef USE_LOGDEPTHBUF_EXT\r\n\r\n\t\tvarying float vFragDepth;\r\n\r\n\t#endif\r\n\r\n#endif\r\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\r\n\r\n\t#ifdef USE_LOGDEPTHBUF_EXT\r\n\r\n\t\tvarying float vFragDepth;\r\n\r\n\t#endif\r\n\r\n\tuniform float logDepthBufFC;\r\n\r\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\r\n\r\n\t#ifdef USE_LOGDEPTHBUF_EXT\r\n\r\n\t\tvFragDepth = 1.0 + gl_Position.w;\r\n\r\n\t#else\r\n\r\n\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\r\n\r\n\t\tgl_Position.z *= gl_Position.w;\r\n\r\n\t#endif\r\n\r\n#endif\r\n",map_fragment:"#ifdef USE_MAP\r\n\r\n\tvec4 texelColor = texture2D( map, vUv );\r\n\r\n\ttexelColor = mapTexelToLinear( texelColor );\r\n\tdiffuseColor *= texelColor;\r\n\r\n#endif\r\n",map_pars_fragment:"#ifdef USE_MAP\r\n\r\n\tuniform sampler2D map;\r\n\r\n#endif\r\n",map_particle_fragment:"#ifdef USE_MAP\r\n\r\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\r\n\tvec4 mapTexel = texture2D( map, uv );\r\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\r\n\r\n#endif\r\n",map_particle_pars_fragment:"#ifdef USE_MAP\r\n\r\n\tuniform mat3 uvTransform;\r\n\tuniform sampler2D map;\r\n\r\n#endif\r\n",metalnessmap_fragment:"float metalnessFactor = metalness;\r\n\r\n#ifdef USE_METALNESSMAP\r\n\r\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\r\n\r\n\t// reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\r\n\tmetalnessFactor *= texelMetalness.b;\r\n\r\n#endif\r\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\r\n\r\n\tuniform sampler2D metalnessMap;\r\n\r\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\r\n\r\n\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\r\n\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\r\n\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\r\n\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\r\n\r\n#endif\r\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\r\n\r\n\t#ifndef USE_MORPHNORMALS\r\n\r\n\tuniform float morphTargetInfluences[ 8 ];\r\n\r\n\t#else\r\n\r\n\tuniform float morphTargetInfluences[ 4 ];\r\n\r\n\t#endif\r\n\r\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\r\n\r\n\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\r\n\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\r\n\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\r\n\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\r\n\r\n\t#ifndef USE_MORPHNORMALS\r\n\r\n\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\r\n\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\r\n\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\r\n\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\r\n\r\n\t#endif\r\n\r\n#endif\r\n",normal_fragment:"#ifdef FLAT_SHADED\r\n\r\n\t// Workaround for Adreno/Nexus5 not able able to do dFdx( vViewPosition ) ...\r\n\r\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\r\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\r\n\tvec3 normal = normalize( cross( fdx, fdy ) );\r\n\r\n#else\r\n\r\n\tvec3 normal = normalize( vNormal );\r\n\r\n\t#ifdef DOUBLE_SIDED\r\n\r\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\r\n\r\n\t#endif\r\n\r\n#endif\r\n\r\n#ifdef USE_NORMALMAP\r\n\r\n\tnormal = perturbNormal2Arb( -vViewPosition, normal );\r\n\r\n#elif defined( USE_BUMPMAP )\r\n\r\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\r\n\r\n#endif\r\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\r\n\r\n\tuniform sampler2D normalMap;\r\n\tuniform vec2 normalScale;\r\n\r\n\t// Per-Pixel Tangent Space Normal Mapping\r\n\t// http://hacksoflife.blogspot.ch/2009/11/per-pixel-tangent-space-normal-mapping.html\r\n\r\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\r\n\r\n\t\t// Workaround for Adreno 3XX dFd*( vec3 ) bug. See #9988\r\n\r\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\r\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\r\n\t\tvec2 st0 = dFdx( vUv.st );\r\n\t\tvec2 st1 = dFdy( vUv.st );\r\n\r\n\t\tvec3 S = normalize( q0 * st1.t - q1 * st0.t );\r\n\t\tvec3 T = normalize( -q0 * st1.s + q1 * st0.s );\r\n\t\tvec3 N = normalize( surf_norm );\r\n\r\n\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\r\n\t\tmapN.xy = normalScale * mapN.xy;\r\n\t\tmat3 tsn = mat3( S, T, N );\r\n\t\treturn normalize( tsn * mapN );\r\n\r\n\t}\r\n\r\n#endif\r\n",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\r\n\treturn normalize( normal ) * 0.5 + 0.5;\r\n}\r\n\r\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\r\n\treturn 2.0 * rgb.xyz - 1.0;\r\n}\r\n\r\nconst float PackUpscale = 256. / 255.; // fraction -> 0..1 (including 1)\r\nconst float UnpackDownscale = 255. / 256.; // 0..1 -> fraction (excluding 1)\r\n\r\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\r\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\r\n\r\nconst float ShiftRight8 = 1. / 256.;\r\n\r\nvec4 packDepthToRGBA( const in float v ) {\r\n\tvec4 r = vec4( fract( v * PackFactors ), v );\r\n\tr.yzw -= r.xyz * ShiftRight8; // tidy overflow\r\n\treturn r * PackUpscale;\r\n}\r\n\r\nfloat unpackRGBAToDepth( const in vec4 v ) {\r\n\treturn dot( v, UnpackFactors );\r\n}\r\n\r\n// NOTE: viewZ/eyeZ is < 0 when in front of the camera per OpenGL conventions\r\n\r\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\r\n\treturn ( viewZ + near ) / ( near - far );\r\n}\r\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\r\n\treturn linearClipZ * ( near - far ) - near;\r\n}\r\n\r\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\r\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\r\n}\r\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\r\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\r\n}\r\n",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\r\n\r\n\t// Get get normal blending with premultipled, use with CustomBlending, OneFactor, OneMinusSrcAlphaFactor, AddEquation.\r\n\tgl_FragColor.rgb *= gl_FragColor.a;\r\n\r\n#endif\r\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\r\n\r\ngl_Position = projectionMatrix * mvPosition;\r\n",dithering_fragment:"#if defined( DITHERING )\r\n\r\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\r\n\r\n#endif\r\n",dithering_pars_fragment:"#if defined( DITHERING )\r\n\r\n\t// based on https://www.shadertoy.com/view/MslGR8\r\n\tvec3 dithering( vec3 color ) {\r\n\t\t//Calculate grid position\r\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\r\n\r\n\t\t//Shift the individual colors differently, thus making it even harder to see the dithering pattern\r\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\r\n\r\n\t\t//modify shift acording to grid position.\r\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\r\n\r\n\t\t//shift the color by dither_shift\r\n\t\treturn color + dither_shift_RGB;\r\n\t}\r\n\r\n#endif\r\n",roughnessmap_fragment:"float roughnessFactor = roughness;\r\n\r\n#ifdef USE_ROUGHNESSMAP\r\n\r\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\r\n\r\n\t// reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\r\n\troughnessFactor *= texelRoughness.g;\r\n\r\n#endif\r\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\r\n\r\n\tuniform sampler2D roughnessMap;\r\n\r\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\r\n\r\n\t#if NUM_DIR_LIGHTS > 0\r\n\r\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\r\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\r\n\r\n\t#endif\r\n\r\n\t#if NUM_SPOT_LIGHTS > 0\r\n\r\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\r\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\r\n\r\n\t#endif\r\n\r\n\t#if NUM_POINT_LIGHTS > 0\r\n\r\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\r\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\r\n\r\n\t#endif\r\n\r\n\r\n\r\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\r\n\r\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\r\n\r\n\t}\r\n\r\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\r\n\r\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\r\n\r\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\r\n\t\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\r\n\r\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\r\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\r\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\r\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\r\n\r\n\t\tvec2 f = fract( uv * size + 0.5 );\r\n\r\n\t\tfloat a = mix( lb, lt, f.y );\r\n\t\tfloat b = mix( rb, rt, f.y );\r\n\t\tfloat c = mix( a, b, f.x );\r\n\r\n\t\treturn c;\r\n\r\n\t}\r\n\r\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\r\n\r\n\t\tfloat shadow = 1.0;\r\n\r\n\t\tshadowCoord.xyz /= shadowCoord.w;\r\n\t\tshadowCoord.z += shadowBias;\r\n\r\n\t\t// if ( something && something ) breaks ATI OpenGL shader compiler\r\n\t\t// if ( all( something, something ) ) using this instead\r\n\r\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\r\n\t\tbool inFrustum = all( inFrustumVec );\r\n\r\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\r\n\r\n\t\tbool frustumTest = all( frustumTestVec );\r\n\r\n\t\tif ( frustumTest ) {\r\n\r\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\r\n\r\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\r\n\r\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\r\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\r\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\r\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\r\n\r\n\t\t\tshadow = (\r\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\r\n\t\t\t) * ( 1.0 / 9.0 );\r\n\r\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\r\n\r\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\r\n\r\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\r\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\r\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\r\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\r\n\r\n\t\t\tshadow = (\r\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\r\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\r\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\r\n\t\t\t) * ( 1.0 / 9.0 );\r\n\r\n\t\t#else // no percentage-closer filtering:\r\n\r\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\r\n\r\n\t\t#endif\r\n\r\n\t\t}\r\n\r\n\t\treturn shadow;\r\n\r\n\t}\r\n\r\n\t// cubeToUV() maps a 3D direction vector suitable for cube texture mapping to a 2D\r\n\t// vector suitable for 2D texture mapping. This code uses the following layout for the\r\n\t// 2D texture:\r\n\t//\r\n\t// xzXZ\r\n\t// y Y\r\n\t//\r\n\t// Y - Positive y direction\r\n\t// y - Negative y direction\r\n\t// X - Positive x direction\r\n\t// x - Negative x direction\r\n\t// Z - Positive z direction\r\n\t// z - Negative z direction\r\n\t//\r\n\t// Source and test bed:\r\n\t// https://gist.github.com/tschw/da10c43c467ce8afd0c4\r\n\r\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\r\n\r\n\t\t// Number of texels to avoid at the edge of each square\r\n\r\n\t\tvec3 absV = abs( v );\r\n\r\n\t\t// Intersect unit cube\r\n\r\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\r\n\t\tabsV *= scaleToCube;\r\n\r\n\t\t// Apply scale to avoid seams\r\n\r\n\t\t// two texels less per square (one texel will do for NEAREST)\r\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\r\n\r\n\t\t// Unwrap\r\n\r\n\t\t// space: -1 ... 1 range for each square\r\n\t\t//\r\n\t\t// #X##\t\tdim := ( 4 , 2 )\r\n\t\t// # #\t\tcenter := ( 1 , 1 )\r\n\r\n\t\tvec2 planar = v.xy;\r\n\r\n\t\tfloat almostATexel = 1.5 * texelSizeY;\r\n\t\tfloat almostOne = 1.0 - almostATexel;\r\n\r\n\t\tif ( absV.z >= almostOne ) {\r\n\r\n\t\t\tif ( v.z > 0.0 )\r\n\t\t\t\tplanar.x = 4.0 - v.x;\r\n\r\n\t\t} else if ( absV.x >= almostOne ) {\r\n\r\n\t\t\tfloat signX = sign( v.x );\r\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\r\n\r\n\t\t} else if ( absV.y >= almostOne ) {\r\n\r\n\t\t\tfloat signY = sign( v.y );\r\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\r\n\t\t\tplanar.y = v.z * signY - 2.0;\r\n\r\n\t\t}\r\n\r\n\t\t// Transform to UV space\r\n\r\n\t\t// scale := 0.5 / dim\r\n\t\t// translate := ( center + 0.5 ) / dim\r\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\r\n\r\n\t}\r\n\r\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\r\n\r\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\r\n\r\n\t\t// for point lights, the uniform @vShadowCoord is re-purposed to hold\r\n\t\t// the vector from the light to the world-space position of the fragment.\r\n\t\tvec3 lightToPosition = shadowCoord.xyz;\r\n\r\n\t\t// dp = normalized distance from light to fragment position\r\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); // need to clamp?\r\n\t\tdp += shadowBias;\r\n\r\n\t\t// bd3D = base direction 3D\r\n\t\tvec3 bd3D = normalize( lightToPosition );\r\n\r\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\r\n\r\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\r\n\r\n\t\t\treturn (\r\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\r\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\r\n\t\t\t) * ( 1.0 / 9.0 );\r\n\r\n\t\t#else // no percentage-closer filtering\r\n\r\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\r\n\r\n\t\t#endif\r\n\r\n\t}\r\n\r\n#endif\r\n",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\r\n\r\n\t#if NUM_DIR_LIGHTS > 0\r\n\r\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\r\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\r\n\r\n\t#endif\r\n\r\n\t#if NUM_SPOT_LIGHTS > 0\r\n\r\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\r\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\r\n\r\n\t#endif\r\n\r\n\t#if NUM_POINT_LIGHTS > 0\r\n\r\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\r\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\r\n\r\n\t#endif\r\n\r\n\r\n\r\n#endif\r\n",shadowmap_vertex:"#ifdef USE_SHADOWMAP\r\n\r\n\t#if NUM_DIR_LIGHTS > 0\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\r\n\r\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\r\n\r\n\t}\r\n\r\n\t#endif\r\n\r\n\t#if NUM_SPOT_LIGHTS > 0\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\r\n\r\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\r\n\r\n\t}\r\n\r\n\t#endif\r\n\r\n\t#if NUM_POINT_LIGHTS > 0\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\r\n\r\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\r\n\r\n\t}\r\n\r\n\t#endif\r\n\r\n\r\n\r\n#endif\r\n",shadowmask_pars_fragment:"float getShadowMask() {\r\n\r\n\tfloat shadow = 1.0;\r\n\r\n\t#ifdef USE_SHADOWMAP\r\n\r\n\t#if NUM_DIR_LIGHTS > 0\r\n\r\n\tDirectionalLight directionalLight;\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\r\n\r\n\t\tdirectionalLight = directionalLights[ i ];\r\n\t\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\r\n\r\n\t}\r\n\r\n\t#endif\r\n\r\n\t#if NUM_SPOT_LIGHTS > 0\r\n\r\n\tSpotLight spotLight;\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\r\n\r\n\t\tspotLight = spotLights[ i ];\r\n\t\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\r\n\r\n\t}\r\n\r\n\t#endif\r\n\r\n\t#if NUM_POINT_LIGHTS > 0\r\n\r\n\tPointLight pointLight;\r\n\r\n\t#pragma unroll_loop\r\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\r\n\r\n\t\tpointLight = pointLights[ i ];\r\n\t\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\r\n\r\n\t}\r\n\r\n\t#endif\r\n\r\n\r\n\r\n\t#endif\r\n\r\n\treturn shadow;\r\n\r\n}\r\n",skinbase_vertex:"#ifdef USE_SKINNING\r\n\r\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\r\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\r\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\r\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\r\n\r\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\r\n\r\n\tuniform mat4 bindMatrix;\r\n\tuniform mat4 bindMatrixInverse;\r\n\r\n\t#ifdef BONE_TEXTURE\r\n\r\n\t\tuniform sampler2D boneTexture;\r\n\t\tuniform int boneTextureSize;\r\n\r\n\t\tmat4 getBoneMatrix( const in float i ) {\r\n\r\n\t\t\tfloat j = i * 4.0;\r\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\r\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\r\n\r\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\r\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\r\n\r\n\t\t\ty = dy * ( y + 0.5 );\r\n\r\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\r\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\r\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\r\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\r\n\r\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\r\n\r\n\t\t\treturn bone;\r\n\r\n\t\t}\r\n\r\n\t#else\r\n\r\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\r\n\r\n\t\tmat4 getBoneMatrix( const in float i ) {\r\n\r\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\r\n\t\t\treturn bone;\r\n\r\n\t\t}\r\n\r\n\t#endif\r\n\r\n#endif\r\n",skinning_vertex:"#ifdef USE_SKINNING\r\n\r\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\r\n\r\n\tvec4 skinned = vec4( 0.0 );\r\n\tskinned += boneMatX * skinVertex * skinWeight.x;\r\n\tskinned += boneMatY * skinVertex * skinWeight.y;\r\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\r\n\tskinned += boneMatW * skinVertex * skinWeight.w;\r\n\r\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\r\n\r\n#endif\r\n",skinnormal_vertex:"#ifdef USE_SKINNING\r\n\r\n\tmat4 skinMatrix = mat4( 0.0 );\r\n\tskinMatrix += skinWeight.x * boneMatX;\r\n\tskinMatrix += skinWeight.y * boneMatY;\r\n\tskinMatrix += skinWeight.z * boneMatZ;\r\n\tskinMatrix += skinWeight.w * boneMatW;\r\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\r\n\r\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\r\n\r\n#endif\r\n",specularmap_fragment:"float specularStrength;\r\n\r\n#ifdef USE_SPECULARMAP\r\n\r\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\r\n\tspecularStrength = texelSpecular.r;\r\n\r\n#else\r\n\r\n\tspecularStrength = 1.0;\r\n\r\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\r\n\r\n\tuniform sampler2D specularMap;\r\n\r\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\r\n\r\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\r\n\r\n#endif\r\n",tonemapping_pars_fragment:"#ifndef saturate\r\n\t#define saturate(a) clamp( a, 0.0, 1.0 )\r\n#endif\r\n\r\nuniform float toneMappingExposure;\r\nuniform float toneMappingWhitePoint;\r\n\r\n// exposure only\r\nvec3 LinearToneMapping( vec3 color ) {\r\n\r\n\treturn toneMappingExposure * color;\r\n\r\n}\r\n\r\n// source: https://www.cs.utah.edu/~reinhard/cdrom/\r\nvec3 ReinhardToneMapping( vec3 color ) {\r\n\r\n\tcolor *= toneMappingExposure;\r\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\r\n\r\n}\r\n\r\n// source: http://filmicgames.com/archives/75\r\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\r\nvec3 Uncharted2ToneMapping( vec3 color ) {\r\n\r\n\t// John Hable's filmic operator from Uncharted 2 video game\r\n\tcolor *= toneMappingExposure;\r\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\r\n\r\n}\r\n\r\n// source: http://filmicgames.com/archives/75\r\nvec3 OptimizedCineonToneMapping( vec3 color ) {\r\n\r\n\t// optimized filmic operator by Jim Hejl and Richard Burgess-Dawson\r\n\tcolor *= toneMappingExposure;\r\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\r\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\r\n\r\n}\r\n",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\r\n\r\n\tvarying vec2 vUv;\r\n\r\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\r\n\r\n\tvarying vec2 vUv;\r\n\tuniform mat3 uvTransform;\r\n\r\n#endif\r\n",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\r\n\r\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\r\n\r\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\r\n\r\n\tvarying vec2 vUv2;\r\n\r\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\r\n\r\n\tattribute vec2 uv2;\r\n\tvarying vec2 vUv2;\r\n\r\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\r\n\r\n\tvUv2 = uv2;\r\n\r\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\r\n\r\n\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\r\n\r\n#endif\r\n",cube_frag:"uniform samplerCube tCube;\r\nuniform float tFlip;\r\nuniform float opacity;\r\n\r\nvarying vec3 vWorldPosition;\r\n\r\nvoid main() {\r\n\r\n\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\r\n\tgl_FragColor.a *= opacity;\r\n\r\n}\r\n",cube_vert:"varying vec3 vWorldPosition;\r\n\r\n#include <common>\r\n\r\nvoid main() {\r\n\r\n\tvWorldPosition = transformDirection( position, modelMatrix );\r\n\r\n\t#include <begin_vertex>\r\n\t#include <project_vertex>\r\n\r\n\tgl_Position.z = gl_Position.w; // set z to camera.far\r\n\r\n}\r\n",depth_frag:"#if DEPTH_PACKING == 3200\r\n\r\n\tuniform float opacity;\r\n\r\n#endif\r\n\r\n#include <common>\r\n#include <packing>\r\n#include <uv_pars_fragment>\r\n#include <map_pars_fragment>\r\n#include <alphamap_pars_fragment>\r\n#include <logdepthbuf_pars_fragment>\r\n#include <clipping_planes_pars_fragment>\r\n\r\nvoid main() {\r\n\r\n\t#include <clipping_planes_fragment>\r\n\r\n\tvec4 diffuseColor = vec4( 1.0 );\r\n\r\n\t#if DEPTH_PACKING == 3200\r\n\r\n\t\tdiffuseColor.a = opacity;\r\n\r\n\t#endif\r\n\r\n\t#include <map_fragment>\r\n\t#include <alphamap_fragment>\r\n\t#include <alphatest_fragment>\r\n\r\n\t#include <logdepthbuf_fragment>\r\n\r\n\t#if DEPTH_PACKING == 3200\r\n\r\n\t\tgl_FragColor = vec4( vec3( gl_FragCoord.z ), opacity );\r\n\r\n\t#elif DEPTH_PACKING == 3201\r\n\r\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\r\n\r\n\t#endif\r\n\r\n}\r\n",depth_vert:"#include <common>\r\n#include <uv_pars_vertex>\r\n#include <displacementmap_pars_vertex>\r\n#include <morphtarget_pars_vertex>\r\n#include <skinning_pars_vertex>\r\n#include <logdepthbuf_pars_vertex>\r\n#include <clipping_planes_pars_vertex>\r\n\r\nvoid main() {\r\n\r\n\t#include <uv_vertex>\r\n\r\n\t#include <skinbase_vertex>\r\n\r\n\t#ifdef USE_DISPLACEMENTMAP\r\n\r\n\t\t#include <beginnormal_vertex>\r\n\t\t#include <morphnormal_vertex>\r\n\t\t#include <skinnormal_vertex>\r\n\r\n\t#endif\r\n\r\n\t#include <begin_vertex>\r\n\t#include <morphtarget_vertex>\r\n\t#include <skinning_vertex>\r\n\t#include <displacementmap_vertex>\r\n\t#include <project_vertex>\r\n\t#include <logdepthbuf_vertex>\r\n\t#include <clipping_planes_vertex>\r\n\r\n}\r\n",distanceRGBA_frag:"#define DISTANCE\r\n\r\nuniform vec3 referencePosition;\r\nuniform float nearDistance;\r\nuniform float farDistance;\r\nvarying vec3 vWorldPosition;\r\n\r\n#include <common>\r\n#include <packing>\r\n#include <uv_pars_fragment>\r\n#include <map_pars_fragment>\r\n#include <alphamap_pars_fragment>\r\n#include <clipping_planes_pars_fragment>\r\n\r\nvoid main () {\r\n\r\n\t#include <clipping_planes_fragment>\r\n\r\n\tvec4 diffuseColor = vec4( 1.0 );\r\n\r\n\t#include <map_fragment>\r\n\t#include <alphamap_fragment>\r\n\t#include <alphatest_fragment>\r\n\r\n\tfloat dist = length( vWorldPosition - referencePosition );\r\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\r\n\tdist = saturate( dist ); // clamp to [ 0, 1 ]\r\n\r\n\tgl_FragColor = packDepthToRGBA( dist );\r\n\r\n}\r\n",distanceRGBA_vert:"#define DISTANCE\r\n\r\nvarying vec3 vWorldPosition;\r\n\r\n#include <common>\r\n#include <uv_pars_vertex>\r\n#include <displacementmap_pars_vertex>\r\n#include <morphtarget_pars_vertex>\r\n#include <skinning_pars_vertex>\r\n#include <clipping_planes_pars_vertex>\r\n\r\nvoid main() {\r\n\r\n\t#include <uv_vertex>\r\n\r\n\t#include <skinbase_vertex>\r\n\r\n\t#ifdef USE_DISPLACEMENTMAP\r\n\r\n\t\t#include <beginnormal_vertex>\r\n\t\t#include <morphnormal_vertex>\r\n\t\t#include <skinnormal_vertex>\r\n\r\n\t#endif\r\n\r\n\t#include <begin_vertex>\r\n\t#include <morphtarget_vertex>\r\n\t#include <skinning_vertex>\r\n\t#include <displacementmap_vertex>\r\n\t#include <project_vertex>\r\n\t#include <worldpos_vertex>\r\n\t#include <clipping_planes_vertex>\r\n\r\n\tvWorldPosition = worldPosition.xyz;\r\n\r\n}\r\n",equirect_frag:"uniform sampler2D tEquirect;\r\n\r\nvarying vec3 vWorldPosition;\r\n\r\n#include <common>\r\n\r\nvoid main() {\r\n\r\n\tvec3 direction = normalize( vWorldPosition );\r\n\r\n\tvec2 sampleUV;\r\n\r\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\r\n\r\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\r\n\r\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\r\n\r\n}\r\n",equirect_vert:"varying vec3 vWorldPosition;\r\n\r\n#include <common>\r\n\r\nvoid main() {\r\n\r\n\tvWorldPosition = transformDirection( position, modelMatrix );\r\n\r\n\t#include <begin_vertex>\r\n\t#include <project_vertex>\r\n\r\n}\r\n",linedashed_frag:"uniform vec3 diffuse;\r\nuniform float opacity;\r\n\r\nuniform float dashSize;\r\nuniform float totalSize;\r\n\r\nvarying float vLineDistance;\r\n\r\n#include <common>\r\n#include <color_pars_fragment>\r\n#include <fog_pars_fragment>\r\n#include <logdepthbuf_pars_fragment>\r\n#include <clipping_planes_pars_fragment>\r\n\r\nvoid main() {\r\n\r\n\t#include <clipping_planes_fragment>\r\n\r\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\r\n\r\n\t\tdiscard;\r\n\r\n\t}\r\n\r\n\tvec3 outgoingLight = vec3( 0.0 );\r\n\tvec4 diffuseColor = vec4( diffuse, opacity );\r\n\r\n\t#include <logdepthbuf_fragment>\r\n\t#include <color_fragment>\r\n\r\n\toutgoingLight = diffuseColor.rgb; // simple shader\r\n\r\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\r\n\r\n\t#include <premultiplied_alpha_fragment>\r\n\t#include <tonemapping_fragment>\r\n\t#include <encodings_fragment>\r\n\t#include <fog_fragment>\r\n\r\n}\r\n",linedashed_vert:"uniform float scale;\r\nattribute float lineDistance;\r\n\r\nvarying float vLineDistance;\r\n\r\n#include <common>\r\n#include <color_pars_vertex>\r\n#include <fog_pars_vertex>\r\n#include <logdepthbuf_pars_vertex>\r\n#include <clipping_planes_pars_vertex>\r\n\r\nvoid main() {\r\n\r\n\t#include <color_vertex>\r\n\r\n\tvLineDistance = scale * lineDistance;\r\n\r\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\r\n\tgl_Position = projectionMatrix * mvPosition;\r\n\r\n\t#include <logdepthbuf_vertex>\r\n\t#include <clipping_planes_vertex>\r\n\t#include <fog_vertex>\r\n\r\n}\r\n",meshbasic_frag:"uniform vec3 diffuse;\r\nuniform float opacity;\r\n\r\n#ifndef FLAT_SHADED\r\n\r\n\tvarying vec3 vNormal;\r\n\r\n#endif\r\n\r\n#include <common>\r\n#include <color_pars_fragment>\r\n#include <uv_pars_fragment>\r\n#include <uv2_pars_fragment>\r\n#include <map_pars_fragment>\r\n#include <alphamap_pars_fragment>\r\n#include <aomap_pars_fragment>\r\n#include <lightmap_pars_fragment>\r\n#include <envmap_pars_fragment>\r\n#include <fog_pars_fragment>\r\n#include <specularmap_pars_fragment>\r\n#include <logdepthbuf_pars_fragment>\r\n#include <clipping_planes_pars_fragment>\r\n\r\nvoid main() {\r\n\r\n\t#include <clipping_planes_fragment>\r\n\r\n\tvec4 diffuseColor = vec4( diffuse, opacity );\r\n\r\n\t#include <logdepthbuf_fragment>\r\n\t#include <map_fragment>\r\n\t#include <color_fragment>\r\n\t#include <alphamap_fragment>\r\n\t#include <alphatest_fragment>\r\n\t#include <specularmap_fragment>\r\n\r\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\r\n\r\n\t// accumulation (baked indirect lighting only)\r\n\t#ifdef USE_LIGHTMAP\r\n\r\n\t\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\r\n\r\n\t#else\r\n\r\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\r\n\r\n\t#endif\r\n\r\n\t// modulation\r\n\t#include <aomap_fragment>\r\n\r\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\r\n\r\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\r\n\r\n\t#include <envmap_fragment>\r\n\r\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\r\n\r\n\t#include <premultiplied_alpha_fragment>\r\n\t#include <tonemapping_fragment>\r\n\t#include <encodings_fragment>\r\n\t#include <fog_fragment>\r\n\r\n}\r\n",meshbasic_vert:"#include <common>\r\n#include <uv_pars_vertex>\r\n#include <uv2_pars_vertex>\r\n#include <envmap_pars_vertex>\r\n#include <color_pars_vertex>\r\n#include <fog_pars_vertex>\r\n#include <morphtarget_pars_vertex>\r\n#include <skinning_pars_vertex>\r\n#include <logdepthbuf_pars_vertex>\r\n#include <clipping_planes_pars_vertex>\r\n\r\nvoid main() {\r\n\r\n\t#include <uv_vertex>\r\n\t#include <uv2_vertex>\r\n\t#include <color_vertex>\r\n\t#include <skinbase_vertex>\r\n\r\n\t#ifdef USE_ENVMAP\r\n\r\n\t#include <beginnormal_vertex>\r\n\t#include <morphnormal_vertex>\r\n\t#include <skinnormal_vertex>\r\n\t#include <defaultnormal_vertex>\r\n\r\n\t#endif\r\n\r\n\t#include <begin_vertex>\r\n\t#include <morphtarget_vertex>\r\n\t#include <skinning_vertex>\r\n\t#include <project_vertex>\r\n\t#include <logdepthbuf_vertex>\r\n\r\n\t#include <worldpos_vertex>\r\n\t#include <clipping_planes_vertex>\r\n\t#include <envmap_vertex>\r\n\t#include <fog_vertex>\r\n\r\n}\r\n",meshlambert_frag:"uniform vec3 diffuse;\r\nuniform vec3 emissive;\r\nuniform float opacity;\r\n\r\nvarying vec3 vLightFront;\r\n\r\n#ifdef DOUBLE_SIDED\r\n\r\n\tvarying vec3 vLightBack;\r\n\r\n#endif\r\n\r\n#include <common>\r\n#include <packing>\r\n#include <dithering_pars_fragment>\r\n#include <color_pars_fragment>\r\n#include <uv_pars_fragment>\r\n#include <uv2_pars_fragment>\r\n#include <map_pars_fragment>\r\n#include <alphamap_pars_fragment>\r\n#include <aomap_pars_fragment>\r\n#include <lightmap_pars_fragment>\r\n#include <emissivemap_pars_fragment>\r\n#include <envmap_pars_fragment>\r\n#include <bsdfs>\r\n#include <lights_pars>\r\n#include <fog_pars_fragment>\r\n#include <shadowmap_pars_fragment>\r\n#include <shadowmask_pars_fragment>\r\n#include <specularmap_pars_fragment>\r\n#include <logdepthbuf_pars_fragment>\r\n#include <clipping_planes_pars_fragment>\r\n\r\nvoid main() {\r\n\r\n\t#include <clipping_planes_fragment>\r\n\r\n\tvec4 diffuseColor = vec4( diffuse, opacity );\r\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\r\n\tvec3 totalEmissiveRadiance = emissive;\r\n\r\n\t#include <logdepthbuf_fragment>\r\n\t#include <map_fragment>\r\n\t#include <color_fragment>\r\n\t#include <alphamap_fragment>\r\n\t#include <alphatest_fragment>\r\n\t#include <specularmap_fragment>\r\n\t#include <emissivemap_fragment>\r\n\r\n\t// accumulation\r\n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\r\n\r\n\t#include <lightmap_fragment>\r\n\r\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\r\n\r\n\t#ifdef DOUBLE_SIDED\r\n\r\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\r\n\r\n\t#else\r\n\r\n\t\treflectedLight.directDiffuse = vLightFront;\r\n\r\n\t#endif\r\n\r\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\r\n\r\n\t// modulation\r\n\t#include <aomap_fragment>\r\n\r\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\r\n\r\n\t#include <envmap_fragment>\r\n\r\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\r\n\r\n\t#include <tonemapping_fragment>\r\n\t#include <encodings_fragment>\r\n\t#include <fog_fragment>\r\n\t#include <premultiplied_alpha_fragment>\r\n\t#include <dithering_fragment>\r\n\r\n}\r\n",meshlambert_vert:"#define LAMBERT\r\n\r\nvarying vec3 vLightFront;\r\n\r\n#ifdef DOUBLE_SIDED\r\n\r\n\tvarying vec3 vLightBack;\r\n\r\n#endif\r\n\r\n#include <common>\r\n#include <uv_pars_vertex>\r\n#include <uv2_pars_vertex>\r\n#include <envmap_pars_vertex>\r\n#include <bsdfs>\r\n#include <lights_pars>\r\n#include <color_pars_vertex>\r\n#include <fog_pars_vertex>\r\n#include <morphtarget_pars_vertex>\r\n#include <skinning_pars_vertex>\r\n#include <shadowmap_pars_vertex>\r\n#include <logdepthbuf_pars_vertex>\r\n#include <clipping_planes_pars_vertex>\r\n\r\nvoid main() {\r\n\r\n\t#include <uv_vertex>\r\n\t#include <uv2_vertex>\r\n\t#include <color_vertex>\r\n\r\n\t#include <beginnormal_vertex>\r\n\t#include <morphnormal_vertex>\r\n\t#include <skinbase_vertex>\r\n\t#include <skinnormal_vertex>\r\n\t#include <defaultnormal_vertex>\r\n\r\n\t#include <begin_vertex>\r\n\t#include <morphtarget_vertex>\r\n\t#include <skinning_vertex>\r\n\t#include <project_vertex>\r\n\t#include <logdepthbuf_vertex>\r\n\t#include <clipping_planes_vertex>\r\n\r\n\t#include <worldpos_vertex>\r\n\t#include <envmap_vertex>\r\n\t#include <lights_lambert_vertex>\r\n\t#include <shadowmap_vertex>\r\n\t#include <fog_vertex>\r\n\r\n}\r\n",meshphong_frag:"#define PHONG\r\n\r\nuniform vec3 diffuse;\r\nuniform vec3 emissive;\r\nuniform vec3 specular;\r\nuniform float shininess;\r\nuniform float opacity;\r\n\r\n#include <common>\r\n#include <packing>\r\n#include <dithering_pars_fragment>\r\n#include <color_pars_fragment>\r\n#include <uv_pars_fragment>\r\n#include <uv2_pars_fragment>\r\n#include <map_pars_fragment>\r\n#include <alphamap_pars_fragment>\r\n#include <aomap_pars_fragment>\r\n#include <lightmap_pars_fragment>\r\n#include <emissivemap_pars_fragment>\r\n#include <envmap_pars_fragment>\r\n#include <gradientmap_pars_fragment>\r\n#include <fog_pars_fragment>\r\n#include <bsdfs>\r\n#include <lights_pars>\r\n#include <lights_phong_pars_fragment>\r\n#include <shadowmap_pars_fragment>\r\n#include <bumpmap_pars_fragment>\r\n#include <normalmap_pars_fragment>\r\n#include <specularmap_pars_fragment>\r\n#include <logdepthbuf_pars_fragment>\r\n#include <clipping_planes_pars_fragment>\r\n\r\nvoid main() {\r\n\r\n\t#include <clipping_planes_fragment>\r\n\r\n\tvec4 diffuseColor = vec4( diffuse, opacity );\r\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\r\n\tvec3 totalEmissiveRadiance = emissive;\r\n\r\n\t#include <logdepthbuf_fragment>\r\n\t#include <map_fragment>\r\n\t#include <color_fragment>\r\n\t#include <alphamap_fragment>\r\n\t#include <alphatest_fragment>\r\n\t#include <specularmap_fragment>\r\n\t#include <normal_fragment>\r\n\t#include <emissivemap_fragment>\r\n\r\n\t// accumulation\r\n\t#include <lights_phong_fragment>\r\n\t#include <lights_template>\r\n\r\n\t// modulation\r\n\t#include <aomap_fragment>\r\n\r\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\r\n\r\n\t#include <envmap_fragment>\r\n\r\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\r\n\r\n\t#include <tonemapping_fragment>\r\n\t#include <encodings_fragment>\r\n\t#include <fog_fragment>\r\n\t#include <premultiplied_alpha_fragment>\r\n\t#include <dithering_fragment>\r\n\r\n}\r\n",meshphong_vert:"#define PHONG\r\n\r\nvarying vec3 vViewPosition;\r\n\r\n#ifndef FLAT_SHADED\r\n\r\n\tvarying vec3 vNormal;\r\n\r\n#endif\r\n\r\n#include <common>\r\n#include <uv_pars_vertex>\r\n#include <uv2_pars_vertex>\r\n#include <displacementmap_pars_vertex>\r\n#include <envmap_pars_vertex>\r\n#include <color_pars_vertex>\r\n#include <fog_pars_vertex>\r\n#include <morphtarget_pars_vertex>\r\n#include <skinning_pars_vertex>\r\n#include <shadowmap_pars_vertex>\r\n#include <logdepthbuf_pars_vertex>\r\n#include <clipping_planes_pars_vertex>\r\n\r\nvoid main() {\r\n\r\n\t#include <uv_vertex>\r\n\t#include <uv2_vertex>\r\n\t#include <color_vertex>\r\n\r\n\t#include <beginnormal_vertex>\r\n\t#include <morphnormal_vertex>\r\n\t#include <skinbase_vertex>\r\n\t#include <skinnormal_vertex>\r\n\t#include <defaultnormal_vertex>\r\n\r\n#ifndef FLAT_SHADED // Normal computed with derivatives when FLAT_SHADED\r\n\r\n\tvNormal = normalize( transformedNormal );\r\n\r\n#endif\r\n\r\n\t#include <begin_vertex>\r\n\t#include <morphtarget_vertex>\r\n\t#include <skinning_vertex>\r\n\t#include <displacementmap_vertex>\r\n\t#include <project_vertex>\r\n\t#include <logdepthbuf_vertex>\r\n\t#include <clipping_planes_vertex>\r\n\r\n\tvViewPosition = - mvPosition.xyz;\r\n\r\n\t#include <worldpos_vertex>\r\n\t#include <envmap_vertex>\r\n\t#include <shadowmap_vertex>\r\n\t#include <fog_vertex>\r\n\r\n}\r\n",meshphysical_frag:"#define PHYSICAL\r\n\r\nuniform vec3 diffuse;\r\nuniform vec3 emissive;\r\nuniform float roughness;\r\nuniform float metalness;\r\nuniform float opacity;\r\n\r\n#ifndef STANDARD\r\n\tuniform float clearCoat;\r\n\tuniform float clearCoatRoughness;\r\n#endif\r\n\r\nvarying vec3 vViewPosition;\r\n\r\n#ifndef FLAT_SHADED\r\n\r\n\tvarying vec3 vNormal;\r\n\r\n#endif\r\n\r\n#include <common>\r\n#include <packing>\r\n#include <dithering_pars_fragment>\r\n#include <color_pars_fragment>\r\n#include <uv_pars_fragment>\r\n#include <uv2_pars_fragment>\r\n#include <map_pars_fragment>\r\n#include <alphamap_pars_fragment>\r\n#include <aomap_pars_fragment>\r\n#include <lightmap_pars_fragment>\r\n#include <emissivemap_pars_fragment>\r\n#include <envmap_pars_fragment>\r\n#include <fog_pars_fragment>\r\n#include <bsdfs>\r\n#include <cube_uv_reflection_fragment>\r\n#include <lights_pars>\r\n#include <lights_physical_pars_fragment>\r\n#include <shadowmap_pars_fragment>\r\n#include <bumpmap_pars_fragment>\r\n#include <normalmap_pars_fragment>\r\n#include <roughnessmap_pars_fragment>\r\n#include <metalnessmap_pars_fragment>\r\n#include <logdepthbuf_pars_fragment>\r\n#include <clipping_planes_pars_fragment>\r\n\r\nvoid main() {\r\n\r\n\t#include <clipping_planes_fragment>\r\n\r\n\tvec4 diffuseColor = vec4( diffuse, opacity );\r\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\r\n\tvec3 totalEmissiveRadiance = emissive;\r\n\r\n\t#include <logdepthbuf_fragment>\r\n\t#include <map_fragment>\r\n\t#include <color_fragment>\r\n\t#include <alphamap_fragment>\r\n\t#include <alphatest_fragment>\r\n\t#include <roughnessmap_fragment>\r\n\t#include <metalnessmap_fragment>\r\n\t#include <normal_fragment>\r\n\t#include <emissivemap_fragment>\r\n\r\n\t// accumulation\r\n\t#include <lights_physical_fragment>\r\n\t#include <lights_template>\r\n\r\n\t// modulation\r\n\t#include <aomap_fragment>\r\n\r\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\r\n\r\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\r\n\r\n\t#include <tonemapping_fragment>\r\n\t#include <encodings_fragment>\r\n\t#include <fog_fragment>\r\n\t#include <premultiplied_alpha_fragment>\r\n\t#include <dithering_fragment>\r\n\r\n}\r\n",meshphysical_vert:"#define PHYSICAL\r\n\r\nvarying vec3 vViewPosition;\r\n\r\n#ifndef FLAT_SHADED\r\n\r\n\tvarying vec3 vNormal;\r\n\r\n#endif\r\n\r\n#include <common>\r\n#include <uv_pars_vertex>\r\n#include <uv2_pars_vertex>\r\n#include <displacementmap_pars_vertex>\r\n#include <color_pars_vertex>\r\n#include <fog_pars_vertex>\r\n#include <morphtarget_pars_vertex>\r\n#include <skinning_pars_vertex>\r\n#include <shadowmap_pars_vertex>\r\n#include <logdepthbuf_pars_vertex>\r\n#include <clipping_planes_pars_vertex>\r\n\r\nvoid main() {\r\n\r\n\t#include <uv_vertex>\r\n\t#include <uv2_vertex>\r\n\t#include <color_vertex>\r\n\r\n\t#include <beginnormal_vertex>\r\n\t#include <morphnormal_vertex>\r\n\t#include <skinbase_vertex>\r\n\t#include <skinnormal_vertex>\r\n\t#include <defaultnormal_vertex>\r\n\r\n#ifndef FLAT_SHADED // Normal computed with derivatives when FLAT_SHADED\r\n\r\n\tvNormal = normalize( transformedNormal );\r\n\r\n#endif\r\n\r\n\t#include <begin_vertex>\r\n\t#include <morphtarget_vertex>\r\n\t#include <skinning_vertex>\r\n\t#include <displacementmap_vertex>\r\n\t#include <project_vertex>\r\n\t#include <logdepthbuf_vertex>\r\n\t#include <clipping_planes_vertex>\r\n\r\n\tvViewPosition = - mvPosition.xyz;\r\n\r\n\t#include <worldpos_vertex>\r\n\t#include <shadowmap_vertex>\r\n\t#include <fog_vertex>\r\n\r\n}\r\n",normal_frag:"#define NORMAL\r\n\r\nuniform float opacity;\r\n\r\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\r\n\r\n\tvarying vec3 vViewPosition;\r\n\r\n#endif\r\n\r\n#ifndef FLAT_SHADED\r\n\r\n\tvarying vec3 vNormal;\r\n\r\n#endif\r\n\r\n#include <packing>\r\n#include <uv_pars_fragment>\r\n#include <bumpmap_pars_fragment>\r\n#include <normalmap_pars_fragment>\r\n#include <logdepthbuf_pars_fragment>\r\n\r\nvoid main() {\r\n\r\n\t#include <logdepthbuf_fragment>\r\n\t#include <normal_fragment>\r\n\r\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\r\n\r\n}\r\n",normal_vert:"#define NORMAL\r\n\r\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\r\n\r\n\tvarying vec3 vViewPosition;\r\n\r\n#endif\r\n\r\n#ifndef FLAT_SHADED\r\n\r\n\tvarying vec3 vNormal;\r\n\r\n#endif\r\n\r\n#include <uv_pars_vertex>\r\n#include <displacementmap_pars_vertex>\r\n#include <morphtarget_pars_vertex>\r\n#include <skinning_pars_vertex>\r\n#include <logdepthbuf_pars_vertex>\r\n\r\nvoid main() {\r\n\r\n\t#include <uv_vertex>\r\n\r\n\t#include <beginnormal_vertex>\r\n\t#include <morphnormal_vertex>\r\n\t#include <skinbase_vertex>\r\n\t#include <skinnormal_vertex>\r\n\t#include <defaultnormal_vertex>\r\n\r\n#ifndef FLAT_SHADED // Normal computed with derivatives when FLAT_SHADED\r\n\r\n\tvNormal = normalize( transformedNormal );\r\n\r\n#endif\r\n\r\n\t#include <begin_vertex>\r\n\t#include <morphtarget_vertex>\r\n\t#include <skinning_vertex>\r\n\t#include <displacementmap_vertex>\r\n\t#include <project_vertex>\r\n\t#include <logdepthbuf_vertex>\r\n\r\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\r\n\r\n\tvViewPosition = - mvPosition.xyz;\r\n\r\n#endif\r\n\r\n}\r\n",points_frag:"uniform vec3 diffuse;\r\nuniform float opacity;\r\n\r\n#include <common>\r\n#include <packing>\r\n#include <color_pars_fragment>\r\n#include <map_particle_pars_fragment>\r\n#include <fog_pars_fragment>\r\n#include <shadowmap_pars_fragment>\r\n#include <logdepthbuf_pars_fragment>\r\n#include <clipping_planes_pars_fragment>\r\n\r\nvoid main() {\r\n\r\n\t#include <clipping_planes_fragment>\r\n\r\n\tvec3 outgoingLight = vec3( 0.0 );\r\n\tvec4 diffuseColor = vec4( diffuse, opacity );\r\n\r\n\t#include <logdepthbuf_fragment>\r\n\t#include <map_particle_fragment>\r\n\t#include <color_fragment>\r\n\t#include <alphatest_fragment>\r\n\r\n\toutgoingLight = diffuseColor.rgb;\r\n\r\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\r\n\r\n\t#include <premultiplied_alpha_fragment>\r\n\t#include <tonemapping_fragment>\r\n\t#include <encodings_fragment>\r\n\t#include <fog_fragment>\r\n\r\n}\r\n",points_vert:"uniform float size;\r\nuniform float scale;\r\n\r\n#include <common>\r\n#include <color_pars_vertex>\r\n#include <fog_pars_vertex>\r\n#include <shadowmap_pars_vertex>\r\n#include <logdepthbuf_pars_vertex>\r\n#include <clipping_planes_pars_vertex>\r\n\r\nvoid main() {\r\n\r\n\t#include <color_vertex>\r\n\t#include <begin_vertex>\r\n\t#include <project_vertex>\r\n\r\n\t#ifdef USE_SIZEATTENUATION\r\n\t\tgl_PointSize = size * ( scale / - mvPosition.z );\r\n\t#else\r\n\t\tgl_PointSize = size;\r\n\t#endif\r\n\r\n\t#include <logdepthbuf_vertex>\r\n\t#include <clipping_planes_vertex>\r\n\t#include <worldpos_vertex>\r\n\t#include <shadowmap_vertex>\r\n\t#include <fog_vertex>\r\n\r\n}\r\n",shadow_frag:"uniform vec3 color;\r\nuniform float opacity;\r\n\r\n#include <common>\r\n#include <packing>\r\n#include <fog_pars_fragment>\r\n#include <bsdfs>\r\n#include <lights_pars>\r\n#include <shadowmap_pars_fragment>\r\n#include <shadowmask_pars_fragment>\r\n\r\nvoid main() {\r\n\r\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\r\n\r\n\t#include <fog_fragment>\r\n\r\n}\r\n",shadow_vert:"#include <fog_pars_vertex>\r\n#include <shadowmap_pars_vertex>\r\n\r\nvoid main() {\r\n\r\n\t#include <begin_vertex>\r\n\t#include <project_vertex>\r\n\t#include <worldpos_vertex>\r\n\t#include <shadowmap_vertex>\r\n\t#include <fog_vertex>\r\n\r\n}\r\n"},ve={basic:{uniforms:ge.merge([me.common,me.specularmap,me.envmap,me.aomap,me.lightmap,me.fog]),vertexShader:ye.meshbasic_vert,fragmentShader:ye.meshbasic_frag},lambert:{uniforms:ge.merge([me.common,me.specularmap,me.envmap,me.aomap,me.lightmap,me.emissivemap,me.fog,me.lights,{emissive:{value:new fe(0)}}]),vertexShader:ye.meshlambert_vert,fragmentShader:ye.meshlambert_frag},phong:{uniforms:ge.merge([me.common,me.specularmap,me.envmap,me.aomap,me.lightmap,me.emissivemap,me.bumpmap,me.normalmap,me.displacementmap,me.gradientmap,me.fog,me.lights,{emissive:{value:new fe(0)},specular:{value:new fe(1118481)},shininess:{value:30}}]),vertexShader:ye.meshphong_vert,fragmentShader:ye.meshphong_frag},standard:{uniforms:ge.merge([me.common,me.envmap,me.aomap,me.lightmap,me.emissivemap,me.bumpmap,me.normalmap,me.displacementmap,me.roughnessmap,me.metalnessmap,me.fog,me.lights,{emissive:{value:new fe(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:ye.meshphysical_vert,fragmentShader:ye.meshphysical_frag},points:{uniforms:ge.merge([me.points,me.fog]),vertexShader:ye.points_vert,fragmentShader:ye.points_frag},dashed:{uniforms:ge.merge([me.common,me.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ye.linedashed_vert,fragmentShader:ye.linedashed_frag},depth:{uniforms:ge.merge([me.common,me.displacementmap]),vertexShader:ye.depth_vert,fragmentShader:ye.depth_frag},normal:{uniforms:ge.merge([me.common,me.bumpmap,me.normalmap,me.displacementmap,{opacity:{value:1}}]),vertexShader:ye.normal_vert,fragmentShader:ye.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:ye.cube_vert,fragmentShader:ye.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ye.equirect_vert,fragmentShader:ye.equirect_frag},distanceRGBA:{uniforms:ge.merge([me.common,me.displacementmap,{referencePosition:{value:new b},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:ye.distanceRGBA_vert,fragmentShader:ye.distanceRGBA_frag},shadow:{uniforms:ge.merge([me.lights,me.fog,{color:{value:new fe(0)},opacity:{value:1}}]),vertexShader:ye.shadow_vert,fragmentShader:ye.shadow_frag}};function be(e,t,n,r,i,o,a,s,c){E.call(this,e,t,n,r,i,o,a,s,c),this.needsUpdate=!0}function _e(e,t,n,r,i){var o,a,s,c,l,u,h=new b,d=new v,p=new b;function f(){var e=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),n=new Uint16Array([0,1,2,0,2,3]);o=t.createBuffer(),a=t.createBuffer(),t.bindBuffer(t.ARRAY_BUFFER,o),t.bufferData(t.ARRAY_BUFFER,e,t.STATIC_DRAW),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,a),t.bufferData(t.ELEMENT_ARRAY_BUFFER,n,t.STATIC_DRAW),s=function(){var e=t.createProgram(),n=t.createShader(t.VERTEX_SHADER),r=t.createShader(t.FRAGMENT_SHADER);return t.shaderSource(n,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 center;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float fogDepth;","void main() {","\tvUV = uvOffset + uv * uvScale;","\tvec2 alignedPosition = ( position - center ) * scale;","\tvec2 rotatedPosition;","\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","\tvec4 mvPosition;","\tmvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","\tmvPosition.xy += rotatedPosition;","\tgl_Position = projectionMatrix * mvPosition;","\tfogDepth = - mvPosition.z;","}"].join("\n")),t.shaderSource(r,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","varying float fogDepth;","void main() {","\tvec4 texture = texture2D( map, vUV );","\tgl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","\tif ( gl_FragColor.a < alphaTest ) discard;","\tif ( fogType > 0 ) {","\t\tfloat fogFactor = 0.0;","\t\tif ( fogType == 1 ) {","\t\t\tfogFactor = smoothstep( fogNear, fogFar, fogDepth );","\t\t} else {","\t\t\tconst float LOG2 = 1.442695;","\t\t\tfogFactor = exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 );","\t\t\tfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","\t\t}","\t\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );","\t}","}"].join("\n")),t.compileShader(n),t.compileShader(r),t.attachShader(e,n),t.attachShader(e,r),t.linkProgram(e),e}(),c={position:t.getAttribLocation(s,"position"),uv:t.getAttribLocation(s,"uv")},l={uvOffset:t.getUniformLocation(s,"uvOffset"),uvScale:t.getUniformLocation(s,"uvScale"),rotation:t.getUniformLocation(s,"rotation"),center:t.getUniformLocation(s,"center"),scale:t.getUniformLocation(s,"scale"),color:t.getUniformLocation(s,"color"),map:t.getUniformLocation(s,"map"),opacity:t.getUniformLocation(s,"opacity"),modelViewMatrix:t.getUniformLocation(s,"modelViewMatrix"),projectionMatrix:t.getUniformLocation(s,"projectionMatrix"),fogType:t.getUniformLocation(s,"fogType"),fogDensity:t.getUniformLocation(s,"fogDensity"),fogNear:t.getUniformLocation(s,"fogNear"),fogFar:t.getUniformLocation(s,"fogFar"),fogColor:t.getUniformLocation(s,"fogColor"),fogDepth:t.getUniformLocation(s,"fogDepth"),alphaTest:t.getUniformLocation(s,"alphaTest")};var r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=8,r.height=8;var h=r.getContext("2d");h.fillStyle="white",h.fillRect(0,0,8,8),u=new be(r)}function m(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:t.id-e.id}this.render=function(i,g,y){if(0!==i.length){void 0===s&&f(),n.useProgram(s),n.initAttributes(),n.enableAttribute(c.position),n.enableAttribute(c.uv),n.disableUnusedAttributes(),n.disable(t.CULL_FACE),n.enable(t.BLEND),t.bindBuffer(t.ARRAY_BUFFER,o),t.vertexAttribPointer(c.position,2,t.FLOAT,!1,16,0),t.vertexAttribPointer(c.uv,2,t.FLOAT,!1,16,8),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,a),t.uniformMatrix4fv(l.projectionMatrix,!1,y.projectionMatrix.elements),n.activeTexture(t.TEXTURE0),t.uniform1i(l.map,0);var v=0,b=0,_=g.fog;_?(t.uniform3f(l.fogColor,_.color.r,_.color.g,_.color.b),_.isFog?(t.uniform1f(l.fogNear,_.near),t.uniform1f(l.fogFar,_.far),t.uniform1i(l.fogType,1),v=1,b=1):_.isFogExp2&&(t.uniform1f(l.fogDensity,_.density),t.uniform1i(l.fogType,2),v=2,b=2)):(t.uniform1i(l.fogType,0),v=0,b=0);for(var w=0,E=i.length;w<E;w++){(S=i[w]).modelViewMatrix.multiplyMatrices(y.matrixWorldInverse,S.matrixWorld),S.z=-S.modelViewMatrix.elements[14]}i.sort(m);var A=[],x=[];for(w=0,E=i.length;w<E;w++){var S,T=(S=i[w]).material;if(!1!==T.visible){S.onBeforeRender(e,g,y,void 0,T,void 0),t.uniform1f(l.alphaTest,T.alphaTest),t.uniformMatrix4fv(l.modelViewMatrix,!1,S.modelViewMatrix.elements),S.matrixWorld.decompose(h,d,p),A[0]=p.x,A[1]=p.y,x[0]=S.center.x-.5,x[1]=S.center.y-.5;var M=0;g.fog&&T.fog&&(M=b),v!==M&&(t.uniform1i(l.fogType,M),v=M),null!==T.map?(t.uniform2f(l.uvOffset,T.map.offset.x,T.map.offset.y),t.uniform2f(l.uvScale,T.map.repeat.x,T.map.repeat.y)):(t.uniform2f(l.uvOffset,0,0),t.uniform2f(l.uvScale,1,1)),t.uniform1f(l.opacity,T.opacity),t.uniform3f(l.color,T.color.r,T.color.g,T.color.b),t.uniform1f(l.rotation,T.rotation),t.uniform2fv(l.center,x),t.uniform2fv(l.scale,A),n.setBlending(T.blending,T.blendEquation,T.blendSrc,T.blendDst,T.blendEquationAlpha,T.blendSrcAlpha,T.blendDstAlpha,T.premultipliedAlpha),n.buffers.depth.setTest(T.depthTest),n.buffers.depth.setMask(T.depthWrite),n.buffers.color.setMask(T.colorWrite),r.setTexture2D(T.map||u,0),t.drawElements(t.TRIANGLES,6,t.UNSIGNED_SHORT,0),S.onAfterRender(e,g,y,void 0,T,void 0)}}n.enable(t.CULL_FACE),n.reset()}}}ve.physical={uniforms:ge.merge([ve.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:ye.meshphysical_vert,fragmentShader:ye.meshphysical_frag},be.prototype=Object.create(E.prototype),be.prototype.constructor=be;var we,Ee,Ae,xe,Se,Te,Me,Re=0;function Ce(){Object.defineProperty(this,"id",{value:Re++}),this.uuid=m.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=1,this.side=0,this.flatShading=!1,this.vertexColors=0,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this.userData={},this.needsUpdate=!0}function ke(e){Ce.call(this),this.type="MeshDepthMaterial",this.depthPacking=3200,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(e)}function Ie(e){Ce.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new b,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.lights=!1,this.setValues(e)}function Pe(e,t){this.min=void 0!==e?e:new b(1/0,1/0,1/0),this.max=void 0!==t?t:new b(-1/0,-1/0,-1/0)}function Oe(e,t){this.center=void 0!==e?e:new b,this.radius=void 0!==t?t:0}function Ne(e,t){this.normal=void 0!==e?e:new b(1,0,0),this.constant=void 0!==t?t:0}function De(e,t,n,r,i,o){this.planes=[void 0!==e?e:new Ne,void 0!==t?t:new Ne,void 0!==n?n:new Ne,void 0!==r?r:new Ne,void 0!==i?i:new Ne,void 0!==o?o:new Ne]}function Le(e,t,n){for(var r=new De,i=new y,o=new g,a=new g(n,n),s=new b,c=new b,l=new Array(4),u=new Array(4),h={},d={0:1,1:0,2:2},p=[new b(1,0,0),new b(-1,0,0),new b(0,0,1),new b(0,0,-1),new b(0,1,0),new b(0,-1,0)],f=[new b(0,1,0),new b(0,1,0),new b(0,1,0),new b(0,1,0),new b(0,0,1),new b(0,0,-1)],m=[new A,new A,new A,new A,new A,new A],v=0;4!==v;++v){var _=0!=(1&v),w=0!=(2&v),E=new ke({depthPacking:3201,morphTargets:_,skinning:w});l[v]=E;var S=new Ie({morphTargets:_,skinning:w});u[v]=S}var T=this;function M(t,n,r,i,o,a){var s=t.geometry,c=null,p=l,f=t.customDepthMaterial;if(r&&(p=u,f=t.customDistanceMaterial),f)c=f;else{var m=!1;n.morphTargets&&(s&&s.isBufferGeometry?m=s.morphAttributes&&s.morphAttributes.position&&s.morphAttributes.position.length>0:s&&s.isGeometry&&(m=s.morphTargets&&s.morphTargets.length>0)),t.isSkinnedMesh&&!1===n.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",t);var g=0;m&&(g|=1),t.isSkinnedMesh&&n.skinning&&(g|=2),c=p[g]}if(e.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var y=c.uuid,v=n.uuid,b=h[y];void 0===b&&(b={},h[y]=b);var _=b[v];void 0===_&&(_=c.clone(),b[v]=_),c=_}return c.visible=n.visible,c.wireframe=n.wireframe,c.side=null!=n.shadowSide?n.shadowSide:d[n.side],c.clipShadows=n.clipShadows,c.clippingPlanes=n.clippingPlanes,c.clipIntersection=n.clipIntersection,c.wireframeLinewidth=n.wireframeLinewidth,c.linewidth=n.linewidth,r&&c.isMeshDistanceMaterial&&(c.referencePosition.copy(i),c.nearDistance=o,c.farDistance=a),c}function R(n,i,o,a){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&n.castShadow&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);var s=t.update(n),l=n.material;if(Array.isArray(l))for(var u=s.groups,h=0,d=u.length;h<d;h++){var p=u[h],f=l[p.materialIndex];if(f&&f.visible){var m=M(n,f,a,c,o.near,o.far);e.renderBufferDirect(o,null,s,m,n,p)}}else if(l.visible){m=M(n,l,a,c,o.near,o.far);e.renderBufferDirect(o,null,s,m,n,null)}}for(var g=n.children,y=0,v=g.length;y<v;y++)R(g[y],i,o,a)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(t,n,l){if(!1!==T.enabled&&(!1!==T.autoUpdate||!1!==T.needsUpdate)&&0!==t.length){var u,h=e.context,d=e.state;d.disable(h.BLEND),d.buffers.color.setClear(1,1,1,1),d.buffers.depth.setTest(!0),d.setScissorTest(!1);for(var g=0,y=t.length;g<y;g++){var v=t[g],b=v.shadow,_=v&&v.isPointLight;if(void 0!==b){var w=b.camera;if(o.copy(b.mapSize),o.min(a),_){var E=o.x,A=o.y;m[0].set(2*E,A,E,A),m[1].set(0,A,E,A),m[2].set(3*E,A,E,A),m[3].set(E,A,E,A),m[4].set(3*E,0,E,A),m[5].set(E,0,E,A),o.x*=4,o.y*=2}if(null===b.map){var S={minFilter:1003,magFilter:1003,format:1023};b.map=new x(o.x,o.y,S),b.map.texture.name=v.name+".shadowMap",w.updateProjectionMatrix()}b.isSpotLightShadow&&b.update(v);var M=b.map,C=b.matrix;c.setFromMatrixPosition(v.matrixWorld),w.position.copy(c),_?(u=6,C.makeTranslation(-c.x,-c.y,-c.z)):(u=1,s.setFromMatrixPosition(v.target.matrixWorld),w.lookAt(s),w.updateMatrixWorld(),C.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),C.multiply(w.projectionMatrix),C.multiply(w.matrixWorldInverse)),e.setRenderTarget(M),e.clear();for(var k=0;k<u;k++){if(_){s.copy(w.position),s.add(p[k]),w.up.copy(f[k]),w.lookAt(s),w.updateMatrixWorld();var I=m[k];d.viewport(I)}i.multiplyMatrices(w.projectionMatrix,w.matrixWorldInverse),r.setFromMatrix(i),R(n,l,w,_)}}else console.warn("THREE.WebGLShadowMap:",v,"has no shadow.")}T.needsUpdate=!1}}}function Fe(e){var t={};return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),t[e.uuid]},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var r=t[n.uuid];r&&(e.deleteBuffer(r.buffer),delete t[n.uuid])},update:function(n,r){n.isInterleavedBufferAttribute&&(n=n.data);var i=t[n.uuid];void 0===i?t[n.uuid]=function(t,n){var r=t.array,i=t.dynamic?e.DYNAMIC_DRAW:e.STATIC_DRAW,o=e.createBuffer();e.bindBuffer(n,o),e.bufferData(n,r,i),t.onUploadCallback();var a=e.FLOAT;return r instanceof Float32Array?a=e.FLOAT:r instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):r instanceof Uint16Array?a=e.UNSIGNED_SHORT:r instanceof Int16Array?a=e.SHORT:r instanceof Uint32Array?a=e.UNSIGNED_INT:r instanceof Int32Array?a=e.INT:r instanceof Int8Array?a=e.BYTE:r instanceof Uint8Array&&(a=e.UNSIGNED_BYTE),{buffer:o,type:a,bytesPerElement:r.BYTES_PER_ELEMENT,version:t.version}}(n,r):i.version<n.version&&(!function(t,n,r){var i=n.array,o=n.updateRange;e.bindBuffer(r,t),!1===n.dynamic?e.bufferData(r,i,e.STATIC_DRAW):-1===o.count?e.bufferSubData(r,0,i):0===o.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(e.bufferSubData(r,o.offset*i.BYTES_PER_ELEMENT,i.subarray(o.offset,o.offset+o.count)),o.count=-1)}(i.buffer,n,r),i.version=n.version)}}}function je(e,t,n,r){this._x=e||0,this._y=t||0,this._z=n||0,this._order=r||je.DefaultOrder}function Ue(){this.mask=1}Ce.prototype=Object.assign(Object.create(o.prototype),{constructor:Ce,isMaterial:!0,onBeforeCompile:function(){},setValues:function(e){if(void 0!==e)for(var t in e){var n=e[t];if(void 0!==n)if("shading"!==t){var r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]="overdraw"===t?Number(n):n:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===n;else console.warn("THREE.Material: '"+t+"' parameter is undefined.")}},toJSON:function(e){var t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(e){var t=[];for(var n in e){var r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearCoat&&(n.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(n.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,n.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),0!==this.side&&(n.side=this.side),0!==this.vertexColors&&(n.vertexColors=this.vertexColors),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,0!==this.rotation&&(n.rotation=this.rotation),1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),t){var i=r(e.textures),o=r(e.images);i.length>0&&(n.textures=i),o.length>0&&(n.images=o)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(e){this.name=e.name,this.fog=e.fog,this.lights=e.lights,this.blending=e.blending,this.side=e.side,this.flatShading=e.flatShading,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.premultipliedAlpha=e.premultipliedAlpha,this.overdraw=e.overdraw,this.visible=e.visible,this.userData=JSON.parse(JSON.stringify(e.userData)),this.clipShadows=e.clipShadows,this.clipIntersection=e.clipIntersection;var t=e.clippingPlanes,n=null;if(null!==t){var r=t.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=t[i].clone()}return this.clippingPlanes=n,this.shadowSide=e.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),ke.prototype=Object.create(Ce.prototype),ke.prototype.constructor=ke,ke.prototype.isMeshDepthMaterial=!0,ke.prototype.copy=function(e){return Ce.prototype.copy.call(this,e),this.depthPacking=e.depthPacking,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this},Ie.prototype=Object.create(Ce.prototype),Ie.prototype.constructor=Ie,Ie.prototype.isMeshDistanceMaterial=!0,Ie.prototype.copy=function(e){return Ce.prototype.copy.call(this,e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this},Object.assign(Pe.prototype,{isBox3:!0,set:function(e,t){return this.min.copy(e),this.max.copy(t),this},setFromArray:function(e){for(var t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=e.length;s<c;s+=3){var l=e[s],u=e[s+1],h=e[s+2];l<t&&(t=l),u<n&&(n=u),h<r&&(r=h),l>i&&(i=l),u>o&&(o=u),h>a&&(a=h)}return this.min.set(t,n,r),this.max.set(i,o,a),this},setFromBufferAttribute:function(e){for(var t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=e.count;s<c;s++){var l=e.getX(s),u=e.getY(s),h=e.getZ(s);l<t&&(t=l),u<n&&(n=u),h<r&&(r=h),l>i&&(i=l),u>o&&(o=u),h>a&&(a=h)}return this.min.set(t,n,r),this.max.set(i,o,a),this},setFromPoints:function(e){this.makeEmpty();for(var t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this},setFromCenterAndSize:function(){var e=new b;return function(t,n){var r=e.copy(n).multiplyScalar(.5);return this.min.copy(t).sub(r),this.max.copy(t).add(r),this}}(),setFromObject:function(e){return this.makeEmpty(),this.expandByObject(e)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.min.copy(e.min),this.max.copy(e.max),this},makeEmpty:function(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(e){var t=e||new b;return this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(e){var t=e||new b;return this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)},expandByPoint:function(e){return this.min.min(e),this.max.max(e),this},expandByVector:function(e){return this.min.sub(e),this.max.add(e),this},expandByScalar:function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},expandByObject:function(){var e,t,n,r=new b;function i(i){var o=i.geometry;if(void 0!==o)if(o.isGeometry){var a=o.vertices;for(t=0,n=a.length;t<n;t++)r.copy(a[t]),r.applyMatrix4(i.matrixWorld),e.expandByPoint(r)}else if(o.isBufferGeometry){var s=o.attributes.position;if(void 0!==s)for(t=0,n=s.count;t<n;t++)r.fromBufferAttribute(s,t).applyMatrix4(i.matrixWorld),e.expandByPoint(r)}}return function(t){return e=this,t.updateMatrixWorld(!0),t.traverse(i),this}}(),containsPoint:function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)},containsBox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z},getParameter:function(e,t){return(t||new b).set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)},intersectsSphere:(Ee=new b,function(e){return this.clampPoint(e.center,Ee),Ee.distanceToSquared(e.center)<=e.radius*e.radius}),intersectsPlane:function(e){var t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=e.constant&&n>=e.constant},intersectsTriangle:function(){var e=new b,t=new b,n=new b,r=new b,i=new b,o=new b,a=new b,s=new b,c=new b,l=new b;function u(r){var i,o;for(i=0,o=r.length-3;i<=o;i+=3){a.fromArray(r,i);var s=c.x*Math.abs(a.x)+c.y*Math.abs(a.y)+c.z*Math.abs(a.z),l=e.dot(a),u=t.dot(a),h=n.dot(a);if(Math.max(-Math.max(l,u,h),Math.min(l,u,h))>s)return!1}return!0}return function(a){if(this.isEmpty())return!1;this.getCenter(s),c.subVectors(this.max,s),e.subVectors(a.a,s),t.subVectors(a.b,s),n.subVectors(a.c,s),r.subVectors(t,e),i.subVectors(n,t),o.subVectors(e,n);var h=[0,-r.z,r.y,0,-i.z,i.y,0,-o.z,o.y,r.z,0,-r.x,i.z,0,-i.x,o.z,0,-o.x,-r.y,r.x,0,-i.y,i.x,0,-o.y,o.x,0];return!!u(h)&&(!!u(h=[1,0,0,0,1,0,0,0,1])&&(l.crossVectors(r,i),u(h=[l.x,l.y,l.z])))}}(),clampPoint:function(e,t){return(t||new b).copy(e).clamp(this.min,this.max)},distanceToPoint:function(){var e=new b;return function(t){return e.copy(t).clamp(this.min,this.max).sub(t).length()}}(),getBoundingSphere:function(){var e=new b;return function(t){var n=t||new Oe;return this.getCenter(n.center),n.radius=.5*this.getSize(e).length(),n}}(),intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},applyMatrix4:(we=[new b,new b,new b,new b,new b,new b,new b,new b],function(e){return this.isEmpty()||(we[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),we[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),we[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),we[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),we[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),we[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),we[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),we[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(we)),this}),translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}),Object.assign(Oe.prototype,{set:function(e,t){return this.center.copy(e),this.radius=t,this},setFromPoints:(Ae=new Pe,function(e,t){var n=this.center;void 0!==t?n.copy(t):Ae.setFromPoints(e).getCenter(n);for(var r=0,i=0,o=e.length;i<o;i++)r=Math.max(r,n.distanceToSquared(e[i]));return this.radius=Math.sqrt(r),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.center.copy(e.center),this.radius=e.radius,this},empty:function(){return this.radius<=0},containsPoint:function(e){return e.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(e){return e.distanceTo(this.center)-this.radius},intersectsSphere:function(e){var t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t},intersectsBox:function(e){return e.intersectsSphere(this)},intersectsPlane:function(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius},clampPoint:function(e,t){var n=this.center.distanceToSquared(e),r=t||new b;return r.copy(e),n>this.radius*this.radius&&(r.sub(this.center).normalize(),r.multiplyScalar(this.radius).add(this.center)),r},getBoundingBox:function(e){var t=e||new Pe;return t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this},translate:function(e){return this.center.add(e),this},equals:function(e){return e.center.equals(this.center)&&e.radius===this.radius}}),Object.assign(Ne.prototype,{set:function(e,t){return this.normal.copy(e),this.constant=t,this},setComponents:function(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this},setFromCoplanarPoints:function(){var e=new b,t=new b;return function(n,r,i){var o=e.subVectors(i,r).cross(t.subVectors(n,r)).normalize();return this.setFromNormalAndCoplanarPoint(o,n),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.normal.copy(e.normal),this.constant=e.constant,this},normalize:function(){var e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(e){return this.normal.dot(e)+this.constant},distanceToSphere:function(e){return this.distanceToPoint(e.center)-e.radius},projectPoint:function(e,t){return(t||new b).copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)},intersectLine:function(){var e=new b;return function(t,n){var r=n||new b,i=t.delta(e),o=this.normal.dot(i);if(0===o)return 0===this.distanceToPoint(t.start)?r.copy(t.start):void 0;var a=-(t.start.dot(this.normal)+this.constant)/o;return a<0||a>1?void 0:r.copy(i).multiplyScalar(a).add(t.start)}}(),intersectsLine:function(e){var t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0},intersectsBox:function(e){return e.intersectsPlane(this)},intersectsSphere:function(e){return e.intersectsPlane(this)},coplanarPoint:function(e){return(e||new b).copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var e=new b,t=new _;return function(n,r){var i=r||t.getNormalMatrix(n),o=this.coplanarPoint(e).applyMatrix4(n),a=this.normal.applyMatrix3(i).normalize();return this.constant=-o.dot(a),this}}(),translate:function(e){return this.constant-=e.dot(this.normal),this},equals:function(e){return e.normal.equals(this.normal)&&e.constant===this.constant}}),Object.assign(De.prototype,{set:function(e,t,n,r,i,o){var a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){for(var t=this.planes,n=0;n<6;n++)t[n].copy(e.planes[n]);return this},setFromMatrix:function(e){var t=this.planes,n=e.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=n[5],l=n[6],u=n[7],h=n[8],d=n[9],p=n[10],f=n[11],m=n[12],g=n[13],y=n[14],v=n[15];return t[0].setComponents(a-r,u-s,f-h,v-m).normalize(),t[1].setComponents(a+r,u+s,f+h,v+m).normalize(),t[2].setComponents(a+i,u+c,f+d,v+g).normalize(),t[3].setComponents(a-i,u-c,f-d,v-g).normalize(),t[4].setComponents(a-o,u-l,f-p,v-y).normalize(),t[5].setComponents(a+o,u+l,f+p,v+y).normalize(),this},intersectsObject:(Te=new Oe,function(e){var t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),Te.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(Te)}),intersectsSprite:function(){var e=new Oe;return function(t){return e.center.set(0,0,0),e.radius=.7071067811865476,e.applyMatrix4(t.matrixWorld),this.intersectsSphere(e)}}(),intersectsSphere:function(e){for(var t=this.planes,n=e.center,r=-e.radius,i=0;i<6;i++){if(t[i].distanceToPoint(n)<r)return!1}return!0},intersectsBox:(xe=new b,Se=new b,function(e){for(var t=this.planes,n=0;n<6;n++){var r=t[n];xe.x=r.normal.x>0?e.min.x:e.max.x,Se.x=r.normal.x>0?e.max.x:e.min.x,xe.y=r.normal.y>0?e.min.y:e.max.y,Se.y=r.normal.y>0?e.max.y:e.min.y,xe.z=r.normal.z>0?e.min.z:e.max.z,Se.z=r.normal.z>0?e.max.z:e.min.z;var i=r.distanceToPoint(xe),o=r.distanceToPoint(Se);if(i<0&&o<0)return!1}return!0}),containsPoint:function(e){for(var t=this.planes,n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}}),je.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],je.DefaultOrder="XYZ",Object.defineProperties(je.prototype,{x:{get:function(){return this._x},set:function(e){this._x=e,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(e){this._y=e,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(e){this._z=e,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(e){this._order=e,this.onChangeCallback()}}}),Object.assign(je.prototype,{isEuler:!0,set:function(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._order=r||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this.onChangeCallback(),this},setFromRotationMatrix:function(e,t,n){var r=m.clamp,i=e.elements,o=i[0],a=i[4],s=i[8],c=i[1],l=i[5],u=i[9],h=i[2],d=i[6],p=i[10];return"XYZ"===(t=t||this._order)?(this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-u,p),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(d,l),this._z=0)):"YXZ"===t?(this._x=Math.asin(-r(u,-1,1)),Math.abs(u)<.99999?(this._y=Math.atan2(s,p),this._z=Math.atan2(c,l)):(this._y=Math.atan2(-h,o),this._z=0)):"ZXY"===t?(this._x=Math.asin(r(d,-1,1)),Math.abs(d)<.99999?(this._y=Math.atan2(-h,p),this._z=Math.atan2(-a,l)):(this._y=0,this._z=Math.atan2(c,o))):"ZYX"===t?(this._y=Math.asin(-r(h,-1,1)),Math.abs(h)<.99999?(this._x=Math.atan2(d,p),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,l))):"YZX"===t?(this._z=Math.asin(r(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(-u,l),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(s,p))):"XZY"===t?(this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(d,l),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-u,p),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+t),this._order=t,!1!==n&&this.onChangeCallback(),this},setFromQuaternion:function(){var e=new y;return function(t,n,r){return e.makeRotationFromQuaternion(t),this.setFromRotationMatrix(e,n,r)}}(),setFromVector3:function(e,t){return this.set(e.x,e.y,e.z,t||this._order)},reorder:(Me=new v,function(e){return Me.setFromEuler(this),this.setFromQuaternion(Me,e)}),equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order},fromArray:function(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this.onChangeCallback(),this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e},toVector3:function(e){return e?e.set(this._x,this._y,this._z):new b(this._x,this._y,this._z)},onChange:function(e){return this.onChangeCallback=e,this},onChangeCallback:function(){}}),Object.assign(Ue.prototype,{set:function(e){this.mask=1<<e|0},enable:function(e){this.mask|=1<<e|0},toggle:function(e){this.mask^=1<<e|0},disable:function(e){this.mask&=~(1<<e|0)},test:function(e){return 0!=(this.mask&e.mask)}});var Be,Ve,He,ze,qe=0;function Ge(){Object.defineProperty(this,"id",{value:qe++}),this.uuid=m.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Ge.DefaultUp.clone();var e=new b,t=new je,n=new v,r=new b(1,1,1);t.onChange((function(){n.setFromEuler(t,!1)})),n.onChange((function(){t.setFromQuaternion(n,void 0,!1)})),Object.defineProperties(this,{position:{enumerable:!0,value:e},rotation:{enumerable:!0,value:t},quaternion:{enumerable:!0,value:n},scale:{enumerable:!0,value:r},modelViewMatrix:{value:new y},normalMatrix:{value:new _}}),this.matrix=new y,this.matrixWorld=new y,this.matrixAutoUpdate=Ge.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new Ue,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function We(){Ge.call(this),this.type="Camera",this.matrixWorldInverse=new y,this.projectionMatrix=new y}function Je(e,t,n,r,i,o){We.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=void 0!==i?i:.1,this.far=void 0!==o?o:2e3,this.updateProjectionMatrix()}function Ze(e,t,n,r,i,o){this.a=e,this.b=t,this.c=n,this.normal=r&&r.isVector3?r:new b,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new fe,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=void 0!==o?o:0}Ge.DefaultUp=new b(0,1,0),Ge.DefaultMatrixAutoUpdate=!0,Ge.prototype=Object.assign(Object.create(o.prototype),{constructor:Ge,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(e){this.matrix.multiplyMatrices(e,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(e){return this.quaternion.premultiply(e),this},setRotationFromAxisAngle:function(e,t){this.quaternion.setFromAxisAngle(e,t)},setRotationFromEuler:function(e){this.quaternion.setFromEuler(e,!0)},setRotationFromMatrix:function(e){this.quaternion.setFromRotationMatrix(e)},setRotationFromQuaternion:function(e){this.quaternion.copy(e)},rotateOnAxis:(ze=new v,function(e,t){return ze.setFromAxisAngle(e,t),this.quaternion.multiply(ze),this}),rotateOnWorldAxis:function(){var e=new v;return function(t,n){return e.setFromAxisAngle(t,n),this.quaternion.premultiply(e),this}}(),rotateX:function(){var e=new b(1,0,0);return function(t){return this.rotateOnAxis(e,t)}}(),rotateY:function(){var e=new b(0,1,0);return function(t){return this.rotateOnAxis(e,t)}}(),rotateZ:function(){var e=new b(0,0,1);return function(t){return this.rotateOnAxis(e,t)}}(),translateOnAxis:function(){var e=new b;return function(t,n){return e.copy(t).applyQuaternion(this.quaternion),this.position.add(e.multiplyScalar(n)),this}}(),translateX:function(){var e=new b(1,0,0);return function(t){return this.translateOnAxis(e,t)}}(),translateY:function(){var e=new b(0,1,0);return function(t){return this.translateOnAxis(e,t)}}(),translateZ:function(){var e=new b(0,0,1);return function(t){return this.translateOnAxis(e,t)}}(),localToWorld:function(e){return e.applyMatrix4(this.matrixWorld)},worldToLocal:(He=new y,function(e){return e.applyMatrix4(He.getInverse(this.matrixWorld))}),lookAt:function(){var e=new y,t=new b;return function(n,r,i){n.isVector3?t.copy(n):t.set(n,r,i),this.isCamera?e.lookAt(this.position,t,this.up):e.lookAt(t,this.position,this.up),this.quaternion.setFromRotationMatrix(e)}}(),add:function(e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(null!==e.parent&&e.parent.remove(e),e.parent=this,e.dispatchEvent({type:"added"}),this.children.push(e)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)},remove:function(e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.remove(arguments[t]);return this}var n=this.children.indexOf(e);return-1!==n&&(e.parent=null,e.dispatchEvent({type:"removed"}),this.children.splice(n,1)),this},getObjectById:function(e){return this.getObjectByProperty("id",e)},getObjectByName:function(e){return this.getObjectByProperty("name",e)},getObjectByProperty:function(e,t){if(this[e]===t)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n].getObjectByProperty(e,t);if(void 0!==i)return i}},getWorldPosition:function(e){var t=e||new b;return this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:(Be=new b,Ve=new b,function(e){var t=e||new v;return this.updateMatrixWorld(!0),this.matrixWorld.decompose(Be,t,Ve),t}),getWorldRotation:function(){var e=new v;return function(t){var n=t||new je;return this.getWorldQuaternion(e),n.setFromQuaternion(e,this.rotation.order,!1)}}(),getWorldScale:function(){var e=new b,t=new v;return function(n){var r=n||new b;return this.updateMatrixWorld(!0),this.matrixWorld.decompose(e,t,r),r}}(),getWorldDirection:function(){var e=new v;return function(t){var n=t||new b;return this.getWorldQuaternion(e),n.set(0,0,1).applyQuaternion(e)}}(),raycast:function(){},traverse:function(e){e(this);for(var t=this.children,n=0,r=t.length;n<r;n++)t[n].traverse(e)},traverseVisible:function(e){if(!1!==this.visible){e(this);for(var t=this.children,n=0,r=t.length;n<r;n++)t[n].traverseVisible(e)}},traverseAncestors:function(e){var t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);for(var t=this.children,n=0,r=t.length;n<r;n++)t[n].updateMatrixWorld(e)},toJSON:function(e){var t=void 0===e||"string"==typeof e,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var r={};function i(t,n){return void 0===t[n.uuid]&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.matrix=this.matrix.toArray(),void 0!==this.geometry){r.geometry=i(e.geometries,this.geometry);var o=this.geometry.parameters;if(void 0!==o&&void 0!==o.shapes){var a=o.shapes;if(Array.isArray(a))for(var s=0,c=a.length;s<c;s++){var l=a[s];i(e.shapes,l)}else i(e.shapes,a)}}if(void 0!==this.material)if(Array.isArray(this.material)){var u=[];for(s=0,c=this.material.length;s<c;s++)u.push(i(e.materials,this.material[s]));r.material=u}else r.material=i(e.materials,this.material);if(this.children.length>0){r.children=[];for(s=0;s<this.children.length;s++)r.children.push(this.children[s].toJSON(e).object)}if(t){var h=m(e.geometries),d=m(e.materials),p=m(e.textures),f=m(e.images);a=m(e.shapes);h.length>0&&(n.geometries=h),d.length>0&&(n.materials=d),p.length>0&&(n.textures=p),f.length>0&&(n.images=f),a.length>0&&(n.shapes=a)}return n.object=r,n;function m(e){var t=[];for(var n in e){var r=e[n];delete r.metadata,t.push(r)}return t}},clone:function(e){return(new this.constructor).copy(this,e)},copy:function(e,t){if(void 0===t&&(t=!0),this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(var n=0;n<e.children.length;n++){var r=e.children[n];this.add(r.clone())}return this}}),We.prototype=Object.assign(Object.create(Ge.prototype),{constructor:We,isCamera:!0,copy:function(e,t){return Ge.prototype.copy.call(this,e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this},getWorldDirection:function(){var e=new v;return function(t){var n=t||new b;return this.getWorldQuaternion(e),n.set(0,0,-1).applyQuaternion(e)}}(),updateMatrixWorld:function(e){Ge.prototype.updateMatrixWorld.call(this,e),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),Je.prototype=Object.assign(Object.create(We.prototype),{constructor:Je,isOrthographicCamera:!0,copy:function(e,t){return We.prototype.copy.call(this,e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this},setViewOffset:function(e,t,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-e,o=n+e,a=r+t,s=r-t;if(null!==this.view&&this.view.enabled){var c=this.zoom/(this.view.width/this.view.fullWidth),l=this.zoom/(this.view.height/this.view.fullHeight),u=(this.right-this.left)/this.view.width,h=(this.top-this.bottom)/this.view.height;o=(i+=u*(this.view.offsetX/c))+u*(this.view.width/c),s=(a-=h*(this.view.offsetY/l))-h*(this.view.height/l)}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far)},toJSON:function(e){var t=Ge.prototype.toJSON.call(this,e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}),Object.assign(Ze.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(e){this.a=e.a,this.b=e.b,this.c=e.c,this.normal.copy(e.normal),this.color.copy(e.color),this.materialIndex=e.materialIndex;for(var t=0,n=e.vertexNormals.length;t<n;t++)this.vertexNormals[t]=e.vertexNormals[t].clone();for(t=0,n=e.vertexColors.length;t<n;t++)this.vertexColors[t]=e.vertexColors[t].clone();return this}});var Ye,Xe=0;function Qe(){Object.defineProperty(this,"id",{value:Xe+=2}),this.uuid=m.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}function Ke(e,t,n){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.uuid=m.generateUUID(),this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=!0===n,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.onUploadCallback=function(){},this.version=0}function $e(e,t,n){Ke.call(this,new Int8Array(e),t,n)}function et(e,t,n){Ke.call(this,new Uint8Array(e),t,n)}function tt(e,t,n){Ke.call(this,new Uint8ClampedArray(e),t,n)}function nt(e,t,n){Ke.call(this,new Int16Array(e),t,n)}function rt(e,t,n){Ke.call(this,new Uint16Array(e),t,n)}function it(e,t,n){Ke.call(this,new Int32Array(e),t,n)}function ot(e,t,n){Ke.call(this,new Uint32Array(e),t,n)}function at(e,t,n){Ke.call(this,new Float32Array(e),t,n)}function st(e,t,n){Ke.call(this,new Float64Array(e),t,n)}function ct(){this.indices=[],this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function lt(e){if(0===e.length)return-1/0;for(var t=e[0],n=1,r=e.length;n<r;++n)e[n]>t&&(t=e[n]);return t}Qe.prototype=Object.assign(Object.create(o.prototype),{constructor:Qe,isGeometry:!0,applyMatrix:function(e){for(var t=(new _).getNormalMatrix(e),n=0,r=this.vertices.length;n<r;n++){this.vertices[n].applyMatrix4(e)}for(n=0,r=this.faces.length;n<r;n++){var i=this.faces[n];i.normal.applyMatrix3(t).normalize();for(var o=0,a=i.vertexNormals.length;o<a;o++)i.vertexNormals[o].applyMatrix3(t).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var e=new y;return function(t){return e.makeRotationX(t),this.applyMatrix(e),this}}(),rotateY:function(){var e=new y;return function(t){return e.makeRotationY(t),this.applyMatrix(e),this}}(),rotateZ:function(){var e=new y;return function(t){return e.makeRotationZ(t),this.applyMatrix(e),this}}(),translate:function(){var e=new y;return function(t,n,r){return e.makeTranslation(t,n,r),this.applyMatrix(e),this}}(),scale:function(){var e=new y;return function(t,n,r){return e.makeScale(t,n,r),this.applyMatrix(e),this}}(),lookAt:(Ye=new Ge,function(e){Ye.lookAt(e),Ye.updateMatrix(),this.applyMatrix(Ye.matrix)}),fromBufferGeometry:function(e){var t=this,n=null!==e.index?e.index.array:void 0,r=e.attributes,i=r.position.array,o=void 0!==r.normal?r.normal.array:void 0,a=void 0!==r.color?r.color.array:void 0,s=void 0!==r.uv?r.uv.array:void 0,c=void 0!==r.uv2?r.uv2.array:void 0;void 0!==c&&(this.faceVertexUvs[1]=[]);for(var l=[],u=[],h=[],d=0,p=0;d<i.length;d+=3,p+=2)t.vertices.push(new b(i[d],i[d+1],i[d+2])),void 0!==o&&l.push(new b(o[d],o[d+1],o[d+2])),void 0!==a&&t.colors.push(new fe(a[d],a[d+1],a[d+2])),void 0!==s&&u.push(new g(s[p],s[p+1])),void 0!==c&&h.push(new g(c[p],c[p+1]));function f(e,n,r,i){var d=new Ze(e,n,r,void 0!==o?[l[e].clone(),l[n].clone(),l[r].clone()]:[],void 0!==a?[t.colors[e].clone(),t.colors[n].clone(),t.colors[r].clone()]:[],i);t.faces.push(d),void 0!==s&&t.faceVertexUvs[0].push([u[e].clone(),u[n].clone(),u[r].clone()]),void 0!==c&&t.faceVertexUvs[1].push([h[e].clone(),h[n].clone(),h[r].clone()])}var m=e.groups;if(m.length>0)for(d=0;d<m.length;d++)for(var y=m[d],v=y.start,_=(p=v,v+y.count);p<_;p+=3)void 0!==n?f(n[p],n[p+1],n[p+2],y.materialIndex):f(p,p+1,p+2,y.materialIndex);else if(void 0!==n)for(d=0;d<n.length;d+=3)f(n[d],n[d+1],n[d+2]);else for(d=0;d<i.length/3;d+=3)f(d,d+1,d+2);return this.computeFaceNormals(),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this},center:function(){this.computeBoundingBox();var e=this.boundingBox.getCenter().negate();return this.translate(e.x,e.y,e.z),e},normalize:function(){this.computeBoundingSphere();var e=this.boundingSphere.center,t=this.boundingSphere.radius,n=0===t?1:1/t,r=new y;return r.set(n,0,0,-n*e.x,0,n,0,-n*e.y,0,0,n,-n*e.z,0,0,0,1),this.applyMatrix(r),this},computeFaceNormals:function(){for(var e=new b,t=new b,n=0,r=this.faces.length;n<r;n++){var i=this.faces[n],o=this.vertices[i.a],a=this.vertices[i.b],s=this.vertices[i.c];e.subVectors(s,a),t.subVectors(o,a),e.cross(t),e.normalize(),i.normal.copy(e)}},computeVertexNormals:function(e){var t,n,r,i,o,a;for(void 0===e&&(e=!0),a=new Array(this.vertices.length),t=0,n=this.vertices.length;t<n;t++)a[t]=new b;if(e){var s,c,l,u=new b,h=new b;for(r=0,i=this.faces.length;r<i;r++)o=this.faces[r],s=this.vertices[o.a],c=this.vertices[o.b],l=this.vertices[o.c],u.subVectors(l,c),h.subVectors(s,c),u.cross(h),a[o.a].add(u),a[o.b].add(u),a[o.c].add(u)}else for(this.computeFaceNormals(),r=0,i=this.faces.length;r<i;r++)a[(o=this.faces[r]).a].add(o.normal),a[o.b].add(o.normal),a[o.c].add(o.normal);for(t=0,n=this.vertices.length;t<n;t++)a[t].normalize();for(r=0,i=this.faces.length;r<i;r++){var d=(o=this.faces[r]).vertexNormals;3===d.length?(d[0].copy(a[o.a]),d[1].copy(a[o.b]),d[2].copy(a[o.c])):(d[0]=a[o.a].clone(),d[1]=a[o.b].clone(),d[2]=a[o.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var e,t,n;for(this.computeFaceNormals(),e=0,t=this.faces.length;e<t;e++){var r=(n=this.faces[e]).vertexNormals;3===r.length?(r[0].copy(n.normal),r[1].copy(n.normal),r[2].copy(n.normal)):(r[0]=n.normal.clone(),r[1]=n.normal.clone(),r[2]=n.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var e,t,n,r,i;for(n=0,r=this.faces.length;n<r;n++)for((i=this.faces[n]).__originalFaceNormal?i.__originalFaceNormal.copy(i.normal):i.__originalFaceNormal=i.normal.clone(),i.__originalVertexNormals||(i.__originalVertexNormals=[]),e=0,t=i.vertexNormals.length;e<t;e++)i.__originalVertexNormals[e]?i.__originalVertexNormals[e].copy(i.vertexNormals[e]):i.__originalVertexNormals[e]=i.vertexNormals[e].clone();var o=new Qe;for(o.faces=this.faces,e=0,t=this.morphTargets.length;e<t;e++){if(!this.morphNormals[e]){this.morphNormals[e]={},this.morphNormals[e].faceNormals=[],this.morphNormals[e].vertexNormals=[];var a=this.morphNormals[e].faceNormals,s=this.morphNormals[e].vertexNormals;for(n=0,r=this.faces.length;n<r;n++)c=new b,l={a:new b,b:new b,c:new b},a.push(c),s.push(l)}var c,l,u=this.morphNormals[e];for(o.vertices=this.morphTargets[e].vertices,o.computeFaceNormals(),o.computeVertexNormals(),n=0,r=this.faces.length;n<r;n++)i=this.faces[n],c=u.faceNormals[n],l=u.vertexNormals[n],c.copy(i.normal),l.a.copy(i.vertexNormals[0]),l.b.copy(i.vertexNormals[1]),l.c.copy(i.vertexNormals[2])}for(n=0,r=this.faces.length;n<r;n++)(i=this.faces[n]).normal=i.__originalFaceNormal,i.vertexNormals=i.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new Pe),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new Oe),this.boundingSphere.setFromPoints(this.vertices)},merge:function(e,t,n){if(e&&e.isGeometry){var r,i=this.vertices.length,o=this.vertices,a=e.vertices,s=this.faces,c=e.faces,l=this.faceVertexUvs[0],u=e.faceVertexUvs[0],h=this.colors,d=e.colors;void 0===n&&(n=0),void 0!==t&&(r=(new _).getNormalMatrix(t));for(var p=0,f=a.length;p<f;p++){var m=a[p].clone();void 0!==t&&m.applyMatrix4(t),o.push(m)}for(p=0,f=d.length;p<f;p++)h.push(d[p].clone());for(p=0,f=c.length;p<f;p++){var g,y,v,b=c[p],w=b.vertexNormals,E=b.vertexColors;(g=new Ze(b.a+i,b.b+i,b.c+i)).normal.copy(b.normal),void 0!==r&&g.normal.applyMatrix3(r).normalize();for(var A=0,x=w.length;A<x;A++)y=w[A].clone(),void 0!==r&&y.applyMatrix3(r).normalize(),g.vertexNormals.push(y);g.color.copy(b.color);for(A=0,x=E.length;A<x;A++)v=E[A],g.vertexColors.push(v.clone());g.materialIndex=b.materialIndex+n,s.push(g)}for(p=0,f=u.length;p<f;p++){var S=u[p],T=[];if(void 0!==S){for(A=0,x=S.length;A<x;A++)T.push(S[A].clone());l.push(T)}}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",e)},mergeMesh:function(e){e&&e.isMesh?(e.matrixAutoUpdate&&e.updateMatrix(),this.merge(e.geometry,e.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",e)},mergeVertices:function(){var e,t,n,r,i,o,a,s,c={},l=[],u=[],h=Math.pow(10,4);for(n=0,r=this.vertices.length;n<r;n++)e=this.vertices[n],void 0===c[t=Math.round(e.x*h)+"_"+Math.round(e.y*h)+"_"+Math.round(e.z*h)]?(c[t]=n,l.push(this.vertices[n]),u[n]=l.length-1):u[n]=u[c[t]];var d=[];for(n=0,r=this.faces.length;n<r;n++){(i=this.faces[n]).a=u[i.a],i.b=u[i.b],i.c=u[i.c],o=[i.a,i.b,i.c];for(var p=0;p<3;p++)if(o[p]===o[(p+1)%3]){d.push(n);break}}for(n=d.length-1;n>=0;n--){var f=d[n];for(this.faces.splice(f,1),a=0,s=this.faceVertexUvs.length;a<s;a++)this.faceVertexUvs[a].splice(f,1)}var m=this.vertices.length-l.length;return this.vertices=l,m},setFromPoints:function(e){this.vertices=[];for(var t=0,n=e.length;t<n;t++){var r=e[t];this.vertices.push(new b(r.x,r.y,r.z||0))}return this},sortFacesByMaterialIndex:function(){for(var e=this.faces,t=e.length,n=0;n<t;n++)e[n]._id=n;e.sort((function(e,t){return e.materialIndex-t.materialIndex}));var r,i,o=this.faceVertexUvs[0],a=this.faceVertexUvs[1];o&&o.length===t&&(r=[]),a&&a.length===t&&(i=[]);for(n=0;n<t;n++){var s=e[n]._id;r&&r.push(o[s]),i&&i.push(a[s])}r&&(this.faceVertexUvs[0]=r),i&&(this.faceVertexUvs[1]=i)},toJSON:function(){var e={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),void 0!==this.parameters){var t=this.parameters;for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}for(var r=[],i=0;i<this.vertices.length;i++){var o=this.vertices[i];r.push(o.x,o.y,o.z)}var a=[],s=[],c={},l=[],u={},h=[],d={};for(i=0;i<this.faces.length;i++){var p=this.faces[i],f=void 0!==this.faceVertexUvs[0][i],m=p.normal.length()>0,g=p.vertexNormals.length>0,y=1!==p.color.r||1!==p.color.g||1!==p.color.b,v=p.vertexColors.length>0,b=0;if(b=A(b,0,0),b=A(b,1,!0),b=A(b,2,!1),b=A(b,3,f),b=A(b,4,m),b=A(b,5,g),b=A(b,6,y),b=A(b,7,v),a.push(b),a.push(p.a,p.b,p.c),a.push(p.materialIndex),f){var _=this.faceVertexUvs[0][i];a.push(T(_[0]),T(_[1]),T(_[2]))}if(m&&a.push(x(p.normal)),g){var w=p.vertexNormals;a.push(x(w[0]),x(w[1]),x(w[2]))}if(y&&a.push(S(p.color)),v){var E=p.vertexColors;a.push(S(E[0]),S(E[1]),S(E[2]))}}function A(e,t,n){return n?e|1<<t:e&~(1<<t)}function x(e){var t=e.x.toString()+e.y.toString()+e.z.toString();return void 0!==c[t]||(c[t]=s.length/3,s.push(e.x,e.y,e.z)),c[t]}function S(e){var t=e.r.toString()+e.g.toString()+e.b.toString();return void 0!==u[t]||(u[t]=l.length,l.push(e.getHex())),u[t]}function T(e){var t=e.x.toString()+e.y.toString();return void 0!==d[t]||(d[t]=h.length/2,h.push(e.x,e.y)),d[t]}return e.data={},e.data.vertices=r,e.data.normals=s,l.length>0&&(e.data.colors=l),h.length>0&&(e.data.uvs=[h]),e.data.faces=a,e},clone:function(){return(new Qe).copy(this)},copy:function(e){var t,n,r,i,o,a;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=e.name;var s=e.vertices;for(t=0,n=s.length;t<n;t++)this.vertices.push(s[t].clone());var c=e.colors;for(t=0,n=c.length;t<n;t++)this.colors.push(c[t].clone());var l=e.faces;for(t=0,n=l.length;t<n;t++)this.faces.push(l[t].clone());for(t=0,n=e.faceVertexUvs.length;t<n;t++){var u=e.faceVertexUvs[t];for(void 0===this.faceVertexUvs[t]&&(this.faceVertexUvs[t]=[]),r=0,i=u.length;r<i;r++){var h=u[r],d=[];for(o=0,a=h.length;o<a;o++){var p=h[o];d.push(p.clone())}this.faceVertexUvs[t].push(d)}}var f=e.morphTargets;for(t=0,n=f.length;t<n;t++){var m={};if(m.name=f[t].name,void 0!==f[t].vertices)for(m.vertices=[],r=0,i=f[t].vertices.length;r<i;r++)m.vertices.push(f[t].vertices[r].clone());if(void 0!==f[t].normals)for(m.normals=[],r=0,i=f[t].normals.length;r<i;r++)m.normals.push(f[t].normals[r].clone());this.morphTargets.push(m)}var g=e.morphNormals;for(t=0,n=g.length;t<n;t++){var y={};if(void 0!==g[t].vertexNormals)for(y.vertexNormals=[],r=0,i=g[t].vertexNormals.length;r<i;r++){var v=g[t].vertexNormals[r],b={};b.a=v.a.clone(),b.b=v.b.clone(),b.c=v.c.clone(),y.vertexNormals.push(b)}if(void 0!==g[t].faceNormals)for(y.faceNormals=[],r=0,i=g[t].faceNormals.length;r<i;r++)y.faceNormals.push(g[t].faceNormals[r].clone());this.morphNormals.push(y)}var _=e.skinWeights;for(t=0,n=_.length;t<n;t++)this.skinWeights.push(_[t].clone());var w=e.skinIndices;for(t=0,n=w.length;t<n;t++)this.skinIndices.push(w[t].clone());var E=e.lineDistances;for(t=0,n=E.length;t<n;t++)this.lineDistances.push(E[t]);var A=e.boundingBox;null!==A&&(this.boundingBox=A.clone());var x=e.boundingSphere;return null!==x&&(this.boundingSphere=x.clone()),this.elementsNeedUpdate=e.elementsNeedUpdate,this.verticesNeedUpdate=e.verticesNeedUpdate,this.uvsNeedUpdate=e.uvsNeedUpdate,this.normalsNeedUpdate=e.normalsNeedUpdate,this.colorsNeedUpdate=e.colorsNeedUpdate,this.lineDistancesNeedUpdate=e.lineDistancesNeedUpdate,this.groupsNeedUpdate=e.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Ke.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(Ke.prototype,{isBufferAttribute:!0,setArray:function(e){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.count=void 0!==e?e.length/this.itemSize:0,this.array=e},setDynamic:function(e){return this.dynamic=e,this},copy:function(e){return this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.dynamic=e.dynamic,this},copyAt:function(e,t,n){e*=this.itemSize,n*=t.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[e+r]=t.array[n+r];return this},copyArray:function(e){return this.array.set(e),this},copyColorsArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var o=e[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),o=new fe),t[n++]=o.r,t[n++]=o.g,t[n++]=o.b}return this},copyIndicesArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var o=e[r];t[n++]=o.a,t[n++]=o.b,t[n++]=o.c}return this},copyVector2sArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var o=e[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),o=new g),t[n++]=o.x,t[n++]=o.y}return this},copyVector3sArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var o=e[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),o=new b),t[n++]=o.x,t[n++]=o.y,t[n++]=o.z}return this},copyVector4sArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var o=e[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),o=new A),t[n++]=o.x,t[n++]=o.y,t[n++]=o.z,t[n++]=o.w}return this},set:function(e,t){return void 0===t&&(t=0),this.array.set(e,t),this},getX:function(e){return this.array[e*this.itemSize]},setX:function(e,t){return this.array[e*this.itemSize]=t,this},getY:function(e){return this.array[e*this.itemSize+1]},setY:function(e,t){return this.array[e*this.itemSize+1]=t,this},getZ:function(e){return this.array[e*this.itemSize+2]},setZ:function(e,t){return this.array[e*this.itemSize+2]=t,this},getW:function(e){return this.array[e*this.itemSize+3]},setW:function(e,t){return this.array[e*this.itemSize+3]=t,this},setXY:function(e,t,n){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this},setXYZ:function(e,t,n,r){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this},setXYZW:function(e,t,n,r,i){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=i,this},onUpload:function(e){return this.onUploadCallback=e,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),$e.prototype=Object.create(Ke.prototype),$e.prototype.constructor=$e,et.prototype=Object.create(Ke.prototype),et.prototype.constructor=et,tt.prototype=Object.create(Ke.prototype),tt.prototype.constructor=tt,nt.prototype=Object.create(Ke.prototype),nt.prototype.constructor=nt,rt.prototype=Object.create(Ke.prototype),rt.prototype.constructor=rt,it.prototype=Object.create(Ke.prototype),it.prototype.constructor=it,ot.prototype=Object.create(Ke.prototype),ot.prototype.constructor=ot,at.prototype=Object.create(Ke.prototype),at.prototype.constructor=at,st.prototype=Object.create(Ke.prototype),st.prototype.constructor=st,Object.assign(ct.prototype,{computeGroups:function(e){for(var t,n=[],r=void 0,i=e.faces,o=0;o<i.length;o++){var a=i[o];a.materialIndex!==r&&(r=a.materialIndex,void 0!==t&&(t.count=3*o-t.start,n.push(t)),t={start:3*o,materialIndex:r})}void 0!==t&&(t.count=3*o-t.start,n.push(t)),this.groups=n},fromGeometry:function(e){var t,n=e.faces,r=e.vertices,i=e.faceVertexUvs,o=i[0]&&i[0].length>0,a=i[1]&&i[1].length>0,s=e.morphTargets,c=s.length;if(c>0){t=[];for(var l=0;l<c;l++)t[l]=[];this.morphTargets.position=t}var u,h=e.morphNormals,d=h.length;if(d>0){u=[];for(l=0;l<d;l++)u[l]=[];this.morphTargets.normal=u}var p=e.skinIndices,f=e.skinWeights,m=p.length===r.length,y=f.length===r.length;for(l=0;l<n.length;l++){var v=n[l];this.vertices.push(r[v.a],r[v.b],r[v.c]);var b=v.vertexNormals;if(3===b.length)this.normals.push(b[0],b[1],b[2]);else{var _=v.normal;this.normals.push(_,_,_)}var w,E=v.vertexColors;if(3===E.length)this.colors.push(E[0],E[1],E[2]);else{var A=v.color;this.colors.push(A,A,A)}if(!0===o)void 0!==(w=i[0][l])?this.uvs.push(w[0],w[1],w[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",l),this.uvs.push(new g,new g,new g));if(!0===a)void 0!==(w=i[1][l])?this.uvs2.push(w[0],w[1],w[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",l),this.uvs2.push(new g,new g,new g));for(var x=0;x<c;x++){var S=s[x].vertices;t[x].push(S[v.a],S[v.b],S[v.c])}for(x=0;x<d;x++){var T=h[x].vertexNormals[l];u[x].push(T.a,T.b,T.c)}m&&this.skinIndices.push(p[v.a],p[v.b],p[v.c]),y&&this.skinWeights.push(f[v.a],f[v.b],f[v.c])}return this.computeGroups(e),this.verticesNeedUpdate=e.verticesNeedUpdate,this.normalsNeedUpdate=e.normalsNeedUpdate,this.colorsNeedUpdate=e.colorsNeedUpdate,this.uvsNeedUpdate=e.uvsNeedUpdate,this.groupsNeedUpdate=e.groupsNeedUpdate,this}});var ut,ht,dt,pt,ft,mt,gt,yt=1;function vt(){Object.defineProperty(this,"id",{value:yt+=2}),this.uuid=m.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0}}function bt(e,t,n,r,i,o){Qe.call(this),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:o},this.fromBufferGeometry(new _t(e,t,n,r,i,o)),this.mergeVertices()}function _t(e,t,n,r,i,o){vt.call(this),this.type="BoxBufferGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};var a=this;e=e||1,t=t||1,n=n||1,r=Math.floor(r)||1,i=Math.floor(i)||1,o=Math.floor(o)||1;var s=[],c=[],l=[],u=[],h=0,d=0;function p(e,t,n,r,i,o,p,f,m,g,y){var v,_,w=o/m,E=p/g,A=o/2,x=p/2,S=f/2,T=m+1,M=g+1,R=0,C=0,k=new b;for(_=0;_<M;_++){var I=_*E-x;for(v=0;v<T;v++){var P=v*w-A;k[e]=P*r,k[t]=I*i,k[n]=S,c.push(k.x,k.y,k.z),k[e]=0,k[t]=0,k[n]=f>0?1:-1,l.push(k.x,k.y,k.z),u.push(v/m),u.push(1-_/g),R+=1}}for(_=0;_<g;_++)for(v=0;v<m;v++){var O=h+v+T*_,N=h+v+T*(_+1),D=h+(v+1)+T*(_+1),L=h+(v+1)+T*_;s.push(O,N,L),s.push(N,D,L),C+=6}a.addGroup(d,C,y),d+=C,h+=R}p("z","y","x",-1,-1,n,t,e,o,i,0),p("z","y","x",1,-1,n,t,-e,o,i,1),p("x","z","y",1,1,e,n,t,r,o,2),p("x","z","y",1,-1,e,n,-t,r,o,3),p("x","y","z",1,-1,e,t,n,r,i,4),p("x","y","z",-1,-1,e,t,-n,r,i,5),this.setIndex(s),this.addAttribute("position",new at(c,3)),this.addAttribute("normal",new at(l,3)),this.addAttribute("uv",new at(u,2))}function wt(e,t,n,r){Qe.call(this),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r},this.fromBufferGeometry(new Et(e,t,n,r)),this.mergeVertices()}function Et(e,t,n,r){vt.call(this),this.type="PlaneBufferGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r};var i,o,a=(e=e||1)/2,s=(t=t||1)/2,c=Math.floor(n)||1,l=Math.floor(r)||1,u=c+1,h=l+1,d=e/c,p=t/l,f=[],m=[],g=[],y=[];for(o=0;o<h;o++){var v=o*p-s;for(i=0;i<u;i++){var b=i*d-a;m.push(b,-v,0),g.push(0,0,1),y.push(i/c),y.push(1-o/l)}}for(o=0;o<l;o++)for(i=0;i<c;i++){var _=i+u*o,w=i+u*(o+1),E=i+1+u*(o+1),A=i+1+u*o;f.push(_,w,A),f.push(w,E,A)}this.setIndex(f),this.addAttribute("position",new at(m,3)),this.addAttribute("normal",new at(g,3)),this.addAttribute("uv",new at(y,2))}function At(e){Ce.call(this),this.type="MeshBasicMaterial",this.color=new fe(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.lights=!1,this.setValues(e)}function xt(e){Ce.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==e&&(void 0!==e.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(e))}function St(e,t){this.origin=void 0!==e?e:new b,this.direction=void 0!==t?t:new b}function Tt(e,t){this.start=void 0!==e?e:new b,this.end=void 0!==t?t:new b}function Mt(e,t,n){this.a=void 0!==e?e:new b,this.b=void 0!==t?t:new b,this.c=void 0!==n?n:new b}function Rt(e,t){Ge.call(this),this.type="Mesh",this.geometry=void 0!==e?e:new vt,this.material=void 0!==t?t:new At({color:16777215*Math.random()}),this.drawMode=0,this.updateMorphTargets()}function Ct(e,t,n,r){var i,o,a,s=new fe(0),c=0;function l(e,n){t.buffers.color.setClear(e.r,e.g,e.b,n,r)}return{getClearColor:function(){return s},setClearColor:function(e,t){s.set(e),l(s,c=void 0!==t?t:1)},getClearAlpha:function(){return c},setClearAlpha:function(e){l(s,c=e)},render:function(t,r,u,h){var d=r.background;null===d?l(s,c):d&&d.isColor&&(l(d,1),h=!0),(e.autoClear||h)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),d&&d.isCubeTexture?(void 0===a&&((a=new Rt(new _t(1,1,1),new xt({uniforms:ve.cube.uniforms,vertexShader:ve.cube.vertexShader,fragmentShader:ve.cube.fragmentShader,side:1,depthTest:!0,depthWrite:!1,fog:!1}))).geometry.removeAttribute("normal"),a.geometry.removeAttribute("uv"),a.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},n.update(a.geometry)),a.material.uniforms.tCube.value=d,t.push(a,a.geometry,a.material,0,null)):d&&d.isTexture&&(void 0===i&&(i=new Je(-1,1,1,-1,0,1),o=new Rt(new Et(2,2),new At({depthTest:!1,depthWrite:!1,fog:!1})),n.update(o.geometry)),o.material.map=d,e.renderBufferDirect(i,null,o.geometry,o.material,o,null))}}}function kt(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.program&&t.program&&e.program!==t.program?e.program.id-t.program.id:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function It(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function Pt(){var e=[],t=0,n=[],r=[];return{opaque:n,transparent:r,init:function(){t=0,n.length=0,r.length=0},push:function(i,o,a,s,c){var l=e[t];void 0===l?(l={id:i.id,object:i,geometry:o,material:a,program:a.program,renderOrder:i.renderOrder,z:s,group:c},e[t]=l):(l.id=i.id,l.object=i,l.geometry=o,l.material=a,l.program=a.program,l.renderOrder=i.renderOrder,l.z=s,l.group=c),(!0===a.transparent?r:n).push(l),t++},sort:function(){n.length>1&&n.sort(kt),r.length>1&&r.sort(It)}}}function Ot(){var e={};return{get:function(t,n){var r=t.id+","+n.id,i=e[r];return void 0===i&&(i=new Pt,e[r]=i),i},dispose:function(){e={}}}}function Nt(e,t){return Math.abs(t[1])-Math.abs(e[1])}function Dt(e){var t={},n=new Float32Array(8);return{update:function(r,i,o,a){var s=r.morphTargetInfluences,c=s.length,l=t[i.id];if(void 0===l){l=[];for(var u=0;u<c;u++)l[u]=[u,0];t[i.id]=l}var h=o.morphTargets&&i.morphAttributes.position,d=o.morphNormals&&i.morphAttributes.normal;for(u=0;u<c;u++){0!==(p=l[u])[1]&&(h&&i.removeAttribute("morphTarget"+u),d&&i.removeAttribute("morphNormal"+u))}for(u=0;u<c;u++){(p=l[u])[0]=u,p[1]=s[u]}for(l.sort(Nt),u=0;u<8;u++){var p;if(p=l[u]){var f=p[0],m=p[1];if(m){h&&i.addAttribute("morphTarget"+u,h[f]),d&&i.addAttribute("morphNormal"+u,d[f]),n[u]=m;continue}}n[u]=0}a.getUniforms().setValue(e,"morphTargetInfluences",n)}}}function Lt(e,t,n){var r,i,o;this.setMode=function(e){r=e},this.setIndex=function(e){i=e.type,o=e.bytesPerElement},this.render=function(t,a){e.drawElements(r,a,i,t*o),n.calls++,n.vertices+=a,r===e.TRIANGLES?n.faces+=a/3:r===e.POINTS&&(n.points+=a)},this.renderInstances=function(a,s,c){var l=t.get("ANGLE_instanced_arrays");null!==l?(l.drawElementsInstancedANGLE(r,c,i,s*o,a.maxInstancedCount),n.calls++,n.vertices+=c*a.maxInstancedCount,r===e.TRIANGLES?n.faces+=a.maxInstancedCount*c/3:r===e.POINTS&&(n.points+=a.maxInstancedCount*c)):console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}function Ft(e,t,n){var r;this.setMode=function(e){r=e},this.render=function(t,i){e.drawArrays(r,t,i),n.calls++,n.vertices+=i,r===e.TRIANGLES?n.faces+=i/3:r===e.POINTS&&(n.points+=i)},this.renderInstances=function(i,o,a){var s=t.get("ANGLE_instanced_arrays");if(null!==s){var c=i.attributes.position;c.isInterleavedBufferAttribute?(a=c.data.count,s.drawArraysInstancedANGLE(r,0,a,i.maxInstancedCount)):s.drawArraysInstancedANGLE(r,o,a,i.maxInstancedCount),n.calls++,n.vertices+=a*i.maxInstancedCount,r===e.TRIANGLES?n.faces+=i.maxInstancedCount*a/3:r===e.POINTS&&(n.points+=i.maxInstancedCount*a)}else console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}function jt(e,t,n){var r={},i={};function o(e){var a=e.target,s=r[a.id];for(var c in null!==s.index&&t.remove(s.index),s.attributes)t.remove(s.attributes[c]);a.removeEventListener("dispose",o),delete r[a.id];var l=i[a.id];l&&(t.remove(l),delete i[a.id]),(l=i[s.id])&&(t.remove(l),delete i[s.id]),n.geometries--}return{get:function(e,t){var i=r[t.id];return i||(t.addEventListener("dispose",o),t.isBufferGeometry?i=t:t.isGeometry&&(void 0===t._bufferGeometry&&(t._bufferGeometry=(new vt).setFromObject(e)),i=t._bufferGeometry),r[t.id]=i,n.geometries++,i)},update:function(n){var r=n.index,i=n.attributes;for(var o in null!==r&&t.update(r,e.ELEMENT_ARRAY_BUFFER),i)t.update(i[o],e.ARRAY_BUFFER);var a=n.morphAttributes;for(var o in a)for(var s=a[o],c=0,l=s.length;c<l;c++)t.update(s[c],e.ARRAY_BUFFER)},getWireframeAttribute:function(n){var r=i[n.id];if(r)return r;var o,a=[],s=n.index,c=n.attributes;if(null!==s)for(var l=0,u=(o=s.array).length;l<u;l+=3){var h=o[l+0],d=o[l+1],p=o[l+2];a.push(h,d,d,p,p,h)}else for(l=0,u=(o=c.position.array).length/3-1;l<u;l+=3){h=l+0,d=l+1,p=l+2;a.push(h,d,d,p,p,h)}return r=new(lt(a)>65535?ot:rt)(a,1),t.update(r,e.ELEMENT_ARRAY_BUFFER),i[n.id]=r,r}}}function Ut(e,t){var n={};return{update:function(r){var i=t.frame,o=r.geometry,a=e.get(r,o);return n[a.id]!==i&&(o.isGeometry&&a.updateFromObject(r),e.update(a),n[a.id]=i),a},dispose:function(){n={}}}}function Bt(e,t,n){var r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),!1===e.getShaderParameter(r,e.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn't compile."),""!==e.getShaderInfoLog(r)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",t===e.VERTEX_SHADER?"vertex":"fragment",e.getShaderInfoLog(r),function(e){for(var t=e.split("\n"),n=0;n<t.length;n++)t[n]=n+1+": "+t[n];return t.join("\n")}(n)),r}vt.prototype=Object.assign(Object.create(o.prototype),{constructor:vt,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(e){Array.isArray(e)?this.index=new(lt(e)>65535?ot:rt)(e,1):this.index=e},addAttribute:function(e,t){return t&&t.isBufferAttribute||t&&t.isInterleavedBufferAttribute?"index"===e?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),void this.setIndex(t)):(this.attributes[e]=t,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void this.addAttribute(e,new Ke(arguments[1],arguments[2])))},getAttribute:function(e){return this.attributes[e]},removeAttribute:function(e){return delete this.attributes[e],this},addGroup:function(e,t,n){this.groups.push({start:e,count:t,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(e,t){this.drawRange.start=e,this.drawRange.count=t},applyMatrix:function(e){var t=this.attributes.position;void 0!==t&&(e.applyToBufferAttribute(t),t.needsUpdate=!0);var n=this.attributes.normal;void 0!==n&&((new _).getNormalMatrix(e).applyToBufferAttribute(n),n.needsUpdate=!0);return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var e=new y;return function(t){return e.makeRotationX(t),this.applyMatrix(e),this}}(),rotateY:function(){var e=new y;return function(t){return e.makeRotationY(t),this.applyMatrix(e),this}}(),rotateZ:function(){var e=new y;return function(t){return e.makeRotationZ(t),this.applyMatrix(e),this}}(),translate:function(){var e=new y;return function(t,n,r){return e.makeTranslation(t,n,r),this.applyMatrix(e),this}}(),scale:function(){var e=new y;return function(t,n,r){return e.makeScale(t,n,r),this.applyMatrix(e),this}}(),lookAt:function(){var e=new Ge;return function(t){e.lookAt(t),e.updateMatrix(),this.applyMatrix(e.matrix)}}(),center:function(){this.computeBoundingBox();var e=this.boundingBox.getCenter().negate();return this.translate(e.x,e.y,e.z),e},setFromObject:function(e){var t=e.geometry;if(e.isPoints||e.isLine){var n=new at(3*t.vertices.length,3),r=new at(3*t.colors.length,3);if(this.addAttribute("position",n.copyVector3sArray(t.vertices)),this.addAttribute("color",r.copyColorsArray(t.colors)),t.lineDistances&&t.lineDistances.length===t.vertices.length){var i=new at(t.lineDistances.length,1);this.addAttribute("lineDistance",i.copyArray(t.lineDistances))}null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone())}else e.isMesh&&t&&t.isGeometry&&this.fromGeometry(t);return this},setFromPoints:function(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e[n];t.push(i.x,i.y,i.z||0)}return this.addAttribute("position",new at(t,3)),this},updateFromObject:function(e){var t,n=e.geometry;if(e.isMesh){var r=n.__directGeometry;if(!0===n.elementsNeedUpdate&&(r=void 0,n.elementsNeedUpdate=!1),void 0===r)return this.fromGeometry(n);r.verticesNeedUpdate=n.verticesNeedUpdate,r.normalsNeedUpdate=n.normalsNeedUpdate,r.colorsNeedUpdate=n.colorsNeedUpdate,r.uvsNeedUpdate=n.uvsNeedUpdate,r.groupsNeedUpdate=n.groupsNeedUpdate,n.verticesNeedUpdate=!1,n.normalsNeedUpdate=!1,n.colorsNeedUpdate=!1,n.uvsNeedUpdate=!1,n.groupsNeedUpdate=!1,n=r}return!0===n.verticesNeedUpdate&&(void 0!==(t=this.attributes.position)&&(t.copyVector3sArray(n.vertices),t.needsUpdate=!0),n.verticesNeedUpdate=!1),!0===n.normalsNeedUpdate&&(void 0!==(t=this.attributes.normal)&&(t.copyVector3sArray(n.normals),t.needsUpdate=!0),n.normalsNeedUpdate=!1),!0===n.colorsNeedUpdate&&(void 0!==(t=this.attributes.color)&&(t.copyColorsArray(n.colors),t.needsUpdate=!0),n.colorsNeedUpdate=!1),n.uvsNeedUpdate&&(void 0!==(t=this.attributes.uv)&&(t.copyVector2sArray(n.uvs),t.needsUpdate=!0),n.uvsNeedUpdate=!1),n.lineDistancesNeedUpdate&&(void 0!==(t=this.attributes.lineDistance)&&(t.copyArray(n.lineDistances),t.needsUpdate=!0),n.lineDistancesNeedUpdate=!1),n.groupsNeedUpdate&&(n.computeGroups(e.geometry),this.groups=n.groups,n.groupsNeedUpdate=!1),this},fromGeometry:function(e){return e.__directGeometry=(new ct).fromGeometry(e),this.fromDirectGeometry(e.__directGeometry)},fromDirectGeometry:function(e){var t=new Float32Array(3*e.vertices.length);if(this.addAttribute("position",new Ke(t,3).copyVector3sArray(e.vertices)),e.normals.length>0){var n=new Float32Array(3*e.normals.length);this.addAttribute("normal",new Ke(n,3).copyVector3sArray(e.normals))}if(e.colors.length>0){var r=new Float32Array(3*e.colors.length);this.addAttribute("color",new Ke(r,3).copyColorsArray(e.colors))}if(e.uvs.length>0){var i=new Float32Array(2*e.uvs.length);this.addAttribute("uv",new Ke(i,2).copyVector2sArray(e.uvs))}if(e.uvs2.length>0){var o=new Float32Array(2*e.uvs2.length);this.addAttribute("uv2",new Ke(o,2).copyVector2sArray(e.uvs2))}if(e.indices.length>0){var a=new(lt(e.indices)>65535?Uint32Array:Uint16Array)(3*e.indices.length);this.setIndex(new Ke(a,1).copyIndicesArray(e.indices))}for(var s in this.groups=e.groups,e.morphTargets){for(var c=[],l=e.morphTargets[s],u=0,h=l.length;u<h;u++){var d=l[u],p=new at(3*d.length,3);c.push(p.copyVector3sArray(d))}this.morphAttributes[s]=c}if(e.skinIndices.length>0){var f=new at(4*e.skinIndices.length,4);this.addAttribute("skinIndex",f.copyVector4sArray(e.skinIndices))}if(e.skinWeights.length>0){var m=new at(4*e.skinWeights.length,4);this.addAttribute("skinWeight",m.copyVector4sArray(e.skinWeights))}return null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new Pe);var e=this.attributes.position;void 0!==e?this.boundingBox.setFromBufferAttribute(e):this.boundingBox.makeEmpty(),(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){var e=new Pe,t=new b;return function(){null===this.boundingSphere&&(this.boundingSphere=new Oe);var n=this.attributes.position;if(n){var r=this.boundingSphere.center;e.setFromBufferAttribute(n),e.getCenter(r);for(var i=0,o=0,a=n.count;o<a;o++)t.x=n.getX(o),t.y=n.getY(o),t.z=n.getZ(o),i=Math.max(i,r.distanceToSquared(t));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var e=this.index,t=this.attributes,n=this.groups;if(t.position){var r=t.position.array;if(void 0===t.normal)this.addAttribute("normal",new Ke(new Float32Array(r.length),3));else for(var i=t.normal.array,o=0,a=i.length;o<a;o++)i[o]=0;var s,c,l,u=t.normal.array,h=new b,d=new b,p=new b,f=new b,m=new b;if(e){var g=e.array;0===n.length&&this.addGroup(0,g.length);for(var y=0,v=n.length;y<v;++y){var _=n[y],w=_.start;for(o=w,a=w+_.count;o<a;o+=3)s=3*g[o+0],c=3*g[o+1],l=3*g[o+2],h.fromArray(r,s),d.fromArray(r,c),p.fromArray(r,l),f.subVectors(p,d),m.subVectors(h,d),f.cross(m),u[s]+=f.x,u[s+1]+=f.y,u[s+2]+=f.z,u[c]+=f.x,u[c+1]+=f.y,u[c+2]+=f.z,u[l]+=f.x,u[l+1]+=f.y,u[l+2]+=f.z}}else for(o=0,a=r.length;o<a;o+=9)h.fromArray(r,o),d.fromArray(r,o+3),p.fromArray(r,o+6),f.subVectors(p,d),m.subVectors(h,d),f.cross(m),u[o]=f.x,u[o+1]=f.y,u[o+2]=f.z,u[o+3]=f.x,u[o+4]=f.y,u[o+5]=f.z,u[o+6]=f.x,u[o+7]=f.y,u[o+8]=f.z;this.normalizeNormals(),t.normal.needsUpdate=!0}},merge:function(e,t){if(e&&e.isBufferGeometry){void 0===t&&(t=0);var n=this.attributes;for(var r in n)if(void 0!==e.attributes[r])for(var i=n[r].array,o=e.attributes[r],a=o.array,s=0,c=o.itemSize*t;s<a.length;s++,c++)i[c]=a[s];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",e)},normalizeNormals:function(){var e=new b;return function(){for(var t=this.attributes.normal,n=0,r=t.count;n<r;n++)e.x=t.getX(n),e.y=t.getY(n),e.z=t.getZ(n),e.normalize(),t.setXYZ(n,e.x,e.y,e.z)}}(),toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var e=new vt,t=this.index.array,n=this.attributes;for(var r in n){for(var i=n[r],o=i.array,a=i.itemSize,s=new o.constructor(t.length*a),c=0,l=0,u=0,h=t.length;u<h;u++){c=t[u]*a;for(var d=0;d<a;d++)s[l++]=o[c++]}e.addAttribute(r,new Ke(s,a))}return e},toJSON:function(){var e={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),void 0!==this.parameters){var t=this.parameters;for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};var r=this.index;if(null!==r){var i=Array.prototype.slice.call(r.array);e.data.index={type:r.array.constructor.name,array:i}}var o=this.attributes;for(var n in o){var a=o[n];i=Array.prototype.slice.call(a.array);e.data.attributes[n]={itemSize:a.itemSize,type:a.array.constructor.name,array:i,normalized:a.normalized}}var s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(e.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),e},clone:function(){return(new vt).copy(this)},copy:function(e){var t,n,r;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=e.name;var i=e.index;null!==i&&this.setIndex(i.clone());var o=e.attributes;for(t in o){var a=o[t];this.addAttribute(t,a.clone())}var s=e.morphAttributes;for(t in s){var c=[],l=s[t];for(n=0,r=l.length;n<r;n++)c.push(l[n].clone());this.morphAttributes[t]=c}var u=e.groups;for(n=0,r=u.length;n<r;n++){var h=u[n];this.addGroup(h.start,h.count,h.materialIndex)}var d=e.boundingBox;null!==d&&(this.boundingBox=d.clone());var p=e.boundingSphere;return null!==p&&(this.boundingSphere=p.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),bt.prototype=Object.create(Qe.prototype),bt.prototype.constructor=bt,_t.prototype=Object.create(vt.prototype),_t.prototype.constructor=_t,wt.prototype=Object.create(Qe.prototype),wt.prototype.constructor=wt,Et.prototype=Object.create(vt.prototype),Et.prototype.constructor=Et,At.prototype=Object.create(Ce.prototype),At.prototype.constructor=At,At.prototype.isMeshBasicMaterial=!0,At.prototype.copy=function(e){return Ce.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this},xt.prototype=Object.create(Ce.prototype),xt.prototype.constructor=xt,xt.prototype.isShaderMaterial=!0,xt.prototype.copy=function(e){return Ce.prototype.copy.call(this,e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=ge.clone(e.uniforms),this.defines=e.defines,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.lights=e.lights,this.clipping=e.clipping,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.extensions=e.extensions,this},xt.prototype.toJSON=function(e){var t=Ce.prototype.toJSON.call(this,e);return t.uniforms=this.uniforms,t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t},Object.assign(St.prototype,{set:function(e,t){return this.origin.copy(e),this.direction.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this},at:function(e,t){return(t||new b).copy(this.direction).multiplyScalar(e).add(this.origin)},lookAt:function(e){return this.direction.copy(e).sub(this.origin).normalize(),this},recast:function(){var e=new b;return function(t){return this.origin.copy(this.at(t,e)),this}}(),closestPointToPoint:function(e,t){var n=t||new b;n.subVectors(e,this.origin);var r=n.dot(this.direction);return r<0?n.copy(this.origin):n.copy(this.direction).multiplyScalar(r).add(this.origin)},distanceToPoint:function(e){return Math.sqrt(this.distanceSqToPoint(e))},distanceSqToPoint:function(){var e=new b;return function(t){var n=e.subVectors(t,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(t):(e.copy(this.direction).multiplyScalar(n).add(this.origin),e.distanceToSquared(t))}}(),distanceSqToSegment:(ht=new b,dt=new b,pt=new b,function(e,t,n,r){ht.copy(e).add(t).multiplyScalar(.5),dt.copy(t).sub(e).normalize(),pt.copy(this.origin).sub(ht);var i,o,a,s,c=.5*e.distanceTo(t),l=-this.direction.dot(dt),u=pt.dot(this.direction),h=-pt.dot(dt),d=pt.lengthSq(),p=Math.abs(1-l*l);if(p>0)if(o=l*u-h,s=c*p,(i=l*h-u)>=0)if(o>=-s)if(o<=s){var f=1/p;a=(i*=f)*(i+l*(o*=f)+2*u)+o*(l*i+o+2*h)+d}else o=c,a=-(i=Math.max(0,-(l*o+u)))*i+o*(o+2*h)+d;else o=-c,a=-(i=Math.max(0,-(l*o+u)))*i+o*(o+2*h)+d;else o<=-s?a=-(i=Math.max(0,-(-l*c+u)))*i+(o=i>0?-c:Math.min(Math.max(-c,-h),c))*(o+2*h)+d:o<=s?(i=0,a=(o=Math.min(Math.max(-c,-h),c))*(o+2*h)+d):a=-(i=Math.max(0,-(l*c+u)))*i+(o=i>0?c:Math.min(Math.max(-c,-h),c))*(o+2*h)+d;else o=l>0?-c:c,a=-(i=Math.max(0,-(l*o+u)))*i+o*(o+2*h)+d;return n&&n.copy(this.direction).multiplyScalar(i).add(this.origin),r&&r.copy(dt).multiplyScalar(o).add(ht),a}),intersectSphere:function(){var e=new b;return function(t,n){e.subVectors(t.center,this.origin);var r=e.dot(this.direction),i=e.dot(e)-r*r,o=t.radius*t.radius;if(i>o)return null;var a=Math.sqrt(o-i),s=r-a,c=r+a;return s<0&&c<0?null:s<0?this.at(c,n):this.at(s,n)}}(),intersectsSphere:function(e){return this.distanceToPoint(e.center)<=e.radius},distanceToPlane:function(e){var t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null},intersectPlane:function(e,t){var n=this.distanceToPlane(e);return null===n?null:this.at(n,t)},intersectsPlane:function(e){var t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0},intersectBox:function(e,t){var n,r,i,o,a,s,c=1/this.direction.x,l=1/this.direction.y,u=1/this.direction.z,h=this.origin;return c>=0?(n=(e.min.x-h.x)*c,r=(e.max.x-h.x)*c):(n=(e.max.x-h.x)*c,r=(e.min.x-h.x)*c),l>=0?(i=(e.min.y-h.y)*l,o=(e.max.y-h.y)*l):(i=(e.max.y-h.y)*l,o=(e.min.y-h.y)*l),n>o||i>r?null:((i>n||n!=n)&&(n=i),(o<r||r!=r)&&(r=o),u>=0?(a=(e.min.z-h.z)*u,s=(e.max.z-h.z)*u):(a=(e.max.z-h.z)*u,s=(e.min.z-h.z)*u),n>s||a>r?null:((a>n||n!=n)&&(n=a),(s<r||r!=r)&&(r=s),r<0?null:this.at(n>=0?n:r,t)))},intersectsBox:(ut=new b,function(e){return null!==this.intersectBox(e,ut)}),intersectTriangle:function(){var e=new b,t=new b,n=new b,r=new b;return function(i,o,a,s,c){t.subVectors(o,i),n.subVectors(a,i),r.crossVectors(t,n);var l,u=this.direction.dot(r);if(u>0){if(s)return null;l=1}else{if(!(u<0))return null;l=-1,u=-u}e.subVectors(this.origin,i);var h=l*this.direction.dot(n.crossVectors(e,n));if(h<0)return null;var d=l*this.direction.dot(t.cross(e));if(d<0)return null;if(h+d>u)return null;var p=-l*e.dot(r);return p<0?null:this.at(p/u,c)}}(),applyMatrix4:function(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this},equals:function(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}}),Object.assign(Tt.prototype,{set:function(e,t){return this.start.copy(e),this.end.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.start.copy(e.start),this.end.copy(e.end),this},getCenter:function(e){return(e||new b).addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(e){return(e||new b).subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(e,t){var n=t||new b;return this.delta(n).multiplyScalar(e).add(this.start)},closestPointToPointParameter:(ft=new b,mt=new b,function(e,t){ft.subVectors(e,this.start),mt.subVectors(this.end,this.start);var n=mt.dot(mt),r=mt.dot(ft)/n;return t&&(r=m.clamp(r,0,1)),r}),closestPointToPoint:function(e,t,n){var r=this.closestPointToPointParameter(e,t),i=n||new b;return this.delta(i).multiplyScalar(r).add(this.start)},applyMatrix4:function(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this},equals:function(e){return e.start.equals(this.start)&&e.end.equals(this.end)}}),Object.assign(Mt,{normal:(gt=new b,function(e,t,n,r){var i=r||new b;i.subVectors(n,t),gt.subVectors(e,t),i.cross(gt);var o=i.lengthSq();return o>0?i.multiplyScalar(1/Math.sqrt(o)):i.set(0,0,0)}),barycoordFromPoint:function(){var e=new b,t=new b,n=new b;return function(r,i,o,a,s){e.subVectors(a,i),t.subVectors(o,i),n.subVectors(r,i);var c=e.dot(e),l=e.dot(t),u=e.dot(n),h=t.dot(t),d=t.dot(n),p=c*h-l*l,f=s||new b;if(0===p)return f.set(-2,-1,-1);var m=1/p,g=(h*u-l*d)*m,y=(c*d-l*u)*m;return f.set(1-g-y,y,g)}}(),containsPoint:function(){var e=new b;return function(t,n,r,i){var o=Mt.barycoordFromPoint(t,n,r,i,e);return o.x>=0&&o.y>=0&&o.x+o.y<=1}}()}),Object.assign(Mt.prototype,{set:function(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this},setFromPointsAndIndices:function(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this},area:function(){var e=new b,t=new b;return function(){return e.subVectors(this.c,this.b),t.subVectors(this.a,this.b),.5*e.cross(t).length()}}(),midpoint:function(e){return(e||new b).addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},normal:function(e){return Mt.normal(this.a,this.b,this.c,e)},plane:function(e){return(e||new Ne).setFromCoplanarPoints(this.a,this.b,this.c)},barycoordFromPoint:function(e,t){return Mt.barycoordFromPoint(e,this.a,this.b,this.c,t)},containsPoint:function(e){return Mt.containsPoint(e,this.a,this.b,this.c)},intersectsBox:function(e){return e.intersectsTriangle(this)},closestPointToPoint:function(){var e=new Ne,t=[new Tt,new Tt,new Tt],n=new b,r=new b;return function(i,o){var a=o||new b,s=1/0;if(e.setFromCoplanarPoints(this.a,this.b,this.c),e.projectPoint(i,n),!0===this.containsPoint(n))a.copy(n);else{t[0].set(this.a,this.b),t[1].set(this.b,this.c),t[2].set(this.c,this.a);for(var c=0;c<t.length;c++){t[c].closestPointToPoint(n,!0,r);var l=n.distanceToSquared(r);l<s&&(s=l,a.copy(r))}}return a}}(),equals:function(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}),Rt.prototype=Object.assign(Object.create(Ge.prototype),{constructor:Rt,isMesh:!0,setDrawMode:function(e){this.drawMode=e},copy:function(e){return Ge.prototype.copy.call(this,e),this.drawMode=e.drawMode,void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this},updateMorphTargets:function(){var e,t,n,r=this.geometry;if(r.isBufferGeometry){var i=r.morphAttributes,o=Object.keys(i);if(o.length>0){var a=i[o[0]];if(void 0!==a)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},e=0,t=a.length;e<t;e++)n=a[e].name||String(e),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=e}}else{var s=r.morphTargets;if(void 0!==s&&s.length>0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},e=0,t=s.length;e<t;e++)n=s[e].name||String(e),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=e}},raycast:function(){var e=new y,t=new St,n=new Oe,r=new b,i=new b,o=new b,a=new b,s=new b,c=new b,l=new g,u=new g,h=new g,d=new b,p=new b,f=new b;function m(e,t,n,r,i,o,a){return Mt.barycoordFromPoint(e,t,n,r,d),i.multiplyScalar(d.x),o.multiplyScalar(d.y),a.multiplyScalar(d.z),i.add(o).add(a),i.clone()}function v(e,t,n,r,i,o,a,s){if(null===(1===t.side?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,2!==t.side,s)))return null;f.copy(s),f.applyMatrix4(e.matrixWorld);var c=n.ray.origin.distanceTo(f);return c<n.near||c>n.far?null:{distance:c,point:f.clone(),object:e}}function _(e,t,n,a,s,c,d,f){r.fromBufferAttribute(a,c),i.fromBufferAttribute(a,d),o.fromBufferAttribute(a,f);var g=v(e,e.material,t,n,r,i,o,p);return g&&(s&&(l.fromBufferAttribute(s,c),u.fromBufferAttribute(s,d),h.fromBufferAttribute(s,f),g.uv=m(p,r,i,o,l,u,h)),g.face=new Ze(c,d,f,Mt.normal(r,i,o)),g.faceIndex=c),g}return function(d,f){var g,y=this.geometry,b=this.material,w=this.matrixWorld;if(void 0!==b&&(null===y.boundingSphere&&y.computeBoundingSphere(),n.copy(y.boundingSphere),n.applyMatrix4(w),!1!==d.ray.intersectsSphere(n)&&(e.getInverse(w),t.copy(d.ray).applyMatrix4(e),null===y.boundingBox||!1!==t.intersectsBox(y.boundingBox))))if(y.isBufferGeometry){var E,A,x,S,T,M=y.index,R=y.attributes.position,C=y.attributes.uv;if(null!==M)for(S=0,T=M.count;S<T;S+=3)E=M.getX(S),A=M.getX(S+1),x=M.getX(S+2),(g=_(this,d,t,R,C,E,A,x))&&(g.faceIndex=Math.floor(S/3),f.push(g));else if(void 0!==R)for(S=0,T=R.count;S<T;S+=3)(g=_(this,d,t,R,C,E=S,A=S+1,x=S+2))&&(g.index=E,f.push(g))}else if(y.isGeometry){var k,I,P,O,N=Array.isArray(b),D=y.vertices,L=y.faces,F=y.faceVertexUvs[0];F.length>0&&(O=F);for(var j=0,U=L.length;j<U;j++){var B=L[j],V=N?b[B.materialIndex]:b;if(void 0!==V){if(k=D[B.a],I=D[B.b],P=D[B.c],!0===V.morphTargets){var H=y.morphTargets,z=this.morphTargetInfluences;r.set(0,0,0),i.set(0,0,0),o.set(0,0,0);for(var q=0,G=H.length;q<G;q++){var W=z[q];if(0!==W){var J=H[q].vertices;r.addScaledVector(a.subVectors(J[B.a],k),W),i.addScaledVector(s.subVectors(J[B.b],I),W),o.addScaledVector(c.subVectors(J[B.c],P),W)}}r.add(k),i.add(I),o.add(P),k=r,I=i,P=o}if(g=v(this,V,d,t,k,I,P,p)){if(O&&O[j]){var Z=O[j];l.copy(Z[0]),u.copy(Z[1]),h.copy(Z[2]),g.uv=m(p,k,I,P,l,u,h)}g.face=B,g.faceIndex=j,f.push(g)}}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}});var Vt=0;function Ht(e){switch(e){case 3e3:return["Linear","( value )"];case 3001:return["sRGB","( value )"];case 3002:return["RGBE","( value )"];case 3004:return["RGBM","( value, 7.0 )"];case 3005:return["RGBM","( value, 16.0 )"];case 3006:return["RGBD","( value, 256.0 )"];case 3007:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+e)}}function zt(e,t){var n=Ht(t);return"vec4 "+e+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function qt(e,t){var n;switch(t){case 1:n="Linear";break;case 2:n="Reinhard";break;case 3:n="Uncharted2";break;case 4:n="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+t)}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function Gt(e){return""!==e}function Wt(e,t){return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights)}function Jt(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}function Zt(e){return e.replace(/^[ \t]*#include +<([\w\d.]+)>/gm,(function(e,t){var n=ye[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return Zt(n)}))}function Yt(e){return e.replace(/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,(function(e,t,n,r){for(var i="",o=parseInt(t);o<parseInt(n);o++)i+=r.replace(/\[ i \]/g,"[ "+o+" ]");return i}))}function Xt(e,t,n,r,i,o){var a=e.context,s=r.defines,c=i.vertexShader,l=i.fragmentShader,u="SHADOWMAP_TYPE_BASIC";1===o.shadowMapType?u="SHADOWMAP_TYPE_PCF":2===o.shadowMapType&&(u="SHADOWMAP_TYPE_PCF_SOFT");var h="ENVMAP_TYPE_CUBE",d="ENVMAP_MODE_REFLECTION",p="ENVMAP_BLENDING_MULTIPLY";if(o.envMap){switch(r.envMap.mapping){case 301:case 302:h="ENVMAP_TYPE_CUBE";break;case 306:case 307:h="ENVMAP_TYPE_CUBE_UV";break;case 303:case 304:h="ENVMAP_TYPE_EQUIREC";break;case 305:h="ENVMAP_TYPE_SPHERE"}switch(r.envMap.mapping){case 302:case 304:d="ENVMAP_MODE_REFRACTION"}switch(r.combine){case 0:p="ENVMAP_BLENDING_MULTIPLY";break;case 1:p="ENVMAP_BLENDING_MIX";break;case 2:p="ENVMAP_BLENDING_ADD"}}var f,m,g,y,v,b=e.gammaFactor>0?e.gammaFactor:1,_=function(e,t,n){return[(e=e||{}).derivatives||t.envMapCubeUV||t.bumpMap||t.normalMap||t.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(e.fragDepth||t.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",e.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(e.shaderTextureLOD||t.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Gt).join("\n")}(r.extensions,o,t),w=function(e){var t=[];for(var n in e){var r=e[n];!1!==r&&t.push("#define "+n+" "+r)}return t.join("\n")}(s),E=a.createProgram();r.isRawShaderMaterial?((f=[w].filter(Gt).join("\n")).length>0&&(f+="\n"),(m=[_,w].filter(Gt).join("\n")).length>0&&(m+="\n")):(f=["precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,w,o.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+b,"#define MAX_BONES "+o.maxBones,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+d:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.displacementMap&&o.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.flatShading?"#define FLAT_SHADED":"",o.skinning?"#define USE_SKINNING":"",o.useVertexTexture?"#define BONE_TEXTURE":"",o.morphTargets?"#define USE_MORPHTARGETS":"",o.morphNormals&&!1===o.flatShading?"#define USE_MORPHNORMALS":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+u:"",o.sizeAttenuation?"#define USE_SIZEATTENUATION":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&t.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Gt).join("\n"),m=[_,"precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,w,o.alphaTest?"#define ALPHATEST "+o.alphaTest:"","#define GAMMA_FACTOR "+b,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+h:"",o.envMap?"#define "+d:"",o.envMap?"#define "+p:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.gradientMap?"#define USE_GRADIENTMAP":"",o.flatShading?"#define FLAT_SHADED":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+u:"",o.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",o.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&t.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",o.envMap&&t.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",0!==o.toneMapping?"#define TONE_MAPPING":"",0!==o.toneMapping?ye.tonemapping_pars_fragment:"",0!==o.toneMapping?qt("toneMapping",o.toneMapping):"",o.dithering?"#define DITHERING":"",o.outputEncoding||o.mapEncoding||o.envMapEncoding||o.emissiveMapEncoding?ye.encodings_pars_fragment:"",o.mapEncoding?zt("mapTexelToLinear",o.mapEncoding):"",o.envMapEncoding?zt("envMapTexelToLinear",o.envMapEncoding):"",o.emissiveMapEncoding?zt("emissiveMapTexelToLinear",o.emissiveMapEncoding):"",o.outputEncoding?(g="linearToOutputTexel",y=o.outputEncoding,v=Ht(y),"vec4 "+g+"( vec4 value ) { return LinearTo"+v[0]+v[1]+"; }"):"",o.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\n"].filter(Gt).join("\n")),c=Jt(c=Wt(c=Zt(c),o),o),l=Jt(l=Wt(l=Zt(l),o),o);var A=f+(c=Yt(c)),x=m+(l=Yt(l)),S=Bt(a,a.VERTEX_SHADER,A),T=Bt(a,a.FRAGMENT_SHADER,x);a.attachShader(E,S),a.attachShader(E,T),void 0!==r.index0AttributeName?a.bindAttribLocation(E,0,r.index0AttributeName):!0===o.morphTargets&&a.bindAttribLocation(E,0,"position"),a.linkProgram(E);var M,R,C=a.getProgramInfoLog(E).trim(),k=a.getShaderInfoLog(S).trim(),I=a.getShaderInfoLog(T).trim(),P=!0,O=!0;return!1===a.getProgramParameter(E,a.LINK_STATUS)?(P=!1,console.error("THREE.WebGLProgram: shader error: ",a.getError(),"gl.VALIDATE_STATUS",a.getProgramParameter(E,a.VALIDATE_STATUS),"gl.getProgramInfoLog",C,k,I)):""!==C?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",C):""!==k&&""!==I||(O=!1),O&&(this.diagnostics={runnable:P,material:r,programLog:C,vertexShader:{log:k,prefix:f},fragmentShader:{log:I,prefix:m}}),a.deleteShader(S),a.deleteShader(T),this.getUniforms=function(){return void 0===M&&(M=new de(a,E,e)),M},this.getAttributes=function(){return void 0===R&&(R=function(e,t){for(var n={},r=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),i=0;i<r;i++){var o=e.getActiveAttrib(t,i).name;n[o]=e.getAttribLocation(t,o)}return n}(a,E)),R},this.destroy=function(){a.deleteProgram(E),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.id=Vt++,this.code=n,this.usedTimes=1,this.program=E,this.vertexShader=S,this.fragmentShader=T,this}function Qt(e,t,n){var r=[],i={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow"},o=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering"];function a(e,t){var n;return e?e.isTexture?n=e.encoding:e.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),n=e.texture.encoding):n=3e3,3e3===n&&t&&(n=3007),n}this.getParameters=function(t,r,o,s,c,l,u){var h=i[t.type],d=u.isSkinnedMesh?function(e){var t=e.skeleton.bones;if(n.floatVertexTextures)return 1024;var r=n.maxVertexUniforms,i=Math.floor((r-20)/4),o=Math.min(i,t.length);return o<t.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+t.length+" bones. This GPU supports "+o+"."),0):o}(u):0,p=n.precision;null!==t.precision&&(p=n.getMaxPrecision(t.precision))!==t.precision&&console.warn("THREE.WebGLProgram.getParameters:",t.precision,"not supported, using",p,"instead.");var f=e.getRenderTarget();return{shaderID:h,precision:p,supportsVertexTextures:n.vertexTextures,outputEncoding:a(f?f.texture:null,e.gammaOutput),map:!!t.map,mapEncoding:a(t.map,e.gammaInput),envMap:!!t.envMap,envMapMode:t.envMap&&t.envMap.mapping,envMapEncoding:a(t.envMap,e.gammaInput),envMapCubeUV:!!t.envMap&&(306===t.envMap.mapping||307===t.envMap.mapping),lightMap:!!t.lightMap,aoMap:!!t.aoMap,emissiveMap:!!t.emissiveMap,emissiveMapEncoding:a(t.emissiveMap,e.gammaInput),bumpMap:!!t.bumpMap,normalMap:!!t.normalMap,displacementMap:!!t.displacementMap,roughnessMap:!!t.roughnessMap,metalnessMap:!!t.metalnessMap,specularMap:!!t.specularMap,alphaMap:!!t.alphaMap,gradientMap:!!t.gradientMap,combine:t.combine,vertexColors:t.vertexColors,fog:!!s,useFog:t.fog,fogExp:s&&s.isFogExp2,flatShading:t.flatShading,sizeAttenuation:t.sizeAttenuation,logarithmicDepthBuffer:n.logarithmicDepthBuffer,skinning:t.skinning&&d>0,maxBones:d,useVertexTexture:n.floatVertexTextures,morphTargets:t.morphTargets,morphNormals:t.morphNormals,maxMorphTargets:e.maxMorphTargets,maxMorphNormals:e.maxMorphNormals,numDirLights:r.directional.length,numPointLights:r.point.length,numSpotLights:r.spot.length,numRectAreaLights:r.rectArea.length,numHemiLights:r.hemi.length,numClippingPlanes:c,numClipIntersection:l,dithering:t.dithering,shadowMapEnabled:e.shadowMap.enabled&&u.receiveShadow&&o.length>0,shadowMapType:e.shadowMap.type,toneMapping:e.toneMapping,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:t.premultipliedAlpha,alphaTest:t.alphaTest,doubleSided:2===t.side,flipSided:1===t.side,depthPacking:void 0!==t.depthPacking&&t.depthPacking}},this.getProgramCode=function(t,n){var r=[];if(n.shaderID?r.push(n.shaderID):(r.push(t.fragmentShader),r.push(t.vertexShader)),void 0!==t.defines)for(var i in t.defines)r.push(i),r.push(t.defines[i]);for(var a=0;a<o.length;a++)r.push(n[o[a]]);return r.push(t.onBeforeCompile.toString()),r.push(e.gammaOutput),r.join()},this.acquireProgram=function(n,i,o,a){for(var s,c=0,l=r.length;c<l;c++){var u=r[c];if(u.code===a){++(s=u).usedTimes;break}}return void 0===s&&(s=new Xt(e,t,a,n,i,o),r.push(s)),s},this.releaseProgram=function(e){if(0==--e.usedTimes){var t=r.indexOf(e);r[t]=r[r.length-1],r.pop(),e.destroy()}},this.programs=r}function Kt(e,t,n,r,i,o,a,s){var c,l="undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext,u={};function h(e,t){if(e.width>t||e.height>t){var n=t/Math.max(e.width,e.height),r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return r.width=Math.floor(e.width*n),r.height=Math.floor(e.height*n),r.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,r.width,r.height),console.warn("THREE.WebGLRenderer: image is too big ("+e.width+"x"+e.height+"). Resized to "+r.width+"x"+r.height,e),r}return e}function d(e){return m.isPowerOfTwo(e.width)&&m.isPowerOfTwo(e.height)}function p(e,t){return e.generateMipmaps&&t&&1003!==e.minFilter&&1006!==e.minFilter}function f(t){return 1003===t||1004===t||1005===t?e.NEAREST:e.LINEAR}function g(t){var n=t.target;n.removeEventListener("dispose",g),function(t){var n=r.get(t);if(t.image&&n.__image__webglTextureCube)e.deleteTexture(n.__image__webglTextureCube);else{if(void 0===n.__webglInit)return;e.deleteTexture(n.__webglTexture)}r.remove(t)}(n),n.isVideoTexture&&delete u[n.id],a.textures--}function y(t){var n=t.target;n.removeEventListener("dispose",y),function(t){var n=r.get(t),i=r.get(t.texture);if(!t)return;void 0!==i.__webglTexture&&e.deleteTexture(i.__webglTexture);t.depthTexture&&t.depthTexture.dispose();if(t.isWebGLRenderTargetCube)for(var o=0;o<6;o++)e.deleteFramebuffer(n.__webglFramebuffer[o]),n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer[o]);else e.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer);r.remove(t.texture),r.remove(t)}(n),a.textures--}function v(t,f){var y=r.get(t);if(t.isVideoTexture&&function(e){var t=e.id,n=s.frame;u[t]!==n&&(u[t]=n,e.update())}(t),t.version>0&&y.__version!==t.version){var v=t.image;if(void 0===v)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",t);else{if(!1!==v.complete)return void function(t,r,s){void 0===t.__webglInit&&(t.__webglInit=!0,r.addEventListener("dispose",g),t.__webglTexture=e.createTexture(),a.textures++);n.activeTexture(e.TEXTURE0+s),n.bindTexture(e.TEXTURE_2D,t.__webglTexture),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,r.unpackAlignment);var u=h(r.image,i.maxTextureSize);(function(e){return 1001!==e.wrapS||1001!==e.wrapT||1003!==e.minFilter&&1006!==e.minFilter})(r)&&!1===d(u)&&(u=function(e){return e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageBitmap?(void 0===c&&(c=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),c.width=m.floorPowerOfTwo(e.width),c.height=m.floorPowerOfTwo(e.height),c.getContext("2d").drawImage(e,0,0,c.width,c.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+e.width+"x"+e.height+"). Resized to "+c.width+"x"+c.height,e),c):e}(u));var f=d(u),y=o.convert(r.format),v=o.convert(r.type);b(e.TEXTURE_2D,r,f);var _,w=r.mipmaps;if(r.isDepthTexture){var E=e.DEPTH_COMPONENT;if(1015===r.type){if(!l)throw new Error("Float Depth Texture only supported in WebGL2.0");E=e.DEPTH_COMPONENT32F}else l&&(E=e.DEPTH_COMPONENT16);1026===r.format&&E===e.DEPTH_COMPONENT&&1012!==r.type&&1014!==r.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=1012,v=o.convert(r.type)),1027===r.format&&(E=e.DEPTH_STENCIL,1020!==r.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=1020,v=o.convert(r.type))),n.texImage2D(e.TEXTURE_2D,0,E,u.width,u.height,0,y,v,null)}else if(r.isDataTexture)if(w.length>0&&f){for(var A=0,x=w.length;A<x;A++)_=w[A],n.texImage2D(e.TEXTURE_2D,A,y,_.width,_.height,0,y,v,_.data);r.generateMipmaps=!1}else n.texImage2D(e.TEXTURE_2D,0,y,u.width,u.height,0,y,v,u.data);else if(r.isCompressedTexture)for(A=0,x=w.length;A<x;A++)_=w[A],1023!==r.format&&1022!==r.format?n.getCompressedTextureFormats().indexOf(y)>-1?n.compressedTexImage2D(e.TEXTURE_2D,A,y,_.width,_.height,0,_.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(e.TEXTURE_2D,A,y,_.width,_.height,0,y,v,_.data);else if(w.length>0&&f){for(A=0,x=w.length;A<x;A++)_=w[A],n.texImage2D(e.TEXTURE_2D,A,y,y,v,_);r.generateMipmaps=!1}else n.texImage2D(e.TEXTURE_2D,0,y,y,v,u);p(r,f)&&e.generateMipmap(e.TEXTURE_2D);t.__version=r.version,r.onUpdate&&r.onUpdate(r)}(y,t,f);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",t)}}n.activeTexture(e.TEXTURE0+f),n.bindTexture(e.TEXTURE_2D,y.__webglTexture)}function b(n,a,s){var c;if(s?(e.texParameteri(n,e.TEXTURE_WRAP_S,o.convert(a.wrapS)),e.texParameteri(n,e.TEXTURE_WRAP_T,o.convert(a.wrapT)),e.texParameteri(n,e.TEXTURE_MAG_FILTER,o.convert(a.magFilter)),e.texParameteri(n,e.TEXTURE_MIN_FILTER,o.convert(a.minFilter))):(e.texParameteri(n,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(n,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),1001===a.wrapS&&1001===a.wrapT||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",a),e.texParameteri(n,e.TEXTURE_MAG_FILTER,f(a.magFilter)),e.texParameteri(n,e.TEXTURE_MIN_FILTER,f(a.minFilter)),1003!==a.minFilter&&1006!==a.minFilter&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",a)),c=t.get("EXT_texture_filter_anisotropic")){if(1015===a.type&&null===t.get("OES_texture_float_linear"))return;if(1016===a.type&&null===t.get("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(e.texParameterf(n,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function _(t,i,a,s){var c=o.convert(i.texture.format),l=o.convert(i.texture.type);n.texImage2D(s,0,c,i.width,i.height,0,c,l,null),e.bindFramebuffer(e.FRAMEBUFFER,t),e.framebufferTexture2D(e.FRAMEBUFFER,a,s,r.get(i.texture).__webglTexture,0),e.bindFramebuffer(e.FRAMEBUFFER,null)}function w(t,n){e.bindRenderbuffer(e.RENDERBUFFER,t),n.depthBuffer&&!n.stencilBuffer?(e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t)):n.depthBuffer&&n.stencilBuffer?(e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t)):e.renderbufferStorage(e.RENDERBUFFER,e.RGBA4,n.width,n.height),e.bindRenderbuffer(e.RENDERBUFFER,null)}function E(t){var n=r.get(t),i=!0===t.isWebGLRenderTargetCube;if(t.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");!function(t,n){if(n&&n.isWebGLRenderTargetCube)throw new Error("Depth Texture with cube render targets is not supported");if(e.bindFramebuffer(e.FRAMEBUFFER,t),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),v(n.depthTexture,0);var i=r.get(n.depthTexture).__webglTexture;if(1026===n.depthTexture.format)e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,i,0);else{if(1027!==n.depthTexture.format)throw new Error("Unknown depthTexture format");e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,i,0)}}(n.__webglFramebuffer,t)}else if(i){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)e.bindFramebuffer(e.FRAMEBUFFER,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=e.createRenderbuffer(),w(n.__webglDepthbuffer[o],t)}else e.bindFramebuffer(e.FRAMEBUFFER,n.__webglFramebuffer),n.__webglDepthbuffer=e.createRenderbuffer(),w(n.__webglDepthbuffer,t);e.bindFramebuffer(e.FRAMEBUFFER,null)}this.setTexture2D=v,this.setTextureCube=function(t,s){var c=r.get(t);if(6===t.image.length)if(t.version>0&&c.__version!==t.version){c.__image__webglTextureCube||(t.addEventListener("dispose",g),c.__image__webglTextureCube=e.createTexture(),a.textures++),n.activeTexture(e.TEXTURE0+s),n.bindTexture(e.TEXTURE_CUBE_MAP,c.__image__webglTextureCube),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t.flipY);for(var l=t&&t.isCompressedTexture,u=t.image[0]&&t.image[0].isDataTexture,f=[],m=0;m<6;m++)f[m]=l||u?u?t.image[m].image:t.image[m]:h(t.image[m],i.maxCubemapSize);var y=d(f[0]),v=o.convert(t.format),_=o.convert(t.type);b(e.TEXTURE_CUBE_MAP,t,y);for(m=0;m<6;m++)if(l)for(var w,E=f[m].mipmaps,A=0,x=E.length;A<x;A++)w=E[A],1023!==t.format&&1022!==t.format?n.getCompressedTextureFormats().indexOf(v)>-1?n.compressedTexImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+m,A,v,w.width,w.height,0,w.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+m,A,v,w.width,w.height,0,v,_,w.data);else u?n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+m,0,v,f[m].width,f[m].height,0,v,_,f[m].data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+m,0,v,v,_,f[m]);p(t,y)&&e.generateMipmap(e.TEXTURE_CUBE_MAP),c.__version=t.version,t.onUpdate&&t.onUpdate(t)}else n.activeTexture(e.TEXTURE0+s),n.bindTexture(e.TEXTURE_CUBE_MAP,c.__image__webglTextureCube)},this.setTextureCubeDynamic=function(t,i){n.activeTexture(e.TEXTURE0+i),n.bindTexture(e.TEXTURE_CUBE_MAP,r.get(t).__webglTexture)},this.setupRenderTarget=function(t){var i=r.get(t),o=r.get(t.texture);t.addEventListener("dispose",y),o.__webglTexture=e.createTexture(),a.textures++;var s=!0===t.isWebGLRenderTargetCube,c=d(t);if(s){i.__webglFramebuffer=[];for(var l=0;l<6;l++)i.__webglFramebuffer[l]=e.createFramebuffer()}else i.__webglFramebuffer=e.createFramebuffer();if(s){n.bindTexture(e.TEXTURE_CUBE_MAP,o.__webglTexture),b(e.TEXTURE_CUBE_MAP,t.texture,c);for(l=0;l<6;l++)_(i.__webglFramebuffer[l],t,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+l);p(t.texture,c)&&e.generateMipmap(e.TEXTURE_CUBE_MAP),n.bindTexture(e.TEXTURE_CUBE_MAP,null)}else n.bindTexture(e.TEXTURE_2D,o.__webglTexture),b(e.TEXTURE_2D,t.texture,c),_(i.__webglFramebuffer,t,e.COLOR_ATTACHMENT0,e.TEXTURE_2D),p(t.texture,c)&&e.generateMipmap(e.TEXTURE_2D),n.bindTexture(e.TEXTURE_2D,null);t.depthBuffer&&E(t)},this.updateRenderTargetMipmap=function(t){var i=t.texture;if(p(i,d(t))){var o=t.isWebGLRenderTargetCube?e.TEXTURE_CUBE_MAP:e.TEXTURE_2D,a=r.get(i).__webglTexture;n.bindTexture(o,a),e.generateMipmap(o),n.bindTexture(o,null)}}}function $t(){var e={};return{get:function(t){var n=t.uuid,r=e[n];return void 0===r&&(r={},e[n]=r),r},remove:function(t){delete e[t.uuid]},update:function(t,n,r){var i=t.uuid;e[i][n]=r},dispose:function(){e={}}}}function en(e,t,n){var r=new function(){var t=!1,n=new A,r=null,i=new A(0,0,0,0);return{setMask:function(n){r===n||t||(e.colorMask(n,n,n,n),r=n)},setLocked:function(e){t=e},setClear:function(t,r,o,a,s){!0===s&&(t*=a,r*=a,o*=a),n.set(t,r,o,a),!1===i.equals(n)&&(e.clearColor(t,r,o,a),i.copy(n))},reset:function(){t=!1,r=null,i.set(-1,0,0,0)}}},i=new function(){var t=!1,n=null,r=null,i=null;return{setTest:function(t){t?F(e.DEPTH_TEST):j(e.DEPTH_TEST)},setMask:function(r){n===r||t||(e.depthMask(r),n=r)},setFunc:function(t){if(r!==t){if(t)switch(t){case 0:e.depthFunc(e.NEVER);break;case 1:e.depthFunc(e.ALWAYS);break;case 2:e.depthFunc(e.LESS);break;case 3:e.depthFunc(e.LEQUAL);break;case 4:e.depthFunc(e.EQUAL);break;case 5:e.depthFunc(e.GEQUAL);break;case 6:e.depthFunc(e.GREATER);break;case 7:e.depthFunc(e.NOTEQUAL);break;default:e.depthFunc(e.LEQUAL)}else e.depthFunc(e.LEQUAL);r=t}},setLocked:function(e){t=e},setClear:function(t){i!==t&&(e.clearDepth(t),i=t)},reset:function(){t=!1,n=null,r=null,i=null}}},o=new function(){var t=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,l=null;return{setTest:function(t){t?F(e.STENCIL_TEST):j(e.STENCIL_TEST)},setMask:function(r){n===r||t||(e.stencilMask(r),n=r)},setFunc:function(t,n,a){r===t&&i===n&&o===a||(e.stencilFunc(t,n,a),r=t,i=n,o=a)},setOp:function(t,n,r){a===t&&s===n&&c===r||(e.stencilOp(t,n,r),a=t,s=n,c=r)},setLocked:function(e){t=e},setClear:function(t){l!==t&&(e.clearStencil(t),l=t)},reset:function(){t=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,l=null}}},a=e.getParameter(e.MAX_VERTEX_ATTRIBS),s=new Uint8Array(a),c=new Uint8Array(a),l=new Uint8Array(a),u={},h=null,d=null,p=null,f=null,m=null,g=null,y=null,v=null,b=null,_=!1,w=null,E=null,x=null,S=null,T=null,M=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS),R=!1,C=0,k=e.getParameter(e.VERSION);-1!==k.indexOf("WebGL")?(C=parseFloat(/^WebGL\ ([0-9])/.exec(k)[1]),R=C>=1):-1!==k.indexOf("OpenGL ES")&&(C=parseFloat(/^OpenGL\ ES\ ([0-9])/.exec(k)[1]),R=C>=2);var I=null,P={},O=new A,N=new A;function D(t,n,r){var i=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(var a=0;a<r;a++)e.texImage2D(n+a,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,i);return o}var L={};function F(t){!0!==u[t]&&(e.enable(t),u[t]=!0)}function j(t){!1!==u[t]&&(e.disable(t),u[t]=!1)}function U(t,r,i,o,a,s,c,l){if(0!==t?F(e.BLEND):j(e.BLEND),5!==t){if(t!==p||l!==_)switch(t){case 2:l?(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ONE,e.ONE,e.ONE,e.ONE)):(e.blendEquation(e.FUNC_ADD),e.blendFunc(e.SRC_ALPHA,e.ONE));break;case 3:l?(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ZERO,e.ZERO,e.ONE_MINUS_SRC_COLOR,e.ONE_MINUS_SRC_ALPHA)):(e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ZERO,e.ONE_MINUS_SRC_COLOR));break;case 4:l?(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ZERO,e.SRC_COLOR,e.ZERO,e.SRC_ALPHA)):(e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ZERO,e.SRC_COLOR));break;default:l?(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ONE,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA)):(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA))}f=null,m=null,g=null,y=null,v=null,b=null}else a=a||r,s=s||i,c=c||o,r===f&&a===y||(e.blendEquationSeparate(n.convert(r),n.convert(a)),f=r,y=a),i===m&&o===g&&s===v&&c===b||(e.blendFuncSeparate(n.convert(i),n.convert(o),n.convert(s),n.convert(c)),m=i,g=o,v=s,b=c);p=t,_=l}function B(t){w!==t&&(t?e.frontFace(e.CW):e.frontFace(e.CCW),w=t)}function V(t){0!==t?(F(e.CULL_FACE),t!==E&&(1===t?e.cullFace(e.BACK):2===t?e.cullFace(e.FRONT):e.cullFace(e.FRONT_AND_BACK))):j(e.CULL_FACE),E=t}function H(t,n,r){t?(F(e.POLYGON_OFFSET_FILL),S===n&&T===r||(e.polygonOffset(n,r),S=n,T=r)):j(e.POLYGON_OFFSET_FILL)}function z(t){void 0===t&&(t=e.TEXTURE0+M-1),I!==t&&(e.activeTexture(t),I=t)}return L[e.TEXTURE_2D]=D(e.TEXTURE_2D,e.TEXTURE_2D,1),L[e.TEXTURE_CUBE_MAP]=D(e.TEXTURE_CUBE_MAP,e.TEXTURE_CUBE_MAP_POSITIVE_X,6),r.setClear(0,0,0,1),i.setClear(1),o.setClear(0),F(e.DEPTH_TEST),i.setFunc(3),B(!1),V(1),F(e.CULL_FACE),F(e.BLEND),U(1),{buffers:{color:r,depth:i,stencil:o},initAttributes:function(){for(var e=0,t=s.length;e<t;e++)s[e]=0},enableAttribute:function(n){s[n]=1,0===c[n]&&(e.enableVertexAttribArray(n),c[n]=1),0!==l[n]&&(t.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,0),l[n]=0)},enableAttributeAndDivisor:function(n,r){s[n]=1,0===c[n]&&(e.enableVertexAttribArray(n),c[n]=1),l[n]!==r&&(t.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,r),l[n]=r)},disableUnusedAttributes:function(){for(var t=0,n=c.length;t!==n;++t)c[t]!==s[t]&&(e.disableVertexAttribArray(t),c[t]=0)},enable:F,disable:j,getCompressedTextureFormats:function(){if(null===h&&(h=[],t.get("WEBGL_compressed_texture_pvrtc")||t.get("WEBGL_compressed_texture_s3tc")||t.get("WEBGL_compressed_texture_etc1")||t.get("WEBGL_compressed_texture_astc")))for(var n=e.getParameter(e.COMPRESSED_TEXTURE_FORMATS),r=0;r<n.length;r++)h.push(n[r]);return h},useProgram:function(t){return d!==t&&(e.useProgram(t),d=t,!0)},setBlending:U,setMaterial:function(t,n){2===t.side?j(e.CULL_FACE):F(e.CULL_FACE);var o=1===t.side;n&&(o=!o),B(o),!0===t.transparent?U(t.blending,t.blendEquation,t.blendSrc,t.blendDst,t.blendEquationAlpha,t.blendSrcAlpha,t.blendDstAlpha,t.premultipliedAlpha):U(0),i.setFunc(t.depthFunc),i.setTest(t.depthTest),i.setMask(t.depthWrite),r.setMask(t.colorWrite),H(t.polygonOffset,t.polygonOffsetFactor,t.polygonOffsetUnits)},setFlipSided:B,setCullFace:V,setLineWidth:function(t){t!==x&&(R&&e.lineWidth(t),x=t)},setPolygonOffset:H,setScissorTest:function(t){t?F(e.SCISSOR_TEST):j(e.SCISSOR_TEST)},activeTexture:z,bindTexture:function(t,n){null===I&&z();var r=P[I];void 0===r&&(r={type:void 0,texture:void 0},P[I]=r),r.type===t&&r.texture===n||(e.bindTexture(t,n||L[t]),r.type=t,r.texture=n)},compressedTexImage2D:function(){try{e.compressedTexImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texImage2D:function(){try{e.texImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},scissor:function(t){!1===O.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),O.copy(t))},viewport:function(t){!1===N.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),N.copy(t))},reset:function(){for(var t=0;t<c.length;t++)1===c[t]&&(e.disableVertexAttribArray(t),c[t]=0);u={},h=null,I=null,P={},d=null,p=null,w=null,E=null,r.reset(),i.reset(),o.reset()}}}function tn(e,t,n){var r;function i(t){if("highp"===t){if(e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var o=void 0!==n.precision?n.precision:"highp",a=i(o);a!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",a,"instead."),o=a);var s=!0===n.logarithmicDepthBuffer,c=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),l=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),u=e.getParameter(e.MAX_TEXTURE_SIZE),h=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),d=e.getParameter(e.MAX_VERTEX_ATTRIBS),p=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),f=e.getParameter(e.MAX_VARYING_VECTORS),m=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),g=l>0,y=!!t.get("OES_texture_float");return{getMaxAnisotropy:function(){if(void 0!==r)return r;var n=t.get("EXT_texture_filter_anisotropic");return r=null!==n?e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:i,precision:o,logarithmicDepthBuffer:s,maxTextures:c,maxVertexTextures:l,maxTextureSize:u,maxCubemapSize:h,maxAttributes:d,maxVertexUniforms:p,maxVaryings:f,maxFragmentUniforms:m,vertexTextures:g,floatFragmentTextures:y,floatVertexTextures:g&&y}}function nn(e,t,n,r){We.call(this),this.type="PerspectiveCamera",this.fov=void 0!==e?e:50,this.zoom=1,this.near=void 0!==n?n:.1,this.far=void 0!==r?r:2e3,this.focus=10,this.aspect=void 0!==t?t:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function rn(e){nn.call(this),this.cameras=e||[]}function on(e){var t=this,n=null,r=null,i=null,o=new y,a=new y;"undefined"!=typeof window&&"VRFrameData"in window&&(r=new window.VRFrameData);var s=new y,c=new v,l=new b,u=new nn;u.bounds=new A(0,0,.5,1),u.layers.enable(1);var h=new nn;h.bounds=new A(.5,0,.5,1),h.layers.enable(2);var d,p,f=new rn([u,h]);function m(){if(null!==n&&n.isPresenting){var r=n.getEyeParameters("left"),i=r.renderWidth,o=r.renderHeight;p=e.getPixelRatio(),d=e.getSize(),e.setDrawingBufferSize(2*i,o,1)}else t.enabled&&e.setDrawingBufferSize(d.width,d.height,p)}f.layers.enable(1),f.layers.enable(2),"undefined"!=typeof window&&window.addEventListener("vrdisplaypresentchange",m,!1),this.enabled=!1,this.userHeight=1.6,this.getDevice=function(){return n},this.setDevice=function(e){void 0!==e&&(n=e)},this.setPoseTarget=function(e){void 0!==e&&(i=e)},this.getCamera=function(e){if(null===n)return e;n.depthNear=e.near,n.depthFar=e.far,n.getFrameData(r);var d=n.stageParameters;d?o.fromArray(d.sittingToStandingTransform):o.makeTranslation(0,t.userHeight,0);var p=r.pose,m=null!==i?i:e;if(m.matrix.copy(o),m.matrix.decompose(m.position,m.quaternion,m.scale),null!==p.orientation&&(c.fromArray(p.orientation),m.quaternion.multiply(c)),null!==p.position&&(c.setFromRotationMatrix(o),l.fromArray(p.position),l.applyQuaternion(c),m.position.add(l)),m.updateMatrixWorld(),!1===n.isPresenting)return e;u.near=e.near,h.near=e.near,u.far=e.far,h.far=e.far,f.matrixWorld.copy(e.matrixWorld),f.matrixWorldInverse.copy(e.matrixWorldInverse),u.matrixWorldInverse.fromArray(r.leftViewMatrix),h.matrixWorldInverse.fromArray(r.rightViewMatrix),a.getInverse(o),u.matrixWorldInverse.multiply(a),h.matrixWorldInverse.multiply(a);var g=m.parent;null!==g&&(s.getInverse(g.matrixWorld),u.matrixWorldInverse.multiply(s),h.matrixWorldInverse.multiply(s)),u.matrixWorld.getInverse(u.matrixWorldInverse),h.matrixWorld.getInverse(h.matrixWorldInverse),u.projectionMatrix.fromArray(r.leftProjectionMatrix),h.projectionMatrix.fromArray(r.rightProjectionMatrix),f.projectionMatrix.copy(u.projectionMatrix);var y=n.getLayers();if(y.length){var v=y[0];null!==v.leftBounds&&4===v.leftBounds.length&&u.bounds.fromArray(v.leftBounds),null!==v.rightBounds&&4===v.rightBounds.length&&h.bounds.fromArray(v.rightBounds)}return f},this.getStandingMatrix=function(){return o},this.submitFrame=function(){n&&n.isPresenting&&n.submitFrame()},this.dispose=function(){"undefined"!=typeof window&&window.removeEventListener("vrdisplaypresentchange",m)}}function an(e){var t={};return{get:function(n){if(void 0!==t[n])return t[n];var r;switch(n){case"WEBGL_depth_texture":r=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;case"WEBGL_compressed_texture_etc1":r=e.getExtension("WEBGL_compressed_texture_etc1");break;default:r=e.getExtension(n)}return null===r&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),t[n]=r,r}}}function sn(){var e=this,t=null,n=0,r=!1,i=!1,o=new Ne,a=new _,s={value:null,needsUpdate:!1};function c(){s.value!==t&&(s.value=t,s.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function l(t,n,r,i){var c=null!==t?t.length:0,l=null;if(0!==c){if(l=s.value,!0!==i||null===l){var u=r+4*c,h=n.matrixWorldInverse;a.getNormalMatrix(h),(null===l||l.length<u)&&(l=new Float32Array(u));for(var d=0,p=r;d!==c;++d,p+=4)o.copy(t[d]).applyMatrix4(h,a),o.normal.toArray(l,p),l[p+3]=o.constant}s.value=l,s.needsUpdate=!0}return e.numPlanes=c,l}this.uniform=s,this.numPlanes=0,this.numIntersection=0,this.init=function(e,i,o){var a=0!==e.length||i||0!==n||r;return r=i,t=l(e,o,0),n=e.length,a},this.beginShadows=function(){i=!0,l(null)},this.endShadows=function(){i=!1,c()},this.setState=function(e,o,a,u,h,d){if(!r||null===e||0===e.length||i&&!a)i?l(null):c();else{var p=i?0:n,f=4*p,m=h.clippingState||null;s.value=m,m=l(e,u,f,d);for(var g=0;g!==f;++g)m[g]=t[g];h.clippingState=m,this.numIntersection=o?this.numPlanes:0,this.numPlanes+=p}}}function cn(e,t){return{convert:function(n){var r;if(1e3===n)return e.REPEAT;if(1001===n)return e.CLAMP_TO_EDGE;if(1002===n)return e.MIRRORED_REPEAT;if(1003===n)return e.NEAREST;if(1004===n)return e.NEAREST_MIPMAP_NEAREST;if(1005===n)return e.NEAREST_MIPMAP_LINEAR;if(1006===n)return e.LINEAR;if(1007===n)return e.LINEAR_MIPMAP_NEAREST;if(1008===n)return e.LINEAR_MIPMAP_LINEAR;if(1009===n)return e.UNSIGNED_BYTE;if(1017===n)return e.UNSIGNED_SHORT_4_4_4_4;if(1018===n)return e.UNSIGNED_SHORT_5_5_5_1;if(1019===n)return e.UNSIGNED_SHORT_5_6_5;if(1010===n)return e.BYTE;if(1011===n)return e.SHORT;if(1012===n)return e.UNSIGNED_SHORT;if(1013===n)return e.INT;if(1014===n)return e.UNSIGNED_INT;if(1015===n)return e.FLOAT;if(1016===n&&null!==(r=t.get("OES_texture_half_float")))return r.HALF_FLOAT_OES;if(1021===n)return e.ALPHA;if(1022===n)return e.RGB;if(1023===n)return e.RGBA;if(1024===n)return e.LUMINANCE;if(1025===n)return e.LUMINANCE_ALPHA;if(1026===n)return e.DEPTH_COMPONENT;if(1027===n)return e.DEPTH_STENCIL;if(100===n)return e.FUNC_ADD;if(101===n)return e.FUNC_SUBTRACT;if(102===n)return e.FUNC_REVERSE_SUBTRACT;if(200===n)return e.ZERO;if(201===n)return e.ONE;if(202===n)return e.SRC_COLOR;if(203===n)return e.ONE_MINUS_SRC_COLOR;if(204===n)return e.SRC_ALPHA;if(205===n)return e.ONE_MINUS_SRC_ALPHA;if(206===n)return e.DST_ALPHA;if(207===n)return e.ONE_MINUS_DST_ALPHA;if(208===n)return e.DST_COLOR;if(209===n)return e.ONE_MINUS_DST_COLOR;if(210===n)return e.SRC_ALPHA_SATURATE;if((33776===n||33777===n||33778===n||33779===n)&&null!==(r=t.get("WEBGL_compressed_texture_s3tc"))){if(33776===n)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===n)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===n)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===n)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((35840===n||35841===n||35842===n||35843===n)&&null!==(r=t.get("WEBGL_compressed_texture_pvrtc"))){if(35840===n)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===n)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===n)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===n)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===n&&null!==(r=t.get("WEBGL_compressed_texture_etc1")))return r.COMPRESSED_RGB_ETC1_WEBGL;if((37808===n||37809===n||37810===n||37811===n||37812===n||37813===n||37814===n||37815===n||37816===n||37817===n||37818===n||37819===n||37820===n||37821===n)&&null!==(r=t.get("WEBGL_compressed_texture_astc")))return n;if((103===n||104===n)&&null!==(r=t.get("EXT_blend_minmax"))){if(103===n)return r.MIN_EXT;if(104===n)return r.MAX_EXT}return 1020===n&&null!==(r=t.get("WEBGL_depth_texture"))?r.UNSIGNED_INT_24_8_WEBGL:0}}}function ln(){var e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];var n;switch(t.type){case"DirectionalLight":n={direction:new b,color:new fe,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new g};break;case"SpotLight":n={position:new b,direction:new b,color:new fe,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new g};break;case"PointLight":n={position:new b,color:new fe,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new g,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":n={direction:new b,skyColor:new fe,groundColor:new fe};break;case"RectAreaLight":n={color:new fe,position:new b,halfWidth:new b,halfHeight:new b}}return e[t.id]=n,n}}}nn.prototype=Object.assign(Object.create(We.prototype),{constructor:nn,isPerspectiveCamera:!0,copy:function(e,t){return We.prototype.copy.call(this,e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this},setFocalLength:function(e){var t=.5*this.getFilmHeight()/e;this.fov=2*m.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var e=Math.tan(.5*m.DEG2RAD*this.fov);return.5*this.getFilmHeight()/e},getEffectiveFOV:function(){return 2*m.RAD2DEG*Math.atan(Math.tan(.5*m.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(e,t,n,r,i,o){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e=this.near,t=e*Math.tan(.5*m.DEG2RAD*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r,o=this.view;if(null!==this.view&&this.view.enabled){var a=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/a,t-=o.offsetY*n/s,r*=o.width/a,n*=o.height/s}var c=this.filmOffset;0!==c&&(i+=e*c/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far)},toJSON:function(e){var t=Ge.prototype.toJSON.call(this,e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}),rn.prototype=Object.assign(Object.create(nn.prototype),{constructor:rn,isArrayCamera:!0});var un,hn,dn,pn,fn,mn,gn,yn,vn=0;function bn(){var e=new ln,t={id:vn++,hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},n=new b,r=new y,i=new y;return{setup:function(o,a,s){for(var c=0,l=0,u=0,h=0,d=0,p=0,f=0,m=0,g=s.matrixWorldInverse,y=0,v=o.length;y<v;y++){var b=o[y],_=b.color,w=b.intensity,E=b.distance,A=b.shadow&&b.shadow.map?b.shadow.map.texture:null;if(b.isAmbientLight)c+=_.r*w,l+=_.g*w,u+=_.b*w;else if(b.isDirectionalLight){if((S=e.get(b)).color.copy(b.color).multiplyScalar(b.intensity),S.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),S.direction.sub(n),S.direction.transformDirection(g),S.shadow=b.castShadow,b.castShadow){var x=b.shadow;S.shadowBias=x.bias,S.shadowRadius=x.radius,S.shadowMapSize=x.mapSize}t.directionalShadowMap[h]=A,t.directionalShadowMatrix[h]=b.shadow.matrix,t.directional[h]=S,h++}else if(b.isSpotLight){if((S=e.get(b)).position.setFromMatrixPosition(b.matrixWorld),S.position.applyMatrix4(g),S.color.copy(_).multiplyScalar(w),S.distance=E,S.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),S.direction.sub(n),S.direction.transformDirection(g),S.coneCos=Math.cos(b.angle),S.penumbraCos=Math.cos(b.angle*(1-b.penumbra)),S.decay=0===b.distance?0:b.decay,S.shadow=b.castShadow,b.castShadow){x=b.shadow;S.shadowBias=x.bias,S.shadowRadius=x.radius,S.shadowMapSize=x.mapSize}t.spotShadowMap[p]=A,t.spotShadowMatrix[p]=b.shadow.matrix,t.spot[p]=S,p++}else if(b.isRectAreaLight){(S=e.get(b)).color.copy(_).multiplyScalar(w),S.position.setFromMatrixPosition(b.matrixWorld),S.position.applyMatrix4(g),i.identity(),r.copy(b.matrixWorld),r.premultiply(g),i.extractRotation(r),S.halfWidth.set(.5*b.width,0,0),S.halfHeight.set(0,.5*b.height,0),S.halfWidth.applyMatrix4(i),S.halfHeight.applyMatrix4(i),t.rectArea[f]=S,f++}else if(b.isPointLight){if((S=e.get(b)).position.setFromMatrixPosition(b.matrixWorld),S.position.applyMatrix4(g),S.color.copy(b.color).multiplyScalar(b.intensity),S.distance=b.distance,S.decay=0===b.distance?0:b.decay,S.shadow=b.castShadow,b.castShadow){x=b.shadow;S.shadowBias=x.bias,S.shadowRadius=x.radius,S.shadowMapSize=x.mapSize,S.shadowCameraNear=x.camera.near,S.shadowCameraFar=x.camera.far}t.pointShadowMap[d]=A,t.pointShadowMatrix[d]=b.shadow.matrix,t.point[d]=S,d++}else if(b.isHemisphereLight){var S;(S=e.get(b)).direction.setFromMatrixPosition(b.matrixWorld),S.direction.transformDirection(g),S.direction.normalize(),S.skyColor.copy(b.color).multiplyScalar(w),S.groundColor.copy(b.groundColor).multiplyScalar(w),t.hemi[m]=S,m++}}t.ambient[0]=c,t.ambient[1]=l,t.ambient[2]=u,t.directional.length=h,t.spot.length=p,t.rectArea.length=f,t.point.length=d,t.hemi.length=m,t.hash=t.id+","+h+","+d+","+p+","+f+","+m+","+a.length},state:t}}function _n(){var e=new bn,t=[],n=[],r=[];return{init:function(){t.length=0,n.length=0,r.length=0},state:{lightsArray:t,shadowsArray:n,spritesArray:r,lights:e},setupLights:function(r){e.setup(t,n,r)},pushLight:function(e){t.push(e)},pushShadow:function(e){n.push(e)},pushSprite:function(e){r.push(e)}}}function wn(){var e={};return{get:function(t,n){var r=t.id+","+n.id,i=e[r];return void 0===i&&(i=new _n,e[r]=i),i},dispose:function(){e={}}}}function En(e){console.log("THREE.WebGLRenderer","90");var t=void 0!==(e=e||{}).canvas?e.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),n=void 0!==e.context?e.context:null,r=void 0!==e.alpha&&e.alpha,i=void 0===e.depth||e.depth,o=void 0===e.stencil||e.stencil,a=void 0!==e.antialias&&e.antialias,s=void 0===e.premultipliedAlpha||e.premultipliedAlpha,c=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,l=void 0!==e.powerPreference?e.powerPreference:"default",u=null,h=null;this.domElement=t,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=1,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var d,p,f,g,v,_,w,E,x,S,M,R,C,k,I,P,O,N,D=this,L=!1,F=null,j=null,U=-1,B="",V=null,H=null,z=new A,q=new A,G=null,W=0,J=t.width,Z=t.height,Y=1,X=new A(0,0,J,Z),Q=new A(0,0,J,Z),K=!1,$=new De,ee=new sn,te=!1,ne=!1,re=new y,ie=new b,oe={geometries:0,textures:0},ae={frame:0,calls:0,vertices:0,faces:0,points:0};function se(){return null===F?Y:1}this.info={render:ae,memory:oe,programs:null,autoReset:!0,reset:function(){ae.frame++,ae.calls=0,ae.vertices=0,ae.faces=0,ae.points=0}};try{var ce={alpha:r,depth:i,stencil:o,antialias:a,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:l};if(t.addEventListener("webglcontextlost",pe,!1),t.addEventListener("webglcontextrestored",fe,!1),null===(d=n||t.getContext("webgl",ce)||t.getContext("experimental-webgl",ce)))throw null!==t.getContext("webgl")?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.");void 0===d.getShaderPrecisionFormat&&(d.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(e){console.error("THREE.WebGLRenderer: "+e.message)}function le(){(p=new an(d)).get("WEBGL_depth_texture"),p.get("OES_texture_float"),p.get("OES_texture_float_linear"),p.get("OES_texture_half_float"),p.get("OES_texture_half_float_linear"),p.get("OES_standard_derivatives"),p.get("OES_element_index_uint"),p.get("ANGLE_instanced_arrays"),N=new cn(d,p),f=new tn(d,p,e),(g=new en(d,p,N)).scissor(q.copy(Q).multiplyScalar(Y)),g.viewport(z.copy(X).multiplyScalar(Y)),v=new $t,_=new Kt(d,p,g,v,f,N,oe,ae),w=new Fe(d),E=new jt(d,w,oe),x=new Ut(E,ae),k=new Dt(d),S=new Qt(D,p,f),M=new Ot,R=new wn,C=new Ct(D,g,E,s),I=new Ft(d,p,ae),P=new Lt(d,p,ae),O=new _e(D,d,g,_,f),D.info.programs=S.programs,D.context=d,D.capabilities=f,D.extensions=p,D.properties=v,D.renderLists=M,D.state=g}le();var ue=new on(D);this.vr=ue;var he=new Le(D,x,f.maxTextureSize);function pe(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),L=!0}function fe(){console.log("THREE.WebGLRenderer: Context Restored."),L=!1,le()}function ye(e){var t=e.target;t.removeEventListener("dispose",ye),function(e){be(e),v.remove(e)}(t)}function be(e){var t=v.get(e).program;e.program=void 0,void 0!==t&&S.releaseProgram(t)}this.shadowMap=he,this.getContext=function(){return d},this.getContextAttributes=function(){return d.getContextAttributes()},this.forceContextLoss=function(){var e=p.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){var e=p.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return Y},this.setPixelRatio=function(e){void 0!==e&&(Y=e,this.setSize(J,Z,!1))},this.getSize=function(){return{width:J,height:Z}},this.setSize=function(e,n,r){var i=ue.getDevice();i&&i.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(J=e,Z=n,t.width=e*Y,t.height=n*Y,!1!==r&&(t.style.width=e+"px",t.style.height=n+"px"),this.setViewport(0,0,e,n))},this.getDrawingBufferSize=function(){return{width:J*Y,height:Z*Y}},this.setDrawingBufferSize=function(e,n,r){J=e,Z=n,Y=r,t.width=e*r,t.height=n*r,this.setViewport(0,0,e,n)},this.getCurrentViewport=function(){return z},this.setViewport=function(e,t,n,r){X.set(e,Z-t-r,n,r),g.viewport(z.copy(X).multiplyScalar(Y))},this.setScissor=function(e,t,n,r){Q.set(e,Z-t-r,n,r),g.scissor(q.copy(Q).multiplyScalar(Y))},this.setScissorTest=function(e){g.setScissorTest(K=e)},this.getClearColor=function(){return C.getClearColor()},this.setClearColor=function(){C.setClearColor.apply(C,arguments)},this.getClearAlpha=function(){return C.getClearAlpha()},this.setClearAlpha=function(){C.setClearAlpha.apply(C,arguments)},this.clear=function(e,t,n){var r=0;(void 0===e||e)&&(r|=d.COLOR_BUFFER_BIT),(void 0===t||t)&&(r|=d.DEPTH_BUFFER_BIT),(void 0===n||n)&&(r|=d.STENCIL_BUFFER_BIT),d.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(e,t,n,r){this.setRenderTarget(e),this.clear(t,n,r)},this.dispose=function(){t.removeEventListener("webglcontextlost",pe,!1),t.removeEventListener("webglcontextrestored",fe,!1),M.dispose(),R.dispose(),v.dispose(),x.dispose(),ue.dispose(),xe()},this.renderBufferImmediate=function(e,t,n){g.initAttributes();var r=v.get(e);e.hasPositions&&!r.position&&(r.position=d.createBuffer()),e.hasNormals&&!r.normal&&(r.normal=d.createBuffer()),e.hasUvs&&!r.uv&&(r.uv=d.createBuffer()),e.hasColors&&!r.color&&(r.color=d.createBuffer());var i=t.getAttributes();if(e.hasPositions&&(d.bindBuffer(d.ARRAY_BUFFER,r.position),d.bufferData(d.ARRAY_BUFFER,e.positionArray,d.DYNAMIC_DRAW),g.enableAttribute(i.position),d.vertexAttribPointer(i.position,3,d.FLOAT,!1,0,0)),e.hasNormals){if(d.bindBuffer(d.ARRAY_BUFFER,r.normal),!n.isMeshPhongMaterial&&!n.isMeshStandardMaterial&&!n.isMeshNormalMaterial&&!0===n.flatShading)for(var o=0,a=3*e.count;o<a;o+=9){var s=e.normalArray,c=(s[o+0]+s[o+3]+s[o+6])/3,l=(s[o+1]+s[o+4]+s[o+7])/3,u=(s[o+2]+s[o+5]+s[o+8])/3;s[o+0]=c,s[o+1]=l,s[o+2]=u,s[o+3]=c,s[o+4]=l,s[o+5]=u,s[o+6]=c,s[o+7]=l,s[o+8]=u}d.bufferData(d.ARRAY_BUFFER,e.normalArray,d.DYNAMIC_DRAW),g.enableAttribute(i.normal),d.vertexAttribPointer(i.normal,3,d.FLOAT,!1,0,0)}e.hasUvs&&n.map&&(d.bindBuffer(d.ARRAY_BUFFER,r.uv),d.bufferData(d.ARRAY_BUFFER,e.uvArray,d.DYNAMIC_DRAW),g.enableAttribute(i.uv),d.vertexAttribPointer(i.uv,2,d.FLOAT,!1,0,0)),e.hasColors&&0!==n.vertexColors&&(d.bindBuffer(d.ARRAY_BUFFER,r.color),d.bufferData(d.ARRAY_BUFFER,e.colorArray,d.DYNAMIC_DRAW),g.enableAttribute(i.color),d.vertexAttribPointer(i.color,3,d.FLOAT,!1,0,0)),g.disableUnusedAttributes(),d.drawArrays(d.TRIANGLES,0,e.count),e.count=0},this.renderBufferDirect=function(e,t,n,r,i,o){var a=i.isMesh&&i.matrixWorld.determinant()<0;g.setMaterial(r,a);var s=ke(e,t,r,i),c=n.id+"_"+s.id+"_"+(!0===r.wireframe),l=!1;c!==B&&(B=c,l=!0),i.morphTargetInfluences&&(k.update(i,n,r,s),l=!0);var u,h=n.index,f=n.attributes.position,m=1;!0===r.wireframe&&(h=E.getWireframeAttribute(n),m=2);var y=I;null!==h&&(u=w.get(h),(y=P).setIndex(u)),l&&(!function(e,t,n,r){if(n&&n.isInstancedBufferGeometry&&null===p.get("ANGLE_instanced_arrays"))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");void 0===r&&(r=0);g.initAttributes();var i=n.attributes,o=t.getAttributes(),a=e.defaultAttributeValues;for(var s in o){var c=o[s];if(c>=0){var l=i[s];if(void 0!==l){var u=l.normalized,h=l.itemSize,f=w.get(l);if(void 0===f)continue;var m=f.buffer,y=f.type,v=f.bytesPerElement;if(l.isInterleavedBufferAttribute){var b=l.data,_=b.stride,E=l.offset;b&&b.isInstancedInterleavedBuffer?(g.enableAttributeAndDivisor(c,b.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=b.meshPerAttribute*b.count)):g.enableAttribute(c),d.bindBuffer(d.ARRAY_BUFFER,m),d.vertexAttribPointer(c,h,y,u,_*v,(r*_+E)*v)}else l.isInstancedBufferAttribute?(g.enableAttributeAndDivisor(c,l.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=l.meshPerAttribute*l.count)):g.enableAttribute(c),d.bindBuffer(d.ARRAY_BUFFER,m),d.vertexAttribPointer(c,h,y,u,0,r*h*v)}else if(void 0!==a){var A=a[s];if(void 0!==A)switch(A.length){case 2:d.vertexAttrib2fv(c,A);break;case 3:d.vertexAttrib3fv(c,A);break;case 4:d.vertexAttrib4fv(c,A);break;default:d.vertexAttrib1fv(c,A)}}}}g.disableUnusedAttributes()}(r,s,n),null!==h&&d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,u.buffer));var v=1/0;null!==h?v=h.count:void 0!==f&&(v=f.count);var b=n.drawRange.start*m,_=n.drawRange.count*m,A=null!==o?o.start*m:0,x=null!==o?o.count*m:1/0,S=Math.max(b,A),T=Math.min(v,b+_,A+x)-1,M=Math.max(0,T-S+1);if(0!==M){if(i.isMesh)if(!0===r.wireframe)g.setLineWidth(r.wireframeLinewidth*se()),y.setMode(d.LINES);else switch(i.drawMode){case 0:y.setMode(d.TRIANGLES);break;case 1:y.setMode(d.TRIANGLE_STRIP);break;case 2:y.setMode(d.TRIANGLE_FAN)}else if(i.isLine){var R=r.linewidth;void 0===R&&(R=1),g.setLineWidth(R*se()),i.isLineSegments?y.setMode(d.LINES):i.isLineLoop?y.setMode(d.LINE_LOOP):y.setMode(d.LINE_STRIP)}else i.isPoints&&y.setMode(d.POINTS);n&&n.isInstancedBufferGeometry?n.maxInstancedCount>0&&y.renderInstances(n,S,M):y.render(S,M)}},this.compile=function(e,t){(h=R.get(e,t)).init(),e.traverse((function(e){e.isLight&&(h.pushLight(e),e.castShadow&&h.pushShadow(e))})),h.setupLights(t),e.traverse((function(t){if(t.material)if(Array.isArray(t.material))for(var n=0;n<t.material.length;n++)Ce(t.material[n],e.fog,t);else Ce(t.material,e.fog,t)}))};var we,Ee=!1,Ae=null;function xe(){Ee=!1}function Se(){var e=ue.getDevice();e&&e.isPresenting?e.requestAnimationFrame(Te):window.requestAnimationFrame(Te)}function Te(e){!1!==Ee&&(Ae(e),Se())}function Me(e,t,n,r){for(var i=0,o=e.length;i<o;i++){var a=e[i],s=a.object,c=a.geometry,l=void 0===r?a.material:r,u=a.group;if(n.isArrayCamera){H=n;for(var h=n.cameras,d=0,p=h.length;d<p;d++){var f=h[d];if(s.layers.test(f.layers)){var m=f.bounds,y=m.x*J,v=m.y*Z,b=m.z*J,_=m.w*Z;g.viewport(z.set(y,v,b,_).multiplyScalar(Y)),Re(s,t,f,c,l,u)}}}else H=null,Re(s,t,n,c,l,u)}}function Re(e,t,n,r,i,o){if(e.onBeforeRender(D,t,n,r,i,o),h=R.get(t,H||n),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),e.isImmediateRenderObject){var a=e.isMesh&&e.matrixWorld.determinant()<0;g.setMaterial(i,a);var s=ke(n,t.fog,i,e);B="",function(e,t,n){e.render((function(e){D.renderBufferImmediate(e,t,n)}))}(e,s,i)}else D.renderBufferDirect(n,t.fog,r,i,e,o);e.onAfterRender(D,t,n,r,i,o),h=R.get(t,H||n)}function Ce(e,t,n){var r=v.get(e),i=h.state.lights,o=h.state.shadowsArray,a=S.getParameters(e,i.state,o,t,ee.numPlanes,ee.numIntersection,n),s=S.getProgramCode(e,a),c=r.program,l=!0;if(void 0===c)e.addEventListener("dispose",ye);else if(c.code!==s)be(e);else if(r.lightsHash!==i.state.hash)v.update(e,"lightsHash",i.state.hash),l=!1;else{if(void 0!==a.shaderID)return;l=!1}if(l){if(a.shaderID){var u=ve[a.shaderID];r.shader={name:e.type,uniforms:ge.clone(u.uniforms),vertexShader:u.vertexShader,fragmentShader:u.fragmentShader}}else r.shader={name:e.type,uniforms:e.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader};e.onBeforeCompile(r.shader),c=S.acquireProgram(e,r.shader,a,s),r.program=c,e.program=c}var d=c.getAttributes();if(e.morphTargets){e.numSupportedMorphTargets=0;for(var p=0;p<D.maxMorphTargets;p++)d["morphTarget"+p]>=0&&e.numSupportedMorphTargets++}if(e.morphNormals){e.numSupportedMorphNormals=0;for(p=0;p<D.maxMorphNormals;p++)d["morphNormal"+p]>=0&&e.numSupportedMorphNormals++}var f=r.shader.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(r.numClippingPlanes=ee.numPlanes,r.numIntersection=ee.numIntersection,f.clippingPlanes=ee.uniform),r.fog=t,r.lightsHash=i.state.hash,e.lights&&(f.ambientLightColor.value=i.state.ambient,f.directionalLights.value=i.state.directional,f.spotLights.value=i.state.spot,f.rectAreaLights.value=i.state.rectArea,f.pointLights.value=i.state.point,f.hemisphereLights.value=i.state.hemi,f.directionalShadowMap.value=i.state.directionalShadowMap,f.directionalShadowMatrix.value=i.state.directionalShadowMatrix,f.spotShadowMap.value=i.state.spotShadowMap,f.spotShadowMatrix.value=i.state.spotShadowMatrix,f.pointShadowMap.value=i.state.pointShadowMap,f.pointShadowMatrix.value=i.state.pointShadowMatrix);var m=r.program.getUniforms(),g=de.seqWithValue(m.seq,f);r.uniformsList=g}function ke(e,t,n,r){W=0;var i=v.get(n),o=h.state.lights;if(te&&(ne||e!==V)){var a=e===V&&n.id===U;ee.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,e,i,a)}!1===n.needsUpdate&&(void 0===i.program||n.fog&&i.fog!==t||n.lights&&i.lightsHash!==o.state.hash?n.needsUpdate=!0:void 0===i.numClippingPlanes||i.numClippingPlanes===ee.numPlanes&&i.numIntersection===ee.numIntersection||(n.needsUpdate=!0)),n.needsUpdate&&(Ce(n,t,r),n.needsUpdate=!1);var s,c,l=!1,u=!1,p=!1,y=i.program,b=y.getUniforms(),_=i.shader.uniforms;if(g.useProgram(y.program)&&(l=!0,u=!0,p=!0),n.id!==U&&(U=n.id,u=!0),l||e!==V){if(b.setValue(d,"projectionMatrix",e.projectionMatrix),f.logarithmicDepthBuffer&&b.setValue(d,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),V!==(H||e)&&(V=H||e,u=!0,p=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var w=b.map.cameraPosition;void 0!==w&&w.setValue(d,ie.setFromMatrixPosition(e.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&b.setValue(d,"viewMatrix",e.matrixWorldInverse)}if(n.skinning){b.setOptional(d,r,"bindMatrix"),b.setOptional(d,r,"bindMatrixInverse");var E=r.skeleton;if(E){var A=E.bones;if(f.floatVertexTextures){if(void 0===E.boneTexture){var x=Math.sqrt(4*A.length);x=m.ceilPowerOfTwo(x),x=Math.max(x,4);var S=new Float32Array(x*x*4);S.set(E.boneMatrices);var M=new T(S,x,x,1023,1015);M.needsUpdate=!0,E.boneMatrices=S,E.boneTexture=M,E.boneTextureSize=x}b.setValue(d,"boneTexture",E.boneTexture),b.setValue(d,"boneTextureSize",E.boneTextureSize)}else b.setOptional(d,E,"boneMatrices")}}return u&&(b.setValue(d,"toneMappingExposure",D.toneMappingExposure),b.setValue(d,"toneMappingWhitePoint",D.toneMappingWhitePoint),n.lights&&(c=p,(s=_).ambientLightColor.needsUpdate=c,s.directionalLights.needsUpdate=c,s.pointLights.needsUpdate=c,s.spotLights.needsUpdate=c,s.rectAreaLights.needsUpdate=c,s.hemisphereLights.needsUpdate=c),t&&n.fog&&function(e,t){e.fogColor.value=t.color,t.isFog?(e.fogNear.value=t.near,e.fogFar.value=t.far):t.isFogExp2&&(e.fogDensity.value=t.density)}(_,t),n.isMeshBasicMaterial?Ie(_,n):n.isMeshLambertMaterial?(Ie(_,n),function(e,t){t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap)}(_,n)):n.isMeshPhongMaterial?(Ie(_,n),n.isMeshToonMaterial?function(e,t){Pe(e,t),t.gradientMap&&(e.gradientMap.value=t.gradientMap)}(_,n):Pe(_,n)):n.isMeshStandardMaterial?(Ie(_,n),n.isMeshPhysicalMaterial?function(e,t){e.clearCoat.value=t.clearCoat,e.clearCoatRoughness.value=t.clearCoatRoughness,Oe(e,t)}(_,n):Oe(_,n)):n.isMeshDepthMaterial?(Ie(_,n),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(_,n)):n.isMeshDistanceMaterial?(Ie(_,n),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias);e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}(_,n)):n.isMeshNormalMaterial?(Ie(_,n),function(e,t){t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale);t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale));t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(_,n)):n.isLineBasicMaterial?(function(e,t){e.diffuse.value=t.color,e.opacity.value=t.opacity}(_,n),n.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(_,n)):n.isPointsMaterial?function(e,t){if(e.diffuse.value=t.color,e.opacity.value=t.opacity,e.size.value=t.size*Y,e.scale.value=.5*Z,e.map.value=t.map,null!==t.map){if(!0===t.map.matrixAutoUpdate){var n=t.map.offset,r=t.map.repeat,i=t.map.rotation,o=t.map.center;t.map.matrix.setUvTransform(n.x,n.y,r.x,r.y,i,o.x,o.y)}e.uvTransform.value.copy(t.map.matrix)}}(_,n):n.isShadowMaterial&&(_.color.value=n.color,_.opacity.value=n.opacity),void 0!==_.ltc_1&&(_.ltc_1.value=me.LTC_1),void 0!==_.ltc_2&&(_.ltc_2.value=me.LTC_2),de.upload(d,i.uniformsList,_,D)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(de.upload(d,i.uniformsList,_,D),n.uniformsNeedUpdate=!1),b.setValue(d,"modelViewMatrix",r.modelViewMatrix),b.setValue(d,"normalMatrix",r.normalMatrix),b.setValue(d,"modelMatrix",r.matrixWorld),y}function Ie(e,t){var n;if(e.opacity.value=t.opacity,t.color&&(e.diffuse.value=t.color),t.emissive&&e.emissive.value.copy(t.emissive).multiplyScalar(t.emissiveIntensity),t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.specularMap&&(e.specularMap.value=t.specularMap),t.envMap&&(e.envMap.value=t.envMap,e.flipEnvMap.value=t.envMap&&t.envMap.isCubeTexture?-1:1,e.reflectivity.value=t.reflectivity,e.refractionRatio.value=t.refractionRatio),t.lightMap&&(e.lightMap.value=t.lightMap,e.lightMapIntensity.value=t.lightMapIntensity),t.aoMap&&(e.aoMap.value=t.aoMap,e.aoMapIntensity.value=t.aoMapIntensity),t.map?n=t.map:t.specularMap?n=t.specularMap:t.displacementMap?n=t.displacementMap:t.normalMap?n=t.normalMap:t.bumpMap?n=t.bumpMap:t.roughnessMap?n=t.roughnessMap:t.metalnessMap?n=t.metalnessMap:t.alphaMap?n=t.alphaMap:t.emissiveMap&&(n=t.emissiveMap),void 0!==n){if(n.isWebGLRenderTarget&&(n=n.texture),!0===n.matrixAutoUpdate){var r=n.offset,i=n.repeat,o=n.rotation,a=n.center;n.matrix.setUvTransform(r.x,r.y,i.x,i.y,o,a.x,a.y)}e.uvTransform.value.copy(n.matrix)}}function Pe(e,t){e.specular.value=t.specular,e.shininess.value=Math.max(t.shininess,1e-4),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale)),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}function Oe(e,t){e.roughness.value=t.roughness,e.metalness.value=t.metalness,t.roughnessMap&&(e.roughnessMap.value=t.roughnessMap),t.metalnessMap&&(e.metalnessMap.value=t.metalnessMap),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale)),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias),t.envMap&&(e.envMapIntensity.value=t.envMapIntensity)}this.animate=function(e){null!==(Ae=e)?Ee||(Se(),Ee=!0):xe()},this.render=function(e,t,n,r){if(t&&t.isCamera){if(!L){B="",U=-1,V=null,!0===e.autoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),ue.enabled&&(t=ue.getCamera(t)),(h=R.get(e,t)).init(),e.onBeforeRender(D,e,t,n),re.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),$.setFromMatrix(re),ne=this.localClippingEnabled,te=ee.init(this.clippingPlanes,ne,t),(u=M.get(e,t)).init(),function e(t,n,r){if(!1===t.visible)return;if(t.layers.test(n.layers))if(t.isLight)h.pushLight(t),t.castShadow&&h.pushShadow(t);else if(t.isSprite)t.frustumCulled&&!$.intersectsSprite(t)||h.pushSprite(t);else if(t.isImmediateRenderObject)r&&ie.setFromMatrixPosition(t.matrixWorld).applyMatrix4(re),u.push(t,null,t.material,ie.z,null);else if((t.isMesh||t.isLine||t.isPoints)&&(t.isSkinnedMesh&&t.skeleton.update(),!t.frustumCulled||$.intersectsObject(t))){r&&ie.setFromMatrixPosition(t.matrixWorld).applyMatrix4(re);var i=x.update(t),o=t.material;if(Array.isArray(o))for(var a=i.groups,s=0,c=a.length;s<c;s++){var l=a[s],d=o[l.materialIndex];d&&d.visible&&u.push(t,i,d,ie.z,l)}else o.visible&&u.push(t,i,o,ie.z,null)}var p=t.children;for(s=0,c=p.length;s<c;s++)e(p[s],n,r)}(e,t,D.sortObjects),!0===D.sortObjects&&u.sort(),te&&ee.beginShadows();var i=h.state.shadowsArray;he.render(i,e,t),h.setupLights(t),te&&ee.endShadows(),this.info.autoReset&&this.info.reset(),void 0===n&&(n=null),this.setRenderTarget(n),C.render(u,e,t,r);var o=u.opaque,a=u.transparent;if(e.overrideMaterial){var s=e.overrideMaterial;o.length&&Me(o,e,t,s),a.length&&Me(a,e,t,s)}else o.length&&Me(o,e,t),a.length&&Me(a,e,t);var c=h.state.spritesArray;O.render(c,e,t),n&&_.updateRenderTargetMipmap(n),g.buffers.depth.setTest(!0),g.buffers.depth.setMask(!0),g.buffers.color.setMask(!0),g.setPolygonOffset(!1),e.onAfterRender(D,e,t),ue.enabled&&ue.submitFrame(),u=null,h=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.allocTextureUnit=function(){var e=W;return e>=f.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+e+" texture units while this GPU supports only "+f.maxTextures),W+=1,e},this.setTexture2D=(we=!1,function(e,t){e&&e.isWebGLRenderTarget&&(we||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),we=!0),e=e.texture),_.setTexture2D(e,t)}),this.setTexture=function(){var e=!1;return function(t,n){e||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),e=!0),_.setTexture2D(t,n)}}(),this.setTextureCube=function(){var e=!1;return function(t,n){t&&t.isWebGLRenderTargetCube&&(e||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),e=!0),t=t.texture),t&&t.isCubeTexture||Array.isArray(t.image)&&6===t.image.length?_.setTextureCube(t,n):_.setTextureCubeDynamic(t,n)}}(),this.getRenderTarget=function(){return F},this.setRenderTarget=function(e){F=e,e&&void 0===v.get(e).__webglFramebuffer&&_.setupRenderTarget(e);var t=null,n=!1;if(e){var r=v.get(e).__webglFramebuffer;e.isWebGLRenderTargetCube?(t=r[e.activeCubeFace],n=!0):t=r,z.copy(e.viewport),q.copy(e.scissor),G=e.scissorTest}else z.copy(X).multiplyScalar(Y),q.copy(Q).multiplyScalar(Y),G=K;if(j!==t&&(d.bindFramebuffer(d.FRAMEBUFFER,t),j=t),g.viewport(z),g.scissor(q),g.setScissorTest(G),n){var i=v.get(e.texture);d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_CUBE_MAP_POSITIVE_X+e.activeCubeFace,i.__webglTexture,e.activeMipMapLevel)}},this.readRenderTargetPixels=function(e,t,n,r,i,o){if(e&&e.isWebGLRenderTarget){var a=v.get(e).__webglFramebuffer;if(a){var s=!1;a!==j&&(d.bindFramebuffer(d.FRAMEBUFFER,a),s=!0);try{var c=e.texture,l=c.format,u=c.type;if(1023!==l&&N.convert(l)!==d.getParameter(d.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(1009===u||N.convert(u)===d.getParameter(d.IMPLEMENTATION_COLOR_READ_TYPE)||1015===u&&(p.get("OES_texture_float")||p.get("WEBGL_color_buffer_float"))||1016===u&&p.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");d.checkFramebufferStatus(d.FRAMEBUFFER)===d.FRAMEBUFFER_COMPLETE?t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&d.readPixels(t,n,r,i,N.convert(l),N.convert(u),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&d.bindFramebuffer(d.FRAMEBUFFER,j)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(e,t,n){var r=t.image.width,i=t.image.height,o=N.convert(t.format);this.setTexture2D(t,0),d.copyTexImage2D(d.TEXTURE_2D,n||0,o,e.x,e.y,r,i,0)}}function An(e,t){this.name="",this.color=new fe(e),this.density=void 0!==t?t:25e-5}function xn(e,t,n){this.name="",this.color=new fe(e),this.near=void 0!==t?t:1,this.far=void 0!==n?n:1e3}function Sn(){Ge.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function Tn(e){Ce.call(this),this.type="SpriteMaterial",this.color=new fe(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(e)}function Mn(e){Ge.call(this),this.type="Sprite",this.material=void 0!==e?e:new Tn,this.center=new g(.5,.5)}function Rn(){Ge.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Cn(e,t){if(e=e||[],this.bones=e.slice(0),this.boneMatrices=new Float32Array(16*this.bones.length),void 0===t)this.calculateInverses();else if(this.bones.length===t.length)this.boneInverses=t.slice(0);else{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new y)}}function kn(){Ge.call(this),this.type="Bone"}function In(e,t){Rt.call(this,e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new y,this.bindMatrixInverse=new y;var n=new Cn(this.initBones());this.bind(n,this.matrixWorld),this.normalizeSkinWeights()}function Pn(e){Ce.call(this),this.type="LineBasicMaterial",this.color=new fe(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(e)}function On(e,t,n){if(1===n)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new Nn(e,t);Ge.call(this),this.type="Line",this.geometry=void 0!==e?e:new vt,this.material=void 0!==t?t:new Pn({color:16777215*Math.random()})}function Nn(e,t){On.call(this,e,t),this.type="LineSegments"}function Dn(e,t){On.call(this,e,t),this.type="LineLoop"}function Ln(e){Ce.call(this),this.type="PointsMaterial",this.color=new fe(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=!1,this.setValues(e)}function Fn(e,t){Ge.call(this),this.type="Points",this.geometry=void 0!==e?e:new vt,this.material=void 0!==t?t:new Ln({color:16777215*Math.random()})}function jn(){Ge.call(this),this.type="Group"}function Un(e,t,n,r,i,o,a,s,c){E.call(this,e,t,n,r,i,o,a,s,c),this.generateMipmaps=!1}function Bn(e,t,n,r,i,o,a,s,c,l,u,h){E.call(this,null,o,a,s,c,l,r,i,u,h),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}function Vn(e,t,n,r,i,o,a,s,c,l){if(1026!==(l=void 0!==l?l:1026)&&1027!==l)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&1026===l&&(n=1012),void 0===n&&1027===l&&(n=1020),E.call(this,null,r,i,o,a,s,l,n,c),this.image={width:e,height:t},this.magFilter=void 0!==a?a:1003,this.minFilter=void 0!==s?s:1003,this.flipY=!1,this.generateMipmaps=!1}function Hn(e){vt.call(this),this.type="WireframeGeometry";var t,n,r,i,o,a,s,c,l,u,h=[],d=[0,0],p={},f=["a","b","c"];if(e&&e.isGeometry){var m=e.faces;for(t=0,r=m.length;t<r;t++){var g=m[t];for(n=0;n<3;n++)s=g[f[n]],c=g[f[(n+1)%3]],d[0]=Math.min(s,c),d[1]=Math.max(s,c),void 0===p[l=d[0]+","+d[1]]&&(p[l]={index1:d[0],index2:d[1]})}for(l in p)a=p[l],u=e.vertices[a.index1],h.push(u.x,u.y,u.z),u=e.vertices[a.index2],h.push(u.x,u.y,u.z)}else if(e&&e.isBufferGeometry){var y,v,_,w,E,A,x;if(u=new b,null!==e.index){for(y=e.attributes.position,v=e.index,0===(_=e.groups).length&&(_=[{start:0,count:v.count,materialIndex:0}]),i=0,o=_.length;i<o;++i)for(t=E=(w=_[i]).start,r=E+w.count;t<r;t+=3)for(n=0;n<3;n++)s=v.getX(t+n),c=v.getX(t+(n+1)%3),d[0]=Math.min(s,c),d[1]=Math.max(s,c),void 0===p[l=d[0]+","+d[1]]&&(p[l]={index1:d[0],index2:d[1]});for(l in p)a=p[l],u.fromBufferAttribute(y,a.index1),h.push(u.x,u.y,u.z),u.fromBufferAttribute(y,a.index2),h.push(u.x,u.y,u.z)}else for(t=0,r=(y=e.attributes.position).count/3;t<r;t++)for(n=0;n<3;n++)A=3*t+n,u.fromBufferAttribute(y,A),h.push(u.x,u.y,u.z),x=3*t+(n+1)%3,u.fromBufferAttribute(y,x),h.push(u.x,u.y,u.z)}this.addAttribute("position",new at(h,3))}function zn(e,t,n){Qe.call(this),this.type="ParametricGeometry",this.parameters={func:e,slices:t,stacks:n},this.fromBufferGeometry(new qn(e,t,n)),this.mergeVertices()}function qn(e,t,n){vt.call(this),this.type="ParametricBufferGeometry",this.parameters={func:e,slices:t,stacks:n};var r,i,o=[],a=[],s=[],c=[],l=1e-5,u=new b,h=new b,d=new b,p=new b,f=new b,m=t+1;for(r=0;r<=n;r++){var g=r/n;for(i=0;i<=t;i++){var y=i/t;h=e(y,g,h),a.push(h.x,h.y,h.z),y-l>=0?(d=e(y-l,g,d),p.subVectors(h,d)):(d=e(y+l,g,d),p.subVectors(d,h)),g-l>=0?(d=e(y,g-l,d),f.subVectors(h,d)):(d=e(y,g+l,d),f.subVectors(d,h)),u.crossVectors(p,f).normalize(),s.push(u.x,u.y,u.z),c.push(y,g)}}for(r=0;r<n;r++)for(i=0;i<t;i++){var v=r*m+i,_=r*m+i+1,w=(r+1)*m+i+1,E=(r+1)*m+i;o.push(v,_,E),o.push(_,w,E)}this.setIndex(o),this.addAttribute("position",new at(a,3)),this.addAttribute("normal",new at(s,3)),this.addAttribute("uv",new at(c,2))}function Gn(e,t,n,r){Qe.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:r},this.fromBufferGeometry(new Wn(e,t,n,r)),this.mergeVertices()}function Wn(e,t,n,r){vt.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:r},n=n||1;var i=[],o=[];function a(e,t,n,r){var i,o,a=Math.pow(2,r),c=[];for(i=0;i<=a;i++){c[i]=[];var l=e.clone().lerp(n,i/a),u=t.clone().lerp(n,i/a),h=a-i;for(o=0;o<=h;o++)c[i][o]=0===o&&i===a?l:l.clone().lerp(u,o/h)}for(i=0;i<a;i++)for(o=0;o<2*(a-i)-1;o++){var d=Math.floor(o/2);o%2==0?(s(c[i][d+1]),s(c[i+1][d]),s(c[i][d])):(s(c[i][d+1]),s(c[i+1][d+1]),s(c[i+1][d]))}}function s(e){i.push(e.x,e.y,e.z)}function c(t,n){var r=3*t;n.x=e[r+0],n.y=e[r+1],n.z=e[r+2]}function l(e,t,n,r){r<0&&1===e.x&&(o[t]=e.x-1),0===n.x&&0===n.z&&(o[t]=r/2/Math.PI+.5)}function u(e){return Math.atan2(e.z,-e.x)}function h(e){return Math.atan2(-e.y,Math.sqrt(e.x*e.x+e.z*e.z))}!function(e){for(var n=new b,r=new b,i=new b,o=0;o<t.length;o+=3)c(t[o+0],n),c(t[o+1],r),c(t[o+2],i),a(n,r,i,e)}(r=r||0),function(e){for(var t=new b,n=0;n<i.length;n+=3)t.x=i[n+0],t.y=i[n+1],t.z=i[n+2],t.normalize().multiplyScalar(e),i[n+0]=t.x,i[n+1]=t.y,i[n+2]=t.z}(n),function(){for(var e=new b,t=0;t<i.length;t+=3){e.x=i[t+0],e.y=i[t+1],e.z=i[t+2];var n=u(e)/2/Math.PI+.5,r=h(e)/Math.PI+.5;o.push(n,1-r)}(function(){for(var e=new b,t=new b,n=new b,r=new b,a=new g,s=new g,c=new g,h=0,d=0;h<i.length;h+=9,d+=6){e.set(i[h+0],i[h+1],i[h+2]),t.set(i[h+3],i[h+4],i[h+5]),n.set(i[h+6],i[h+7],i[h+8]),a.set(o[d+0],o[d+1]),s.set(o[d+2],o[d+3]),c.set(o[d+4],o[d+5]),r.copy(e).add(t).add(n).divideScalar(3);var p=u(r);l(a,d+0,e,p),l(s,d+2,t,p),l(c,d+4,n,p)}})(),function(){for(var e=0;e<o.length;e+=6){var t=o[e+0],n=o[e+2],r=o[e+4],i=Math.max(t,n,r),a=Math.min(t,n,r);i>.9&&a<.1&&(t<.2&&(o[e+0]+=1),n<.2&&(o[e+2]+=1),r<.2&&(o[e+4]+=1))}}()}(),this.addAttribute("position",new at(i,3)),this.addAttribute("normal",new at(i.slice(),3)),this.addAttribute("uv",new at(o,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}function Jn(e,t){Qe.call(this),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Zn(e,t)),this.mergeVertices()}function Zn(e,t){Wn.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],e,t),this.type="TetrahedronBufferGeometry",this.parameters={radius:e,detail:t}}function Yn(e,t){Qe.call(this),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Xn(e,t)),this.mergeVertices()}function Xn(e,t){Wn.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],e,t),this.type="OctahedronBufferGeometry",this.parameters={radius:e,detail:t}}function Qn(e,t){Qe.call(this),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Kn(e,t)),this.mergeVertices()}function Kn(e,t){var n=(1+Math.sqrt(5))/2,r=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1];Wn.call(this,r,[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],e,t),this.type="IcosahedronBufferGeometry",this.parameters={radius:e,detail:t}}function $n(e,t){Qe.call(this),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new er(e,t)),this.mergeVertices()}function er(e,t){var n=(1+Math.sqrt(5))/2,r=1/n,i=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r];Wn.call(this,i,[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronBufferGeometry",this.parameters={radius:e,detail:t}}function tr(e,t,n,r,i,o){Qe.call(this),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:i},void 0!==o&&console.warn("THREE.TubeGeometry: taper has been removed.");var a=new nr(e,t,n,r,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals,this.fromBufferGeometry(a),this.mergeVertices()}function nr(e,t,n,r,i){vt.call(this),this.type="TubeBufferGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:i},t=t||64,n=n||1,r=r||8,i=i||!1;var o=e.computeFrenetFrames(t,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;var a,s,c=new b,l=new b,u=new g,h=new b,d=[],p=[],f=[],m=[];function y(i){h=e.getPointAt(i/t,h);var a=o.normals[i],u=o.binormals[i];for(s=0;s<=r;s++){var f=s/r*Math.PI*2,m=Math.sin(f),g=-Math.cos(f);l.x=g*a.x+m*u.x,l.y=g*a.y+m*u.y,l.z=g*a.z+m*u.z,l.normalize(),p.push(l.x,l.y,l.z),c.x=h.x+n*l.x,c.y=h.y+n*l.y,c.z=h.z+n*l.z,d.push(c.x,c.y,c.z)}}!function(){for(a=0;a<t;a++)y(a);y(!1===i?t:0),function(){for(a=0;a<=t;a++)for(s=0;s<=r;s++)u.x=a/t,u.y=s/r,f.push(u.x,u.y)}(),function(){for(s=1;s<=t;s++)for(a=1;a<=r;a++){var e=(r+1)*(s-1)+(a-1),n=(r+1)*s+(a-1),i=(r+1)*s+a,o=(r+1)*(s-1)+a;m.push(e,n,o),m.push(n,i,o)}}()}(),this.setIndex(m),this.addAttribute("position",new at(d,3)),this.addAttribute("normal",new at(p,3)),this.addAttribute("uv",new at(f,2))}function rr(e,t,n,r,i,o,a){Qe.call(this),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:r,p:i,q:o},void 0!==a&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new ir(e,t,n,r,i,o)),this.mergeVertices()}function ir(e,t,n,r,i,o){vt.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:r,p:i,q:o},e=e||1,t=t||.4,n=Math.floor(n)||64,r=Math.floor(r)||8,i=i||2,o=o||3;var a,s,c=[],l=[],u=[],h=[],d=new b,p=new b,f=new b,m=new b,g=new b,y=new b,v=new b;for(a=0;a<=n;++a){var _=a/n*i*Math.PI*2;for(R(_,i,o,e,f),R(_+.01,i,o,e,m),y.subVectors(m,f),v.addVectors(m,f),g.crossVectors(y,v),v.crossVectors(g,y),g.normalize(),v.normalize(),s=0;s<=r;++s){var w=s/r*Math.PI*2,E=-t*Math.cos(w),A=t*Math.sin(w);d.x=f.x+(E*v.x+A*g.x),d.y=f.y+(E*v.y+A*g.y),d.z=f.z+(E*v.z+A*g.z),l.push(d.x,d.y,d.z),p.subVectors(d,f).normalize(),u.push(p.x,p.y,p.z),h.push(a/n),h.push(s/r)}}for(s=1;s<=n;s++)for(a=1;a<=r;a++){var x=(r+1)*(s-1)+(a-1),S=(r+1)*s+(a-1),T=(r+1)*s+a,M=(r+1)*(s-1)+a;c.push(x,S,M),c.push(S,T,M)}function R(e,t,n,r,i){var o=Math.cos(e),a=Math.sin(e),s=n/t*e,c=Math.cos(s);i.x=r*(2+c)*.5*o,i.y=r*(2+c)*a*.5,i.z=r*Math.sin(s)*.5}this.setIndex(c),this.addAttribute("position",new at(l,3)),this.addAttribute("normal",new at(u,3)),this.addAttribute("uv",new at(h,2))}function or(e,t,n,r,i){Qe.call(this),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:r,arc:i},this.fromBufferGeometry(new ar(e,t,n,r,i)),this.mergeVertices()}function ar(e,t,n,r,i){vt.call(this),this.type="TorusBufferGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:r,arc:i},e=e||1,t=t||.4,n=Math.floor(n)||8,r=Math.floor(r)||6,i=i||2*Math.PI;var o,a,s=[],c=[],l=[],u=[],h=new b,d=new b,p=new b;for(o=0;o<=n;o++)for(a=0;a<=r;a++){var f=a/r*i,m=o/n*Math.PI*2;d.x=(e+t*Math.cos(m))*Math.cos(f),d.y=(e+t*Math.cos(m))*Math.sin(f),d.z=t*Math.sin(m),c.push(d.x,d.y,d.z),h.x=e*Math.cos(f),h.y=e*Math.sin(f),p.subVectors(d,h).normalize(),l.push(p.x,p.y,p.z),u.push(a/r),u.push(o/n)}for(o=1;o<=n;o++)for(a=1;a<=r;a++){var g=(r+1)*o+a-1,y=(r+1)*(o-1)+a-1,v=(r+1)*(o-1)+a,_=(r+1)*o+a;s.push(g,y,_),s.push(y,v,_)}this.setIndex(s),this.addAttribute("position",new at(c,3)),this.addAttribute("normal",new at(l,3)),this.addAttribute("uv",new at(u,2))}An.prototype.isFogExp2=!0,An.prototype.clone=function(){return new An(this.color.getHex(),this.density)},An.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},xn.prototype.isFog=!0,xn.prototype.clone=function(){return new xn(this.color.getHex(),this.near,this.far)},xn.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},Sn.prototype=Object.assign(Object.create(Ge.prototype),{constructor:Sn,copy:function(e,t){return Ge.prototype.copy.call(this,e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.fog&&(this.fog=e.fog.clone()),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this},toJSON:function(e){var t=Ge.prototype.toJSON.call(this,e);return null!==this.background&&(t.object.background=this.background.toJSON(e)),null!==this.fog&&(t.object.fog=this.fog.toJSON()),t}}),Tn.prototype=Object.create(Ce.prototype),Tn.prototype.constructor=Tn,Tn.prototype.isSpriteMaterial=!0,Tn.prototype.copy=function(e){return Ce.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.rotation=e.rotation,this},Mn.prototype=Object.assign(Object.create(Ge.prototype),{constructor:Mn,isSprite:!0,raycast:(un=new b,hn=new b,dn=new b,function(e,t){hn.setFromMatrixPosition(this.matrixWorld),e.ray.closestPointToPoint(hn,un),dn.setFromMatrixScale(this.matrixWorld);var n=dn.x*dn.y/4;if(!(hn.distanceToSquared(un)>n)){var r=e.ray.origin.distanceTo(un);r<e.near||r>e.far||t.push({distance:r,point:un.clone(),face:null,object:this})}}),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(e){return Ge.prototype.copy.call(this,e),void 0!==e.center&&this.center.copy(e.center),this}}),Rn.prototype=Object.assign(Object.create(Ge.prototype),{constructor:Rn,copy:function(e){Ge.prototype.copy.call(this,e,!1);for(var t=e.levels,n=0,r=t.length;n<r;n++){var i=t[n];this.addLevel(i.object.clone(),i.distance)}return this},addLevel:function(e,t){void 0===t&&(t=0),t=Math.abs(t);for(var n=this.levels,r=0;r<n.length&&!(t<n[r].distance);r++);n.splice(r,0,{distance:t,object:e}),this.add(e)},getObjectForDistance:function(e){for(var t=this.levels,n=1,r=t.length;n<r&&!(e<t[n].distance);n++);return t[n-1].object},raycast:(pn=new b,function(e,t){pn.setFromMatrixPosition(this.matrixWorld);var n=e.ray.origin.distanceTo(pn);this.getObjectForDistance(n).raycast(e,t)}),update:function(){var e=new b,t=new b;return function(n){var r=this.levels;if(r.length>1){e.setFromMatrixPosition(n.matrixWorld),t.setFromMatrixPosition(this.matrixWorld);var i=e.distanceTo(t);r[0].object.visible=!0;for(var o=1,a=r.length;o<a&&i>=r[o].distance;o++)r[o-1].object.visible=!1,r[o].object.visible=!0;for(;o<a;o++)r[o].object.visible=!1}}}(),toJSON:function(e){var t=Ge.prototype.toJSON.call(this,e);t.object.levels=[];for(var n=this.levels,r=0,i=n.length;r<i;r++){var o=n[r];t.object.levels.push({object:o.object.uuid,distance:o.distance})}return t}}),Object.assign(Cn.prototype,{calculateInverses:function(){this.boneInverses=[];for(var e=0,t=this.bones.length;e<t;e++){var n=new y;this.bones[e]&&n.getInverse(this.bones[e].matrixWorld),this.boneInverses.push(n)}},pose:function(){var e,t,n;for(t=0,n=this.bones.length;t<n;t++)(e=this.bones[t])&&e.matrixWorld.getInverse(this.boneInverses[t]);for(t=0,n=this.bones.length;t<n;t++)(e=this.bones[t])&&(e.parent&&e.parent.isBone?(e.matrix.getInverse(e.parent.matrixWorld),e.matrix.multiply(e.matrixWorld)):e.matrix.copy(e.matrixWorld),e.matrix.decompose(e.position,e.quaternion,e.scale))},update:(fn=new y,mn=new y,function(){for(var e=this.bones,t=this.boneInverses,n=this.boneMatrices,r=this.boneTexture,i=0,o=e.length;i<o;i++){var a=e[i]?e[i].matrixWorld:mn;fn.multiplyMatrices(a,t[i]),fn.toArray(n,16*i)}void 0!==r&&(r.needsUpdate=!0)}),clone:function(){return new Cn(this.bones,this.boneInverses)},getBoneByName:function(e){for(var t=0,n=this.bones.length;t<n;t++){var r=this.bones[t];if(r.name===e)return r}}}),kn.prototype=Object.assign(Object.create(Ge.prototype),{constructor:kn,isBone:!0}),In.prototype=Object.assign(Object.create(Rt.prototype),{constructor:In,isSkinnedMesh:!0,initBones:function(){var e,t,n,r,i=[];if(this.geometry&&void 0!==this.geometry.bones){for(n=0,r=this.geometry.bones.length;n<r;n++)t=this.geometry.bones[n],e=new kn,i.push(e),e.name=t.name,e.position.fromArray(t.pos),e.quaternion.fromArray(t.rotq),void 0!==t.scl&&e.scale.fromArray(t.scl);for(n=0,r=this.geometry.bones.length;n<r;n++)-1!==(t=this.geometry.bones[n]).parent&&null!==t.parent&&void 0!==i[t.parent]?i[t.parent].add(i[n]):this.add(i[n])}return this.updateMatrixWorld(!0),i},bind:function(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.getInverse(t)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var e,t;if(this.geometry&&this.geometry.isGeometry)for(t=0;t<this.geometry.skinWeights.length;t++){var n=this.geometry.skinWeights[t];(e=1/n.manhattanLength())!==1/0?n.multiplyScalar(e):n.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var r=new A,i=this.geometry.attributes.skinWeight;for(t=0;t<i.count;t++)r.x=i.getX(t),r.y=i.getY(t),r.z=i.getZ(t),r.w=i.getW(t),(e=1/r.manhattanLength())!==1/0?r.multiplyScalar(e):r.set(1,0,0,0),i.setXYZW(t,r.x,r.y,r.z,r.w)}},updateMatrixWorld:function(e){Rt.prototype.updateMatrixWorld.call(this,e),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Pn.prototype=Object.create(Ce.prototype),Pn.prototype.constructor=Pn,Pn.prototype.isLineBasicMaterial=!0,Pn.prototype.copy=function(e){return Ce.prototype.copy.call(this,e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this},On.prototype=Object.assign(Object.create(Ge.prototype),{constructor:On,isLine:!0,computeLineDistances:(gn=new b,yn=new b,function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,n=[0],r=1,i=t.count;r<i;r++)gn.fromBufferAttribute(t,r-1),yn.fromBufferAttribute(t,r),n[r]=n[r-1],n[r]+=gn.distanceTo(yn);e.addAttribute("lineDistance",new THREE.Float32BufferAttribute(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(e.isGeometry){var o=e.vertices;for((n=e.lineDistances)[0]=0,r=1,i=o.length;r<i;r++)n[r]=n[r-1],n[r]+=o[r-1].distanceTo(o[r])}return this}),raycast:function(){var e=new y,t=new St,n=new Oe;return function(r,i){var o=r.linePrecision,a=o*o,s=this.geometry,c=this.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),n.copy(s.boundingSphere),n.applyMatrix4(c),!1!==r.ray.intersectsSphere(n)){e.getInverse(c),t.copy(r.ray).applyMatrix4(e);var l=new b,u=new b,h=new b,d=new b,p=this&&this.isLineSegments?2:1;if(s.isBufferGeometry){var f=s.index,m=s.attributes.position.array;if(null!==f)for(var g=f.array,y=0,v=g.length-1;y<v;y+=p){var _=g[y],w=g[y+1];if(l.fromArray(m,3*_),u.fromArray(m,3*w),!(t.distanceSqToSegment(l,u,d,h)>a))d.applyMatrix4(this.matrixWorld),(x=r.ray.origin.distanceTo(d))<r.near||x>r.far||i.push({distance:x,point:h.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}else for(y=0,v=m.length/3-1;y<v;y+=p){if(l.fromArray(m,3*y),u.fromArray(m,3*y+3),!(t.distanceSqToSegment(l,u,d,h)>a))d.applyMatrix4(this.matrixWorld),(x=r.ray.origin.distanceTo(d))<r.near||x>r.far||i.push({distance:x,point:h.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}else if(s.isGeometry){var E=s.vertices,A=E.length;for(y=0;y<A-1;y+=p){var x;if(!(t.distanceSqToSegment(E[y],E[y+1],d,h)>a))d.applyMatrix4(this.matrixWorld),(x=r.ray.origin.distanceTo(d))<r.near||x>r.far||i.push({distance:x,point:h.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Nn.prototype=Object.assign(Object.create(On.prototype),{constructor:Nn,isLineSegments:!0,computeLineDistances:function(){var e=new b,t=new b;return function(){var n=this.geometry;if(n.isBufferGeometry)if(null===n.index){for(var r=n.attributes.position,i=[],o=0,a=r.count;o<a;o+=2)e.fromBufferAttribute(r,o),t.fromBufferAttribute(r,o+1),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+e.distanceTo(t);n.addAttribute("lineDistance",new THREE.Float32BufferAttribute(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(n.isGeometry){var s=n.vertices;for(i=n.lineDistances,o=0,a=s.length;o<a;o+=2)e.copy(s[o]),t.copy(s[o+1]),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+e.distanceTo(t)}return this}}()}),Dn.prototype=Object.assign(Object.create(On.prototype),{constructor:Dn,isLineLoop:!0}),Ln.prototype=Object.create(Ce.prototype),Ln.prototype.constructor=Ln,Ln.prototype.isPointsMaterial=!0,Ln.prototype.copy=function(e){return Ce.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this},Fn.prototype=Object.assign(Object.create(Ge.prototype),{constructor:Fn,isPoints:!0,raycast:function(){var e=new y,t=new St,n=new Oe;return function(r,i){var o=this,a=this.geometry,s=this.matrixWorld,c=r.params.Points.threshold;if(null===a.boundingSphere&&a.computeBoundingSphere(),n.copy(a.boundingSphere),n.applyMatrix4(s),n.radius+=c,!1!==r.ray.intersectsSphere(n)){e.getInverse(s),t.copy(r.ray).applyMatrix4(e);var l=c/((this.scale.x+this.scale.y+this.scale.z)/3),u=l*l,h=new b;if(a.isBufferGeometry){var d=a.index,p=a.attributes.position.array;if(null!==d)for(var f=d.array,m=0,g=f.length;m<g;m++){var y=f[m];h.fromArray(p,3*y),w(h,y)}else{m=0;for(var v=p.length/3;m<v;m++)h.fromArray(p,3*m),w(h,m)}}else{var _=a.vertices;for(m=0,v=_.length;m<v;m++)w(_[m],m)}}function w(e,n){var a=t.distanceSqToPoint(e);if(a<u){var c=t.closestPointToPoint(e);c.applyMatrix4(s);var l=r.ray.origin.distanceTo(c);if(l<r.near||l>r.far)return;i.push({distance:l,distanceToRay:Math.sqrt(a),point:c.clone(),index:n,face:null,object:o})}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),jn.prototype=Object.assign(Object.create(Ge.prototype),{constructor:jn,isGroup:!0}),Un.prototype=Object.assign(Object.create(E.prototype),{constructor:Un,isVideoTexture:!0,update:function(){var e=this.image;e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),Bn.prototype=Object.create(E.prototype),Bn.prototype.constructor=Bn,Bn.prototype.isCompressedTexture=!0,Vn.prototype=Object.create(E.prototype),Vn.prototype.constructor=Vn,Vn.prototype.isDepthTexture=!0,Hn.prototype=Object.create(vt.prototype),Hn.prototype.constructor=Hn,zn.prototype=Object.create(Qe.prototype),zn.prototype.constructor=zn,qn.prototype=Object.create(vt.prototype),qn.prototype.constructor=qn,Gn.prototype=Object.create(Qe.prototype),Gn.prototype.constructor=Gn,Wn.prototype=Object.create(vt.prototype),Wn.prototype.constructor=Wn,Jn.prototype=Object.create(Qe.prototype),Jn.prototype.constructor=Jn,Zn.prototype=Object.create(Wn.prototype),Zn.prototype.constructor=Zn,Yn.prototype=Object.create(Qe.prototype),Yn.prototype.constructor=Yn,Xn.prototype=Object.create(Wn.prototype),Xn.prototype.constructor=Xn,Qn.prototype=Object.create(Qe.prototype),Qn.prototype.constructor=Qn,Kn.prototype=Object.create(Wn.prototype),Kn.prototype.constructor=Kn,$n.prototype=Object.create(Qe.prototype),$n.prototype.constructor=$n,er.prototype=Object.create(Wn.prototype),er.prototype.constructor=er,tr.prototype=Object.create(Qe.prototype),tr.prototype.constructor=tr,nr.prototype=Object.create(vt.prototype),nr.prototype.constructor=nr,rr.prototype=Object.create(Qe.prototype),rr.prototype.constructor=rr,ir.prototype=Object.create(vt.prototype),ir.prototype.constructor=ir,or.prototype=Object.create(Qe.prototype),or.prototype.constructor=or,ar.prototype=Object.create(vt.prototype),ar.prototype.constructor=ar;var sr=function(e,t,n){n=n||2;var r,i,o,a,s,c,l,u=t&&t.length,h=u?t[0]*n:e.length,d=cr(e,0,h,n,!0),p=[];if(!d)return p;if(u&&(d=function(e,t,n,r){var i,o,a,s,c,l=[];for(i=0,o=t.length;i<o;i++)a=t[i]*r,s=i<o-1?t[i+1]*r:e.length,(c=cr(e,a,s,r,!1))===c.next&&(c.steiner=!0),l.push(vr(c));for(l.sort(mr),i=0;i<l.length;i++)gr(l[i],n),n=lr(n,n.next);return n}(e,t,d,n)),e.length>80*n){r=o=e[0],i=a=e[1];for(var f=n;f<h;f+=n)(s=e[f])<r&&(r=s),(c=e[f+1])<i&&(i=c),s>o&&(o=s),c>a&&(a=c);l=0!==(l=Math.max(o-r,a-i))?1/l:0}return ur(d,p,n,r,i,l),p};function cr(e,t,n,r,i){var o,a;if(i===function(e,t,n,r){for(var i=0,o=t,a=n-r;o<n;o+=r)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}(e,t,n,r)>0)for(o=t;o<n;o+=r)a=Tr(o,e[o],e[o+1],a);else for(o=n-r;o>=t;o-=r)a=Tr(o,e[o],e[o+1],a);return a&&Er(a,a.next)&&(Mr(a),a=a.next),a}function lr(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!Er(r,r.next)&&0!==wr(r.prev,r,r.next))r=r.next;else{if(Mr(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function ur(e,t,n,r,i,o,a){if(e){!a&&o&&function(e,t,n,r){var i=e;do{null===i.z&&(i.z=yr(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,o,a,s,c,l=1;do{for(n=e,e=null,o=null,a=0;n;){for(a++,r=n,s=0,t=0;t<l&&(s++,r=r.nextZ);t++);for(c=l;s>0||c>0&&r;)0!==s&&(0===c||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,l*=2}while(a>1)}(i)}(e,r,i,o);for(var s,c,l=e;e.prev!==e.next;)if(s=e.prev,c=e.next,o?dr(e,r,i,o):hr(e))t.push(s.i/n),t.push(e.i/n),t.push(c.i/n),Mr(e),e=c.next,l=c.next;else if((e=c)===l){a?1===a?ur(e=pr(e,t,n),t,n,r,i,o,2):2===a&&fr(e,t,n,r,i,o):ur(lr(e),t,n,r,i,o,1);break}}}function hr(e){var t=e.prev,n=e,r=e.next;if(wr(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(br(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&wr(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function dr(e,t,n,r){var i=e.prev,o=e,a=e.next;if(wr(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,c=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,l=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,u=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=yr(s,c,t,n,r),d=yr(l,u,t,n,r),p=e.nextZ;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&br(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&wr(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=e.prevZ;p&&p.z>=h;){if(p!==e.prev&&p!==e.next&&br(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&wr(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function pr(e,t,n){var r=e;do{var i=r.prev,o=r.next.next;!Er(i,o)&&Ar(i,r,r.next,o)&&xr(i,o)&&xr(o,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(o.i/n),Mr(r),Mr(r.next),r=e=o),r=r.next}while(r!==e);return r}function fr(e,t,n,r,i,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&_r(a,s)){var c=Sr(a,s);return a=lr(a,a.next),c=lr(c,c.next),ur(a,t,n,r,i,o),void ur(c,t,n,r,i,o)}s=s.next}a=a.next}while(a!==e)}function mr(e,t){return e.x-t.x}function gr(e,t){if(t=function(e,t){var n,r=t,i=e.x,o=e.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(i===a)return n.prev;var c,l=n,u=n.x,h=n.y,d=1/0;r=n.next;for(;r!==l;)i>=r.x&&r.x>=u&&i!==r.x&&br(o<h?i:a,o,u,h,o<h?a:i,o,r.x,r.y)&&((c=Math.abs(o-r.y)/(i-r.x))<d||c===d&&r.x>n.x)&&xr(r,e)&&(n=r,d=c),r=r.next;return n}(e,t)){var n=Sr(t,e);lr(n,n.next)}}function yr(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function vr(e){var t=e,n=e;do{t.x<n.x&&(n=t),t=t.next}while(t!==e);return n}function br(e,t,n,r,i,o,a,s){return(i-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(r-s)-(n-a)*(t-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function _r(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&Ar(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&xr(e,t)&&xr(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)}function wr(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function Er(e,t){return e.x===t.x&&e.y===t.y}function Ar(e,t,n,r){return!!(Er(e,t)&&Er(n,r)||Er(e,r)&&Er(n,t))||wr(e,t,n)>0!=wr(e,t,r)>0&&wr(n,r,e)>0!=wr(n,r,t)>0}function xr(e,t){return wr(e.prev,e,e.next)<0?wr(e,t,e.next)>=0&&wr(e,e.prev,t)>=0:wr(e,t,e.prev)<0||wr(e,e.next,t)<0}function Sr(e,t){var n=new Rr(e.i,e.x,e.y),r=new Rr(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function Tr(e,t,n,r){var i=new Rr(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Mr(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Rr(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var Cr={area:function(e){for(var t=e.length,n=0,r=t-1,i=0;i<t;r=i++)n+=e[r].x*e[i].y-e[i].x*e[r].y;return.5*n},isClockWise:function(e){return Cr.area(e)<0},triangulateShape:function(e,t){var n=[],r=[],i=[];kr(e),Ir(n,e);var o=e.length;t.forEach(kr);for(var a=0;a<t.length;a++)r.push(o),o+=t[a].length,Ir(n,t[a]);var s=sr(n,r);for(a=0;a<s.length;a+=3)i.push(s.slice(a,a+3));return i}};function kr(e){var t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function Ir(e,t){for(var n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}function Pr(e,t){Qe.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},this.fromBufferGeometry(new Or(e,t)),this.mergeVertices()}function Or(e,t){void 0!==e&&(vt.call(this),this.type="ExtrudeBufferGeometry",e=Array.isArray(e)?e:[e],this.addShapeList(e,t),this.computeVertexNormals())}function Nr(e,t){Qe.call(this),this.type="TextGeometry",this.parameters={text:e,parameters:t},this.fromBufferGeometry(new Dr(e,t)),this.mergeVertices()}function Dr(e,t){var n=(t=t||{}).font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new Qe;var r=n.generateShapes(e,t.size,t.curveSegments);t.amount=void 0!==t.height?t.height:50,void 0===t.bevelThickness&&(t.bevelThickness=10),void 0===t.bevelSize&&(t.bevelSize=8),void 0===t.bevelEnabled&&(t.bevelEnabled=!1),Or.call(this,r,t),this.type="TextBufferGeometry"}function Lr(e,t,n,r,i,o,a){Qe.call(this),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},this.fromBufferGeometry(new Fr(e,t,n,r,i,o,a)),this.mergeVertices()}function Fr(e,t,n,r,i,o,a){vt.call(this),this.type="SphereBufferGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},e=e||1,t=Math.max(3,Math.floor(t)||8),n=Math.max(2,Math.floor(n)||6),r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI;var s,c,l=(o=void 0!==o?o:0)+(a=void 0!==a?a:Math.PI),u=0,h=[],d=new b,p=new b,f=[],m=[],g=[],y=[];for(c=0;c<=n;c++){var v=[],_=c/n;for(s=0;s<=t;s++){var w=s/t;d.x=-e*Math.cos(r+w*i)*Math.sin(o+_*a),d.y=e*Math.cos(o+_*a),d.z=e*Math.sin(r+w*i)*Math.sin(o+_*a),m.push(d.x,d.y,d.z),p.set(d.x,d.y,d.z).normalize(),g.push(p.x,p.y,p.z),y.push(w,1-_),v.push(u++)}h.push(v)}for(c=0;c<n;c++)for(s=0;s<t;s++){var E=h[c][s+1],A=h[c][s],x=h[c+1][s],S=h[c+1][s+1];(0!==c||o>0)&&f.push(E,A,S),(c!==n-1||l<Math.PI)&&f.push(A,x,S)}this.setIndex(f),this.addAttribute("position",new at(m,3)),this.addAttribute("normal",new at(g,3)),this.addAttribute("uv",new at(y,2))}function jr(e,t,n,r,i,o){Qe.call(this),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},this.fromBufferGeometry(new Ur(e,t,n,r,i,o)),this.mergeVertices()}function Ur(e,t,n,r,i,o){vt.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},e=e||.5,t=t||1,i=void 0!==i?i:0,o=void 0!==o?o:2*Math.PI,n=void 0!==n?Math.max(3,n):8;var a,s,c,l=[],u=[],h=[],d=[],p=e,f=(t-e)/(r=void 0!==r?Math.max(1,r):1),m=new b,y=new g;for(s=0;s<=r;s++){for(c=0;c<=n;c++)a=i+c/n*o,m.x=p*Math.cos(a),m.y=p*Math.sin(a),u.push(m.x,m.y,m.z),h.push(0,0,1),y.x=(m.x/t+1)/2,y.y=(m.y/t+1)/2,d.push(y.x,y.y);p+=f}for(s=0;s<r;s++){var v=s*(n+1);for(c=0;c<n;c++){var _=a=c+v,w=a+n+1,E=a+n+2,A=a+1;l.push(_,w,A),l.push(w,E,A)}}this.setIndex(l),this.addAttribute("position",new at(u,3)),this.addAttribute("normal",new at(h,3)),this.addAttribute("uv",new at(d,2))}function Br(e,t,n,r){Qe.call(this),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:r},this.fromBufferGeometry(new Vr(e,t,n,r)),this.mergeVertices()}function Vr(e,t,n,r){vt.call(this),this.type="LatheBufferGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:r},t=Math.floor(t)||12,n=n||0,r=r||2*Math.PI,r=m.clamp(r,0,2*Math.PI);var i,o,a,s=[],c=[],l=[],u=1/t,h=new b,d=new g;for(o=0;o<=t;o++){var p=n+o*u*r,f=Math.sin(p),y=Math.cos(p);for(a=0;a<=e.length-1;a++)h.x=e[a].x*f,h.y=e[a].y,h.z=e[a].x*y,c.push(h.x,h.y,h.z),d.x=o/t,d.y=a/(e.length-1),l.push(d.x,d.y)}for(o=0;o<t;o++)for(a=0;a<e.length-1;a++){var v=i=a+o*e.length,_=i+e.length,w=i+e.length+1,E=i+1;s.push(v,_,E),s.push(_,w,E)}if(this.setIndex(s),this.addAttribute("position",new at(c,3)),this.addAttribute("uv",new at(l,2)),this.computeVertexNormals(),r===2*Math.PI){var A=this.attributes.normal.array,x=new b,S=new b,T=new b;for(i=t*e.length*3,o=0,a=0;o<e.length;o++,a+=3)x.x=A[a+0],x.y=A[a+1],x.z=A[a+2],S.x=A[i+a+0],S.y=A[i+a+1],S.z=A[i+a+2],T.addVectors(x,S).normalize(),A[a+0]=A[i+a+0]=T.x,A[a+1]=A[i+a+1]=T.y,A[a+2]=A[i+a+2]=T.z}}function Hr(e,t){Qe.call(this),this.type="ShapeGeometry","object"==typeof t&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),t=t.curveSegments),this.parameters={shapes:e,curveSegments:t},this.fromBufferGeometry(new zr(e,t)),this.mergeVertices()}function zr(e,t){vt.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:e,curveSegments:t},t=t||12;var n=[],r=[],i=[],o=[],a=0,s=0;if(!1===Array.isArray(e))l(e);else for(var c=0;c<e.length;c++)l(e[c]),this.addGroup(a,s,c),a+=s,s=0;function l(e){var a,c,l,u=r.length/3,h=e.extractPoints(t),d=h.shape,p=h.holes;if(!1===Cr.isClockWise(d))for(d=d.reverse(),a=0,c=p.length;a<c;a++)l=p[a],!0===Cr.isClockWise(l)&&(p[a]=l.reverse());var f=Cr.triangulateShape(d,p);for(a=0,c=p.length;a<c;a++)l=p[a],d=d.concat(l);for(a=0,c=d.length;a<c;a++){var m=d[a];r.push(m.x,m.y,0),i.push(0,0,1),o.push(m.x,m.y)}for(a=0,c=f.length;a<c;a++){var g=f[a],y=g[0]+u,v=g[1]+u,b=g[2]+u;n.push(y,v,b),s+=3}}this.setIndex(n),this.addAttribute("position",new at(r,3)),this.addAttribute("normal",new at(i,3)),this.addAttribute("uv",new at(o,2))}function qr(e,t){if(t.shapes=[],Array.isArray(e))for(var n=0,r=e.length;n<r;n++){var i=e[n];t.shapes.push(i.uuid)}else t.shapes.push(e.uuid);return t}function Gr(e,t){vt.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:t},t=void 0!==t?t:1;var n,r,i,o,a=[],s=Math.cos(m.DEG2RAD*t),c=[0,0],l={},u=["a","b","c"];e.isBufferGeometry?(o=new Qe).fromBufferGeometry(e):o=e.clone(),o.mergeVertices(),o.computeFaceNormals();for(var h=o.vertices,d=o.faces,p=0,f=d.length;p<f;p++)for(var g=d[p],y=0;y<3;y++)n=g[u[y]],r=g[u[(y+1)%3]],c[0]=Math.min(n,r),c[1]=Math.max(n,r),void 0===l[i=c[0]+","+c[1]]?l[i]={index1:c[0],index2:c[1],face1:p,face2:void 0}:l[i].face2=p;for(i in l){var v=l[i];if(void 0===v.face2||d[v.face1].normal.dot(d[v.face2].normal)<=s){var b=h[v.index1];a.push(b.x,b.y,b.z),b=h[v.index2],a.push(b.x,b.y,b.z)}}this.addAttribute("position",new at(a,3))}function Wr(e,t,n,r,i,o,a,s){Qe.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s},this.fromBufferGeometry(new Jr(e,t,n,r,i,o,a,s)),this.mergeVertices()}function Jr(e,t,n,r,i,o,a,s){vt.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s};var c=this;e=void 0!==e?e:1,t=void 0!==t?t:1,n=n||1,r=Math.floor(r)||8,i=Math.floor(i)||1,o=void 0!==o&&o,a=void 0!==a?a:0,s=void 0!==s?s:2*Math.PI;var l=[],u=[],h=[],d=[],p=0,f=[],m=n/2,y=0;function v(n){var i,o,f,v=new g,_=new b,w=0,E=!0===n?e:t,A=!0===n?1:-1;for(o=p,i=1;i<=r;i++)u.push(0,m*A,0),h.push(0,A,0),d.push(.5,.5),p++;for(f=p,i=0;i<=r;i++){var x=i/r*s+a,S=Math.cos(x),T=Math.sin(x);_.x=E*T,_.y=m*A,_.z=E*S,u.push(_.x,_.y,_.z),h.push(0,A,0),v.x=.5*S+.5,v.y=.5*T*A+.5,d.push(v.x,v.y),p++}for(i=0;i<r;i++){var M=o+i,R=f+i;!0===n?l.push(R,R+1,M):l.push(R+1,R,M),w+=3}c.addGroup(y,w,!0===n?1:2),y+=w}!function(){var o,g,v=new b,_=new b,w=0,E=(t-e)/n;for(g=0;g<=i;g++){var A=[],x=g/i,S=x*(t-e)+e;for(o=0;o<=r;o++){var T=o/r,M=T*s+a,R=Math.sin(M),C=Math.cos(M);_.x=S*R,_.y=-x*n+m,_.z=S*C,u.push(_.x,_.y,_.z),v.set(R,E,C).normalize(),h.push(v.x,v.y,v.z),d.push(T,1-x),A.push(p++)}f.push(A)}for(o=0;o<r;o++)for(g=0;g<i;g++){var k=f[g][o],I=f[g+1][o],P=f[g+1][o+1],O=f[g][o+1];l.push(k,I,O),l.push(I,P,O),w+=6}c.addGroup(y,w,0),y+=w}(),!1===o&&(e>0&&v(!0),t>0&&v(!1)),this.setIndex(l),this.addAttribute("position",new at(u,3)),this.addAttribute("normal",new at(h,3)),this.addAttribute("uv",new at(d,2))}function Zr(e,t,n,r,i,o,a){Wr.call(this,0,e,t,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function Yr(e,t,n,r,i,o,a){Jr.call(this,0,e,t,n,r,i,o,a),this.type="ConeBufferGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function Xr(e,t,n,r){Qe.call(this),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new Qr(e,t,n,r)),this.mergeVertices()}function Qr(e,t,n,r){vt.call(this),this.type="CircleBufferGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},e=e||1,t=void 0!==t?Math.max(3,t):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var i,o,a=[],s=[],c=[],l=[],u=new b,h=new g;for(s.push(0,0,0),c.push(0,0,1),l.push(.5,.5),o=0,i=3;o<=t;o++,i+=3){var d=n+o/t*r;u.x=e*Math.cos(d),u.y=e*Math.sin(d),s.push(u.x,u.y,u.z),c.push(0,0,1),h.x=(s[i]/e+1)/2,h.y=(s[i+1]/e+1)/2,l.push(h.x,h.y)}for(i=1;i<=t;i++)a.push(i,i+1,0);this.setIndex(a),this.addAttribute("position",new at(s,3)),this.addAttribute("normal",new at(c,3)),this.addAttribute("uv",new at(l,2))}Pr.prototype=Object.create(Qe.prototype),Pr.prototype.constructor=Pr,Or.prototype=Object.create(vt.prototype),Or.prototype.constructor=Or,Or.prototype.getArrays=function(){var e=this.getAttribute("position"),t=e?Array.prototype.slice.call(e.array):[],n=this.getAttribute("uv"),r=n?Array.prototype.slice.call(n.array):[],i=this.index;return{position:t,uv:r,index:i?Array.prototype.slice.call(i.array):[]}},Or.prototype.addShapeList=function(e,t){var n=e.length;t.arrays=this.getArrays();for(var r=0;r<n;r++){var i=e[r];this.addShape(i,t)}this.setIndex(t.arrays.index),this.addAttribute("position",new at(t.arrays.position,3)),this.addAttribute("uv",new at(t.arrays.uv,2))},Or.prototype.addShape=function(e,t){var n,r,i,o,a,s,c,l,u=t.arrays?t.arrays:this.getArrays(),h=u.position,d=u.index,p=u.uv,f=[],m=void 0!==t.amount?t.amount:100,y=void 0!==t.bevelThickness?t.bevelThickness:6,v=void 0!==t.bevelSize?t.bevelSize:y-2,_=void 0!==t.bevelSegments?t.bevelSegments:3,w=void 0===t.bevelEnabled||t.bevelEnabled,E=void 0!==t.curveSegments?t.curveSegments:12,A=void 0!==t.steps?t.steps:1,x=t.extrudePath,S=!1,T=void 0!==t.UVGenerator?t.UVGenerator:Pr.WorldUVGenerator;x&&(n=x.getSpacedPoints(A),S=!0,w=!1,r=void 0!==t.frames?t.frames:x.computeFrenetFrames(A,!1),i=new b,o=new b,a=new b),w||(_=0,y=0,v=0);var M=this,R=e.extractPoints(E),C=R.shape,k=R.holes;if(!Cr.isClockWise(C))for(C=C.reverse(),c=0,l=k.length;c<l;c++)s=k[c],Cr.isClockWise(s)&&(k[c]=s.reverse());var I=Cr.triangulateShape(C,k),P=C;for(c=0,l=k.length;c<l;c++)s=k[c],C=C.concat(s);function O(e,t,n){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),t.clone().multiplyScalar(n).add(e)}var N,D,L,F,j,U,B=C.length,V=I.length;function H(e,t,n){var r,i,o,a=e.x-t.x,s=e.y-t.y,c=n.x-e.x,l=n.y-e.y,u=a*a+s*s,h=a*l-s*c;if(Math.abs(h)>Number.EPSILON){var d=Math.sqrt(u),p=Math.sqrt(c*c+l*l),f=t.x-s/d,m=t.y+a/d,y=((n.x-l/p-f)*l-(n.y+c/p-m)*c)/(a*l-s*c),v=(r=f+a*y-e.x)*r+(i=m+s*y-e.y)*i;if(v<=2)return new g(r,i);o=Math.sqrt(v/2)}else{var b=!1;a>Number.EPSILON?c>Number.EPSILON&&(b=!0):a<-Number.EPSILON?c<-Number.EPSILON&&(b=!0):Math.sign(s)===Math.sign(l)&&(b=!0),b?(r=-s,i=a,o=Math.sqrt(u)):(r=a,i=s,o=Math.sqrt(u/2))}return new g(r/o,i/o)}for(var z=[],q=0,G=P.length,W=G-1,J=q+1;q<G;q++,W++,J++)W===G&&(W=0),J===G&&(J=0),z[q]=H(P[q],P[W],P[J]);var Z,Y,X=[],Q=z.concat();for(c=0,l=k.length;c<l;c++){for(s=k[c],Z=[],q=0,W=(G=s.length)-1,J=q+1;q<G;q++,W++,J++)W===G&&(W=0),J===G&&(J=0),Z[q]=H(s[q],s[W],s[J]);X.push(Z),Q=Q.concat(Z)}for(N=0;N<_;N++){for(L=N/_,F=y*Math.cos(L*Math.PI/2),D=v*Math.sin(L*Math.PI/2),q=0,G=P.length;q<G;q++)$((j=O(P[q],z[q],D)).x,j.y,-F);for(c=0,l=k.length;c<l;c++)for(s=k[c],Z=X[c],q=0,G=s.length;q<G;q++)$((j=O(s[q],Z[q],D)).x,j.y,-F)}for(D=v,q=0;q<B;q++)j=w?O(C[q],Q[q],D):C[q],S?(o.copy(r.normals[0]).multiplyScalar(j.x),i.copy(r.binormals[0]).multiplyScalar(j.y),a.copy(n[0]).add(o).add(i),$(a.x,a.y,a.z)):$(j.x,j.y,0);for(Y=1;Y<=A;Y++)for(q=0;q<B;q++)j=w?O(C[q],Q[q],D):C[q],S?(o.copy(r.normals[Y]).multiplyScalar(j.x),i.copy(r.binormals[Y]).multiplyScalar(j.y),a.copy(n[Y]).add(o).add(i),$(a.x,a.y,a.z)):$(j.x,j.y,m/A*Y);for(N=_-1;N>=0;N--){for(L=N/_,F=y*Math.cos(L*Math.PI/2),D=v*Math.sin(L*Math.PI/2),q=0,G=P.length;q<G;q++)$((j=O(P[q],z[q],D)).x,j.y,m+F);for(c=0,l=k.length;c<l;c++)for(s=k[c],Z=X[c],q=0,G=s.length;q<G;q++)j=O(s[q],Z[q],D),S?$(j.x,j.y+n[A-1].y,n[A-1].x+F):$(j.x,j.y,m+F)}function K(e,t){var n,r;for(q=e.length;--q>=0;){n=q,(r=q-1)<0&&(r=e.length-1);var i=0,o=A+2*_;for(i=0;i<o;i++){var a=B*i,s=B*(i+1);te(t+n+a,t+r+a,t+r+s,t+n+s)}}}function $(e,t,n){f.push(e),f.push(t),f.push(n)}function ee(e,t,n){ne(e),ne(t),ne(n);var r=h.length/3,i=T.generateTopUV(M,h,r-3,r-2,r-1);re(i[0]),re(i[1]),re(i[2])}function te(e,t,n,r){ne(e),ne(t),ne(r),ne(t),ne(n),ne(r);var i=h.length/3,o=T.generateSideWallUV(M,h,i-6,i-3,i-2,i-1);re(o[0]),re(o[1]),re(o[3]),re(o[1]),re(o[2]),re(o[3])}function ne(e){d.push(h.length/3),h.push(f[3*e+0]),h.push(f[3*e+1]),h.push(f[3*e+2])}function re(e){p.push(e.x),p.push(e.y)}!function(){var e=h.length/3;if(w){var n=0,r=B*n;for(q=0;q<V;q++)ee((U=I[q])[2]+r,U[1]+r,U[0]+r);for(r=B*(n=A+2*_),q=0;q<V;q++)ee((U=I[q])[0]+r,U[1]+r,U[2]+r)}else{for(q=0;q<V;q++)ee((U=I[q])[2],U[1],U[0]);for(q=0;q<V;q++)ee((U=I[q])[0]+B*A,U[1]+B*A,U[2]+B*A)}M.addGroup(e,h.length/3-e,void 0!==t.material?t.material:0)}(),function(){var e=h.length/3,n=0;for(K(P,n),n+=P.length,c=0,l=k.length;c<l;c++)K(s=k[c],n),n+=s.length;M.addGroup(e,h.length/3-e,void 0!==t.extrudeMaterial?t.extrudeMaterial:1)}(),t.arrays||(this.setIndex(d),this.addAttribute("position",new at(h,3)),this.addAttribute("uv",new at(p,2)))},Pr.WorldUVGenerator={generateTopUV:function(e,t,n,r,i){var o=t[3*n],a=t[3*n+1],s=t[3*r],c=t[3*r+1],l=t[3*i],u=t[3*i+1];return[new g(o,a),new g(s,c),new g(l,u)]},generateSideWallUV:function(e,t,n,r,i,o){var a=t[3*n],s=t[3*n+1],c=t[3*n+2],l=t[3*r],u=t[3*r+1],h=t[3*r+2],d=t[3*i],p=t[3*i+1],f=t[3*i+2],m=t[3*o],y=t[3*o+1],v=t[3*o+2];return Math.abs(s-u)<.01?[new g(a,1-c),new g(l,1-h),new g(d,1-f),new g(m,1-v)]:[new g(s,1-c),new g(u,1-h),new g(p,1-f),new g(y,1-v)]}},Nr.prototype=Object.create(Qe.prototype),Nr.prototype.constructor=Nr,Dr.prototype=Object.create(Or.prototype),Dr.prototype.constructor=Dr,Lr.prototype=Object.create(Qe.prototype),Lr.prototype.constructor=Lr,Fr.prototype=Object.create(vt.prototype),Fr.prototype.constructor=Fr,jr.prototype=Object.create(Qe.prototype),jr.prototype.constructor=jr,Ur.prototype=Object.create(vt.prototype),Ur.prototype.constructor=Ur,Br.prototype=Object.create(Qe.prototype),Br.prototype.constructor=Br,Vr.prototype=Object.create(vt.prototype),Vr.prototype.constructor=Vr,Hr.prototype=Object.create(Qe.prototype),Hr.prototype.constructor=Hr,Hr.prototype.toJSON=function(){var e=Qe.prototype.toJSON.call(this);return qr(this.parameters.shapes,e)},zr.prototype=Object.create(vt.prototype),zr.prototype.constructor=zr,zr.prototype.toJSON=function(){var e=vt.prototype.toJSON.call(this);return qr(this.parameters.shapes,e)},Gr.prototype=Object.create(vt.prototype),Gr.prototype.constructor=Gr,Wr.prototype=Object.create(Qe.prototype),Wr.prototype.constructor=Wr,Jr.prototype=Object.create(vt.prototype),Jr.prototype.constructor=Jr,Zr.prototype=Object.create(Wr.prototype),Zr.prototype.constructor=Zr,Yr.prototype=Object.create(Jr.prototype),Yr.prototype.constructor=Yr,Xr.prototype=Object.create(Qe.prototype),Xr.prototype.constructor=Xr,Qr.prototype=Object.create(vt.prototype),Qr.prototype.constructor=Qr;var Kr=Object.freeze({WireframeGeometry:Hn,ParametricGeometry:zn,ParametricBufferGeometry:qn,TetrahedronGeometry:Jn,TetrahedronBufferGeometry:Zn,OctahedronGeometry:Yn,OctahedronBufferGeometry:Xn,IcosahedronGeometry:Qn,IcosahedronBufferGeometry:Kn,DodecahedronGeometry:$n,DodecahedronBufferGeometry:er,PolyhedronGeometry:Gn,PolyhedronBufferGeometry:Wn,TubeGeometry:tr,TubeBufferGeometry:nr,TorusKnotGeometry:rr,TorusKnotBufferGeometry:ir,TorusGeometry:or,TorusBufferGeometry:ar,TextGeometry:Nr,TextBufferGeometry:Dr,SphereGeometry:Lr,SphereBufferGeometry:Fr,RingGeometry:jr,RingBufferGeometry:Ur,PlaneGeometry:wt,PlaneBufferGeometry:Et,LatheGeometry:Br,LatheBufferGeometry:Vr,ShapeGeometry:Hr,ShapeBufferGeometry:zr,ExtrudeGeometry:Pr,ExtrudeBufferGeometry:Or,EdgesGeometry:Gr,ConeGeometry:Zr,ConeBufferGeometry:Yr,CylinderGeometry:Wr,CylinderBufferGeometry:Jr,CircleGeometry:Xr,CircleBufferGeometry:Qr,BoxGeometry:bt,BoxBufferGeometry:_t});function $r(e){Ce.call(this),this.type="ShadowMaterial",this.color=new fe(0),this.opacity=1,this.lights=!0,this.transparent=!0,this.setValues(e)}function ei(e){xt.call(this,e),this.type="RawShaderMaterial"}function ti(e){Ce.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new fe(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new fe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new g(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function ni(e){ti.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(e)}function ri(e){Ce.call(this),this.type="MeshPhongMaterial",this.color=new fe(16777215),this.specular=new fe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new fe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new g(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function ii(e){ri.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(e)}function oi(e){Ce.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new g(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function ai(e){Ce.call(this),this.type="MeshLambertMaterial",this.color=new fe(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new fe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function si(e){Pn.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}$r.prototype=Object.create(Ce.prototype),$r.prototype.constructor=$r,$r.prototype.isShadowMaterial=!0,ei.prototype=Object.create(xt.prototype),ei.prototype.constructor=ei,ei.prototype.isRawShaderMaterial=!0,ti.prototype=Object.create(Ce.prototype),ti.prototype.constructor=ti,ti.prototype.isMeshStandardMaterial=!0,ti.prototype.copy=function(e){return Ce.prototype.copy.call(this,e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},ni.prototype=Object.create(ti.prototype),ni.prototype.constructor=ni,ni.prototype.isMeshPhysicalMaterial=!0,ni.prototype.copy=function(e){return ti.prototype.copy.call(this,e),this.defines={PHYSICAL:""},this.reflectivity=e.reflectivity,this.clearCoat=e.clearCoat,this.clearCoatRoughness=e.clearCoatRoughness,this},ri.prototype=Object.create(Ce.prototype),ri.prototype.constructor=ri,ri.prototype.isMeshPhongMaterial=!0,ri.prototype.copy=function(e){return Ce.prototype.copy.call(this,e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},ii.prototype=Object.create(ri.prototype),ii.prototype.constructor=ii,ii.prototype.isMeshToonMaterial=!0,ii.prototype.copy=function(e){return ri.prototype.copy.call(this,e),this.gradientMap=e.gradientMap,this},oi.prototype=Object.create(Ce.prototype),oi.prototype.constructor=oi,oi.prototype.isMeshNormalMaterial=!0,oi.prototype.copy=function(e){return Ce.prototype.copy.call(this,e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},ai.prototype=Object.create(Ce.prototype),ai.prototype.constructor=ai,ai.prototype.isMeshLambertMaterial=!0,ai.prototype.copy=function(e){return Ce.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},si.prototype=Object.create(Pn.prototype),si.prototype.constructor=si,si.prototype.isLineDashedMaterial=!0,si.prototype.copy=function(e){return Pn.prototype.copy.call(this,e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this};var ci=Object.freeze({ShadowMaterial:$r,SpriteMaterial:Tn,RawShaderMaterial:ei,ShaderMaterial:xt,PointsMaterial:Ln,MeshPhysicalMaterial:ni,MeshStandardMaterial:ti,MeshPhongMaterial:ri,MeshToonMaterial:ii,MeshNormalMaterial:oi,MeshLambertMaterial:ai,MeshDepthMaterial:ke,MeshDistanceMaterial:Ie,MeshBasicMaterial:At,LineDashedMaterial:si,LineBasicMaterial:Pn,Material:Ce}),li={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};function ui(e,t,n){var r=this,i=!1,o=0,a=0,s=void 0;this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(e){a++,!1===i&&void 0!==r.onStart&&r.onStart(e,o,a),i=!0},this.itemEnd=function(e){o++,void 0!==r.onProgress&&r.onProgress(e,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(e){void 0!==r.onError&&r.onError(e)},this.resolveURL=function(e){return s?s(e):e},this.setURLModifier=function(e){return s=e,this}}var hi=new ui,di={};function pi(e){this.manager=void 0!==e?e:hi}function fi(e){this.manager=void 0!==e?e:hi,this._parser=null}function mi(e){this.manager=void 0!==e?e:hi}function gi(e){this.manager=void 0!==e?e:hi}function yi(e){this.manager=void 0!==e?e:hi}function vi(){this.type="Curve",this.arcLengthDivisions=200}function bi(e,t,n,r,i,o,a,s){vi.call(this),this.type="EllipseCurve",this.aX=e||0,this.aY=t||0,this.xRadius=n||1,this.yRadius=r||1,this.aStartAngle=i||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=a||!1,this.aRotation=s||0}function _i(e,t,n,r,i,o){bi.call(this,e,t,n,n,r,i,o),this.type="ArcCurve"}function wi(){var e=0,t=0,n=0,r=0;function i(i,o,a,s){e=i,t=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(e,t,n,r,o){i(t,n,o*(n-e),o*(r-t))},initNonuniformCatmullRom:function(e,t,n,r,o,a,s){var c=(t-e)/o-(n-e)/(o+a)+(n-t)/a,l=(n-t)/a-(r-t)/(a+s)+(r-n)/s;i(t,n,c*=a,l*=a)},calc:function(i){var o=i*i;return e+t*i+n*o+r*(o*i)}}}Object.assign(pi.prototype,{load:function(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);var i=this,o=li.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;if(void 0===di[e]){var a=e.match(/^data:(.*?)(;base64)?,(.*)$/);if(a){var s=a[1],c=!!a[2],l=a[3];l=window.decodeURIComponent(l),c&&(l=window.atob(l));try{var u,h=(this.responseType||"").toLowerCase();switch(h){case"arraybuffer":case"blob":for(var d=new Uint8Array(l.length),p=0;p<l.length;p++)d[p]=l.charCodeAt(p);u="blob"===h?new Blob([d.buffer],{type:s}):d.buffer;break;case"document":var f=new DOMParser;u=f.parseFromString(l,s);break;case"json":u=JSON.parse(l);break;default:u=l}window.setTimeout((function(){t&&t(u),i.manager.itemEnd(e)}),0)}catch(t){window.setTimeout((function(){r&&r(t),i.manager.itemEnd(e),i.manager.itemError(e)}),0)}}else{di[e]=[],di[e].push({onLoad:t,onProgress:n,onError:r});var m=new XMLHttpRequest;for(var g in m.open("GET",e,!0),m.addEventListener("load",(function(t){var n=this.response;li.add(e,n);var r=di[e];if(delete di[e],200===this.status){for(var o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(e)}else if(0===this.status){console.warn("THREE.FileLoader: HTTP Status 0 received.");for(o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(e)}else{for(o=0,a=r.length;o<a;o++){var s;(s=r[o]).onError&&s.onError(t)}i.manager.itemEnd(e),i.manager.itemError(e)}}),!1),m.addEventListener("progress",(function(t){for(var n=di[e],r=0,i=n.length;r<i;r++){var o=n[r];o.onProgress&&o.onProgress(t)}}),!1),m.addEventListener("error",(function(t){var n=di[e];delete di[e];for(var r=0,o=n.length;r<o;r++){var a=n[r];a.onError&&a.onError(t)}i.manager.itemEnd(e),i.manager.itemError(e)}),!1),void 0!==this.responseType&&(m.responseType=this.responseType),void 0!==this.withCredentials&&(m.withCredentials=this.withCredentials),m.overrideMimeType&&m.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)m.setRequestHeader(g,this.requestHeader[g]);m.send(null)}return i.manager.itemStart(e),m}di[e].push({onLoad:t,onProgress:n,onError:r})},setPath:function(e){return this.path=e,this},setResponseType:function(e){return this.responseType=e,this},setWithCredentials:function(e){return this.withCredentials=e,this},setMimeType:function(e){return this.mimeType=e,this},setRequestHeader:function(e){return this.requestHeader=e,this}}),Object.assign(function(e){this.manager=void 0!==e?e:hi,this._parser=null}.prototype,{load:function(e,t,n,r){var i=this,o=[],a=new Bn;a.image=o;var s=new pi(this.manager);function c(c){s.load(e[c],(function(e){var n=i._parser(e,!0);o[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},6===(l+=1)&&(1===n.mipmapCount&&(a.minFilter=1006),a.format=n.format,a.needsUpdate=!0,t&&t(a))}),n,r)}if(s.setPath(this.path),s.setResponseType("arraybuffer"),Array.isArray(e))for(var l=0,u=0,h=e.length;u<h;++u)c(u);else s.load(e,(function(e){var n=i._parser(e,!0);if(n.isCubemap)for(var r=n.mipmaps.length/n.mipmapCount,s=0;s<r;s++){o[s]={mipmaps:[]};for(var c=0;c<n.mipmapCount;c++)o[s].mipmaps.push(n.mipmaps[s*n.mipmapCount+c]),o[s].format=n.format,o[s].width=n.width,o[s].height=n.height}else a.image.width=n.width,a.image.height=n.height,a.mipmaps=n.mipmaps;1===n.mipmapCount&&(a.minFilter=1006),a.format=n.format,a.needsUpdate=!0,t&&t(a)}),n,r);return a},setPath:function(e){return this.path=e,this}}),Object.assign(fi.prototype,{load:function(e,t,n,r){var i=this,o=new T,a=new pi(this.manager);return a.setResponseType("arraybuffer"),a.load(e,(function(e){var n=i._parser(e);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:1001,o.wrapT=void 0!==n.wrapT?n.wrapT:1001,o.magFilter=void 0!==n.magFilter?n.magFilter:1006,o.minFilter=void 0!==n.minFilter?n.minFilter:1008,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps),1===n.mipmapCount&&(o.minFilter=1006),o.needsUpdate=!0,t&&t(o,n))}),n,r),o}}),Object.assign(mi.prototype,{crossOrigin:"Anonymous",load:function(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);var i=this,o=li.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;var a=document.createElementNS("http://www.w3.org/1999/xhtml","img");return a.addEventListener("load",(function(){li.add(e,this),t&&t(this),i.manager.itemEnd(e)}),!1),a.addEventListener("error",(function(t){r&&r(t),i.manager.itemEnd(e),i.manager.itemError(e)}),!1),"data:"!==e.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(e),a.src=e,a},setCrossOrigin:function(e){return this.crossOrigin=e,this},setPath:function(e){return this.path=e,this}}),Object.assign(gi.prototype,{crossOrigin:"Anonymous",load:function(e,t,n,r){var i=new M,o=new mi(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);var a=0;function s(n){o.load(e[n],(function(e){i.images[n]=e,6===++a&&(i.needsUpdate=!0,t&&t(i))}),void 0,r)}for(var c=0;c<e.length;++c)s(c);return i},setCrossOrigin:function(e){return this.crossOrigin=e,this},setPath:function(e){return this.path=e,this}}),Object.assign(yi.prototype,{crossOrigin:"Anonymous",load:function(e,t,n,r){var i=new E,o=new mi(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,(function(n){i.image=n;var r=e.search(/\.(jpg|jpeg)$/)>0||0===e.search(/^data\:image\/jpeg/);i.format=r?1022:1023,i.needsUpdate=!0,void 0!==t&&t(i)}),n,r),i},setCrossOrigin:function(e){return this.crossOrigin=e,this},setPath:function(e){return this.path=e,this}}),Object.assign(vi.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(e,t){var n=this.getUtoTmapping(e);return this.getPoint(n,t)},getPoints:function(e){void 0===e&&(e=5);for(var t=[],n=0;n<=e;n++)t.push(this.getPoint(n/e));return t},getSpacedPoints:function(e){void 0===e&&(e=5);for(var t=[],n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t},getLength:function(){var e=this.getLengths();return e[e.length-1]},getLengths:function(e){if(void 0===e&&(e=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var t,n,r=[],i=this.getPoint(0),o=0;for(r.push(0),n=1;n<=e;n++)o+=(t=this.getPoint(n/e)).distanceTo(i),r.push(o),i=t;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(e,t){var n,r=this.getLengths(),i=0,o=r.length;n=t||e*r[o-1];for(var a,s=0,c=o-1;s<=c;)if((a=r[i=Math.floor(s+(c-s)/2)]-n)<0)s=i+1;else{if(!(a>0)){c=i;break}c=i-1}if(r[i=c]===n)return i/(o-1);var l=r[i];return(i+(n-l)/(r[i+1]-l))/(o-1)},getTangent:function(e){var t=e-1e-4,n=e+1e-4;t<0&&(t=0),n>1&&(n=1);var r=this.getPoint(t);return this.getPoint(n).clone().sub(r).normalize()},getTangentAt:function(e){var t=this.getUtoTmapping(e);return this.getTangent(t)},computeFrenetFrames:function(e,t){var n,r,i,o=new b,a=[],s=[],c=[],l=new b,u=new y;for(n=0;n<=e;n++)r=n/e,a[n]=this.getTangentAt(r),a[n].normalize();s[0]=new b,c[0]=new b;var h=Number.MAX_VALUE,d=Math.abs(a[0].x),p=Math.abs(a[0].y),f=Math.abs(a[0].z);for(d<=h&&(h=d,o.set(1,0,0)),p<=h&&(h=p,o.set(0,1,0)),f<=h&&o.set(0,0,1),l.crossVectors(a[0],o).normalize(),s[0].crossVectors(a[0],l),c[0].crossVectors(a[0],s[0]),n=1;n<=e;n++)s[n]=s[n-1].clone(),c[n]=c[n-1].clone(),l.crossVectors(a[n-1],a[n]),l.length()>Number.EPSILON&&(l.normalize(),i=Math.acos(m.clamp(a[n-1].dot(a[n]),-1,1)),s[n].applyMatrix4(u.makeRotationAxis(l,i))),c[n].crossVectors(a[n],s[n]);if(!0===t)for(i=Math.acos(m.clamp(s[0].dot(s[e]),-1,1)),i/=e,a[0].dot(l.crossVectors(s[0],s[e]))>0&&(i=-i),n=1;n<=e;n++)s[n].applyMatrix4(u.makeRotationAxis(a[n],i*n)),c[n].crossVectors(a[n],s[n]);return{tangents:a,normals:s,binormals:c}},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this},toJSON:function(){var e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e},fromJSON:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}),bi.prototype=Object.create(vi.prototype),bi.prototype.constructor=bi,bi.prototype.isEllipseCurve=!0,bi.prototype.getPoint=function(e,t){for(var n=t||new g,r=2*Math.PI,i=this.aEndAngle-this.aStartAngle,o=Math.abs(i)<Number.EPSILON;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);var a=this.aStartAngle+e*i,s=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){var l=Math.cos(this.aRotation),u=Math.sin(this.aRotation),h=s-this.aX,d=c-this.aY;s=h*l-d*u+this.aX,c=h*u+d*l+this.aY}return n.set(s,c)},bi.prototype.copy=function(e){return vi.prototype.copy.call(this,e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this},bi.prototype.toJSON=function(){var e=vi.prototype.toJSON.call(this);return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e},bi.prototype.fromJSON=function(e){return vi.prototype.fromJSON.call(this,e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this},_i.prototype=Object.create(bi.prototype),_i.prototype.constructor=_i,_i.prototype.isArcCurve=!0;var Ei=new b,Ai=new wi,xi=new wi,Si=new wi;function Ti(e,t,n,r){vi.call(this),this.type="CatmullRomCurve3",this.points=e||[],this.closed=t||!1,this.curveType=n||"centripetal",this.tension=r||.5}function Mi(e,t,n,r,i){var o=.5*(r-t),a=.5*(i-n),s=e*e;return(2*n-2*r+o+a)*(e*s)+(-3*n+3*r-2*o-a)*s+o*e+n}function Ri(e,t,n,r){return function(e,t){var n=1-e;return n*n*t}(e,t)+function(e,t){return 2*(1-e)*e*t}(e,n)+function(e,t){return e*e*t}(e,r)}function Ci(e,t,n,r,i){return function(e,t){var n=1-e;return n*n*n*t}(e,t)+function(e,t){var n=1-e;return 3*n*n*e*t}(e,n)+function(e,t){return 3*(1-e)*e*e*t}(e,r)+function(e,t){return e*e*e*t}(e,i)}function ki(e,t,n,r){vi.call(this),this.type="CubicBezierCurve",this.v0=e||new g,this.v1=t||new g,this.v2=n||new g,this.v3=r||new g}function Ii(e,t,n,r){vi.call(this),this.type="CubicBezierCurve3",this.v0=e||new b,this.v1=t||new b,this.v2=n||new b,this.v3=r||new b}function Pi(e,t){vi.call(this),this.type="LineCurve",this.v1=e||new g,this.v2=t||new g}function Oi(e,t){vi.call(this),this.type="LineCurve3",this.v1=e||new b,this.v2=t||new b}function Ni(e,t,n){vi.call(this),this.type="QuadraticBezierCurve",this.v0=e||new g,this.v1=t||new g,this.v2=n||new g}function Di(e,t,n){vi.call(this),this.type="QuadraticBezierCurve3",this.v0=e||new b,this.v1=t||new b,this.v2=n||new b}function Li(e){vi.call(this),this.type="SplineCurve",this.points=e||[]}Ti.prototype=Object.create(vi.prototype),Ti.prototype.constructor=Ti,Ti.prototype.isCatmullRomCurve3=!0,Ti.prototype.getPoint=function(e,t){var n,r,i,o,a=t||new b,s=this.points,c=s.length,l=(c-(this.closed?0:1))*e,u=Math.floor(l),h=l-u;if(this.closed?u+=u>0?0:(Math.floor(Math.abs(u)/s.length)+1)*s.length:0===h&&u===c-1&&(u=c-2,h=1),this.closed||u>0?n=s[(u-1)%c]:(Ei.subVectors(s[0],s[1]).add(s[0]),n=Ei),r=s[u%c],i=s[(u+1)%c],this.closed||u+2<c?o=s[(u+2)%c]:(Ei.subVectors(s[c-1],s[c-2]).add(s[c-1]),o=Ei),"centripetal"===this.curveType||"chordal"===this.curveType){var d="chordal"===this.curveType?.5:.25,p=Math.pow(n.distanceToSquared(r),d),f=Math.pow(r.distanceToSquared(i),d),m=Math.pow(i.distanceToSquared(o),d);f<1e-4&&(f=1),p<1e-4&&(p=f),m<1e-4&&(m=f),Ai.initNonuniformCatmullRom(n.x,r.x,i.x,o.x,p,f,m),xi.initNonuniformCatmullRom(n.y,r.y,i.y,o.y,p,f,m),Si.initNonuniformCatmullRom(n.z,r.z,i.z,o.z,p,f,m)}else"catmullrom"===this.curveType&&(Ai.initCatmullRom(n.x,r.x,i.x,o.x,this.tension),xi.initCatmullRom(n.y,r.y,i.y,o.y,this.tension),Si.initCatmullRom(n.z,r.z,i.z,o.z,this.tension));return a.set(Ai.calc(h),xi.calc(h),Si.calc(h)),a},Ti.prototype.copy=function(e){vi.prototype.copy.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var r=e.points[t];this.points.push(r.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},Ti.prototype.toJSON=function(){var e=vi.prototype.toJSON.call(this);e.points=[];for(var t=0,n=this.points.length;t<n;t++){var r=this.points[t];e.points.push(r.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e},Ti.prototype.fromJSON=function(e){vi.prototype.fromJSON.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var r=e.points[t];this.points.push((new b).fromArray(r))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},ki.prototype=Object.create(vi.prototype),ki.prototype.constructor=ki,ki.prototype.isCubicBezierCurve=!0,ki.prototype.getPoint=function(e,t){var n=t||new g,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ci(e,r.x,i.x,o.x,a.x),Ci(e,r.y,i.y,o.y,a.y)),n},ki.prototype.copy=function(e){return vi.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this},ki.prototype.toJSON=function(){var e=vi.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e},ki.prototype.fromJSON=function(e){return vi.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this},Ii.prototype=Object.create(vi.prototype),Ii.prototype.constructor=Ii,Ii.prototype.isCubicBezierCurve3=!0,Ii.prototype.getPoint=function(e,t){var n=t||new b,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ci(e,r.x,i.x,o.x,a.x),Ci(e,r.y,i.y,o.y,a.y),Ci(e,r.z,i.z,o.z,a.z)),n},Ii.prototype.copy=function(e){return vi.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this},Ii.prototype.toJSON=function(){var e=vi.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e},Ii.prototype.fromJSON=function(e){return vi.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this},Pi.prototype=Object.create(vi.prototype),Pi.prototype.constructor=Pi,Pi.prototype.isLineCurve=!0,Pi.prototype.getPoint=function(e,t){var n=t||new g;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n},Pi.prototype.getPointAt=function(e,t){return this.getPoint(e,t)},Pi.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},Pi.prototype.copy=function(e){return vi.prototype.copy.call(this,e),this.v1.copy(e.v1),this.v2.copy(e.v2),this},Pi.prototype.toJSON=function(){var e=vi.prototype.toJSON.call(this);return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},Pi.prototype.fromJSON=function(e){return vi.prototype.fromJSON.call(this,e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},Oi.prototype=Object.create(vi.prototype),Oi.prototype.constructor=Oi,Oi.prototype.isLineCurve3=!0,Oi.prototype.getPoint=function(e,t){var n=t||new b;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n},Oi.prototype.getPointAt=function(e,t){return this.getPoint(e,t)},Oi.prototype.copy=function(e){return vi.prototype.copy.call(this,e),this.v1.copy(e.v1),this.v2.copy(e.v2),this},Oi.prototype.toJSON=function(){var e=vi.prototype.toJSON.call(this);return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},Oi.prototype.fromJSON=function(e){return vi.prototype.fromJSON.call(this,e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},Ni.prototype=Object.create(vi.prototype),Ni.prototype.constructor=Ni,Ni.prototype.isQuadraticBezierCurve=!0,Ni.prototype.getPoint=function(e,t){var n=t||new g,r=this.v0,i=this.v1,o=this.v2;return n.set(Ri(e,r.x,i.x,o.x),Ri(e,r.y,i.y,o.y)),n},Ni.prototype.copy=function(e){return vi.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this},Ni.prototype.toJSON=function(){var e=vi.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},Ni.prototype.fromJSON=function(e){return vi.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},Di.prototype=Object.create(vi.prototype),Di.prototype.constructor=Di,Di.prototype.isQuadraticBezierCurve3=!0,Di.prototype.getPoint=function(e,t){var n=t||new b,r=this.v0,i=this.v1,o=this.v2;return n.set(Ri(e,r.x,i.x,o.x),Ri(e,r.y,i.y,o.y),Ri(e,r.z,i.z,o.z)),n},Di.prototype.copy=function(e){return vi.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this},Di.prototype.toJSON=function(){var e=vi.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},Di.prototype.fromJSON=function(e){return vi.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},Li.prototype=Object.create(vi.prototype),Li.prototype.constructor=Li,Li.prototype.isSplineCurve=!0,Li.prototype.getPoint=function(e,t){var n=t||new g,r=this.points,i=(r.length-1)*e,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],c=r[o],l=r[o>r.length-2?r.length-1:o+1],u=r[o>r.length-3?r.length-1:o+2];return n.set(Mi(a,s.x,c.x,l.x,u.x),Mi(a,s.y,c.y,l.y,u.y)),n},Li.prototype.copy=function(e){vi.prototype.copy.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var r=e.points[t];this.points.push(r.clone())}return this},Li.prototype.toJSON=function(){var e=vi.prototype.toJSON.call(this);e.points=[];for(var t=0,n=this.points.length;t<n;t++){var r=this.points[t];e.points.push(r.toArray())}return e},Li.prototype.fromJSON=function(e){vi.prototype.fromJSON.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var r=e.points[t];this.points.push((new g).fromArray(r))}return this};var Fi=Object.freeze({ArcCurve:_i,CatmullRomCurve3:Ti,CubicBezierCurve:ki,CubicBezierCurve3:Ii,EllipseCurve:bi,LineCurve:Pi,LineCurve3:Oi,QuadraticBezierCurve:Ni,QuadraticBezierCurve3:Di,SplineCurve:Li});function ji(){vi.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function Ui(e){ji.call(this),this.type="Path",this.currentPoint=new g,e&&this.setFromPoints(e)}function Bi(e){Ui.call(this,e),this.uuid=m.generateUUID(),this.type="Shape",this.holes=[]}function Vi(e,t){Ge.call(this),this.type="Light",this.color=new fe(e),this.intensity=void 0!==t?t:1,this.receiveShadow=void 0}function Hi(e,t,n){Vi.call(this,e,n),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(Ge.DefaultUp),this.updateMatrix(),this.groundColor=new fe(t)}function zi(e){this.camera=e,this.bias=0,this.radius=1,this.mapSize=new g(512,512),this.map=null,this.matrix=new y}function qi(){zi.call(this,new nn(50,1,.5,500))}function Gi(e,t,n,r,i,o){Vi.call(this,e,t),this.type="SpotLight",this.position.copy(Ge.DefaultUp),this.updateMatrix(),this.target=new Ge,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(e){this.intensity=e/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==r?r:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==o?o:1,this.shadow=new qi}function Wi(e,t,n,r){Vi.call(this,e,t),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(e){this.intensity=e/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==r?r:1,this.shadow=new zi(new nn(90,1,.5,500))}function Ji(){zi.call(this,new Je(-5,5,5,-5,.5,500))}function Zi(e,t){Vi.call(this,e,t),this.type="DirectionalLight",this.position.copy(Ge.DefaultUp),this.updateMatrix(),this.target=new Ge,this.shadow=new Ji}function Yi(e,t){Vi.call(this,e,t),this.type="AmbientLight",this.castShadow=void 0}function Xi(e,t,n,r){Vi.call(this,e,t),this.type="RectAreaLight",this.width=void 0!==n?n:10,this.height=void 0!==r?r:10}function Qi(e,t,n,r){co.call(this,e,t,n,r)}function Ki(e,t,n){co.call(this,e,t,n)}function $i(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new t.constructor(n),this.sampleValues=t,this.valueSize=n}function eo(e,t,n,r){$i.call(this,e,t,n,r)}function to(e,t,n,r){co.call(this,e,t,n,r)}function no(e,t,n,r){co.call(this,e,t,n,r)}function ro(e,t,n,r){co.call(this,e,t,n,r)}function io(e,t,n,r){$i.call(this,e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function oo(e,t,n,r){$i.call(this,e,t,n,r)}function ao(e,t,n,r){$i.call(this,e,t,n,r)}ji.prototype=Object.assign(Object.create(vi.prototype),{constructor:ji,add:function(e){this.curves.push(e)},closePath:function(){var e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new Pi(t,e))},getPoint:function(e){for(var t=e*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=t){var i=n[r]-t,o=this.curves[r],a=o.getLength(),s=0===a?0:1-i/a;return o.getPointAt(s)}r++}return null},getLength:function(){var e=this.getCurveLengths();return e[e.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var e=[],t=0,n=0,r=this.curves.length;n<r;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e},getSpacedPoints:function(e){void 0===e&&(e=40);for(var t=[],n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t},getPoints:function(e){e=e||12;for(var t,n=[],r=0,i=this.curves;r<i.length;r++)for(var o=i[r],a=o&&o.isEllipseCurve?2*e:o&&o.isLineCurve?1:o&&o.isSplineCurve?e*o.points.length:e,s=o.getPoints(a),c=0;c<s.length;c++){var l=s[c];t&&t.equals(l)||(n.push(l),t=l)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(e){vi.prototype.copy.call(this,e),this.curves=[];for(var t=0,n=e.curves.length;t<n;t++){var r=e.curves[t];this.curves.push(r.clone())}return this.autoClose=e.autoClose,this},toJSON:function(){var e=vi.prototype.toJSON.call(this);e.autoClose=this.autoClose,e.curves=[];for(var t=0,n=this.curves.length;t<n;t++){var r=this.curves[t];e.curves.push(r.toJSON())}return e},fromJSON:function(e){vi.prototype.fromJSON.call(this,e),this.autoClose=e.autoClose,this.curves=[];for(var t=0,n=e.curves.length;t<n;t++){var r=e.curves[t];this.curves.push((new Fi[r.type]).fromJSON(r))}return this}}),Ui.prototype=Object.assign(Object.create(ji.prototype),{constructor:Ui,setFromPoints:function(e){this.moveTo(e[0].x,e[0].y);for(var t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y)},moveTo:function(e,t){this.currentPoint.set(e,t)},lineTo:function(e,t){var n=new Pi(this.currentPoint.clone(),new g(e,t));this.curves.push(n),this.currentPoint.set(e,t)},quadraticCurveTo:function(e,t,n,r){var i=new Ni(this.currentPoint.clone(),new g(e,t),new g(n,r));this.curves.push(i),this.currentPoint.set(n,r)},bezierCurveTo:function(e,t,n,r,i,o){var a=new ki(this.currentPoint.clone(),new g(e,t),new g(n,r),new g(i,o));this.curves.push(a),this.currentPoint.set(i,o)},splineThru:function(e){var t=new Li([this.currentPoint.clone()].concat(e));this.curves.push(t),this.currentPoint.copy(e[e.length-1])},arc:function(e,t,n,r,i,o){var a=this.currentPoint.x,s=this.currentPoint.y;this.absarc(e+a,t+s,n,r,i,o)},absarc:function(e,t,n,r,i,o){this.absellipse(e,t,n,n,r,i,o)},ellipse:function(e,t,n,r,i,o,a,s){var c=this.currentPoint.x,l=this.currentPoint.y;this.absellipse(e+c,t+l,n,r,i,o,a,s)},absellipse:function(e,t,n,r,i,o,a,s){var c=new bi(e,t,n,r,i,o,a,s);if(this.curves.length>0){var l=c.getPoint(0);l.equals(this.currentPoint)||this.lineTo(l.x,l.y)}this.curves.push(c);var u=c.getPoint(1);this.currentPoint.copy(u)},copy:function(e){return ji.prototype.copy.call(this,e),this.currentPoint.copy(e.currentPoint),this},toJSON:function(){var e=ji.prototype.toJSON.call(this);return e.currentPoint=this.currentPoint.toArray(),e},fromJSON:function(e){return ji.prototype.fromJSON.call(this,e),this.currentPoint.fromArray(e.currentPoint),this}}),Bi.prototype=Object.assign(Object.create(Ui.prototype),{constructor:Bi,getPointsHoles:function(e){for(var t=[],n=0,r=this.holes.length;n<r;n++)t[n]=this.holes[n].getPoints(e);return t},extractPoints:function(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}},copy:function(e){Ui.prototype.copy.call(this,e),this.holes=[];for(var t=0,n=e.holes.length;t<n;t++){var r=e.holes[t];this.holes.push(r.clone())}return this},toJSON:function(){var e=Ui.prototype.toJSON.call(this);e.uuid=this.uuid,e.holes=[];for(var t=0,n=this.holes.length;t<n;t++){var r=this.holes[t];e.holes.push(r.toJSON())}return e},fromJSON:function(e){Ui.prototype.fromJSON.call(this,e),this.uuid=e.uuid,this.holes=[];for(var t=0,n=e.holes.length;t<n;t++){var r=e.holes[t];this.holes.push((new Ui).fromJSON(r))}return this}}),Vi.prototype=Object.assign(Object.create(Ge.prototype),{constructor:Vi,isLight:!0,copy:function(e){return Ge.prototype.copy.call(this,e),this.color.copy(e.color),this.intensity=e.intensity,this},toJSON:function(e){var t=Ge.prototype.toJSON.call(this,e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}),Hi.prototype=Object.assign(Object.create(Vi.prototype),{constructor:Hi,isHemisphereLight:!0,copy:function(e){return Vi.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this}}),Object.assign(zi.prototype,{copy:function(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var e={};return 0!==this.bias&&(e.bias=this.bias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}),qi.prototype=Object.assign(Object.create(zi.prototype),{constructor:qi,isSpotLightShadow:!0,update:function(e){var t=this.camera,n=2*m.RAD2DEG*e.angle,r=this.mapSize.width/this.mapSize.height,i=e.distance||t.far;n===t.fov&&r===t.aspect&&i===t.far||(t.fov=n,t.aspect=r,t.far=i,t.updateProjectionMatrix())}}),Gi.prototype=Object.assign(Object.create(Vi.prototype),{constructor:Gi,isSpotLight:!0,copy:function(e){return Vi.prototype.copy.call(this,e),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}),Wi.prototype=Object.assign(Object.create(Vi.prototype),{constructor:Wi,isPointLight:!0,copy:function(e){return Vi.prototype.copy.call(this,e),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}),Ji.prototype=Object.assign(Object.create(zi.prototype),{constructor:Ji}),Zi.prototype=Object.assign(Object.create(Vi.prototype),{constructor:Zi,isDirectionalLight:!0,copy:function(e){return Vi.prototype.copy.call(this,e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}),Yi.prototype=Object.assign(Object.create(Vi.prototype),{constructor:Yi,isAmbientLight:!0}),Xi.prototype=Object.assign(Object.create(Vi.prototype),{constructor:Xi,isRectAreaLight:!0,copy:function(e){return Vi.prototype.copy.call(this,e),this.width=e.width,this.height=e.height,this},toJSON:function(e){var t=Vi.prototype.toJSON.call(this,e);return t.object.width=this.width,t.object.height=this.height,t}}),Qi.prototype=Object.assign(Object.create(co.prototype),{constructor:Qi,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Ki.prototype=Object.assign(Object.create(co.prototype),{constructor:Ki,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Object.assign($i.prototype,{evaluate:function(e){var t=this.parameterPositions,n=this._cachedIndex,r=t[n],i=t[n-1];e:{t:{var o;n:{r:if(!(e<r)){for(var a=n+2;;){if(void 0===r){if(e<i)break r;return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,e,i)}if(n===a)break;if(i=r,e<(r=t[++n]))break t}o=t.length;break n}if(e>=i)break e;var s=t[1];e<s&&(n=2,i=s);for(a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,e,r);if(n===a)break;if(r=i,e>=(i=t[--n-1]))break t}o=n,n=0}for(;n<o;){var c=n+o>>>1;e<t[c]?o=c:n=c+1}if(r=t[n],void 0===(i=t[n-1]))return this._cachedIndex=0,this.beforeStart_(0,e,r);if(void 0===r)return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,i,e)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,e,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(e){for(var t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r,o=0;o!==r;++o)t[o]=n[i+o];return t},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),//!\ DECLARE ALIAS AFTER assign prototype !Object.assign($i.prototype,{beforeStart_:$i.prototype.copySampleValue_,afterEnd_:$i.prototype.copySampleValue_}),eo.prototype=Object.assign(Object.create($i.prototype),{constructor:eo,interpolate_:function(e,t,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,c=(n-t)/(r-t),l=s+a;s!==l;s+=4)v.slerpFlat(i,0,o,s-a,o,s,c);return i}}),to.prototype=Object.assign(Object.create(co.prototype),{constructor:to,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(e){return new eo(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:void 0}),no.prototype=Object.assign(Object.create(co.prototype),{constructor:no,ValueTypeName:"color"}),ro.prototype=Object.assign(Object.create(co.prototype),{constructor:ro,ValueTypeName:"number"}),io.prototype=Object.assign(Object.create($i.prototype),{constructor:io,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(e,t,n){var r=this.parameterPositions,i=e-2,o=e+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case 2401:i=e,a=2*t-n;break;case 2402:a=t+r[i=r.length-2]-r[i+1];break;default:i=e,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case 2401:o=e,s=2*n-t;break;case 2402:o=1,s=n+r[1]-r[0];break;default:o=e-1,s=t}var c=.5*(n-t),l=this.valueSize;this._weightPrev=c/(t-a),this._weightNext=c/(s-n),this._offsetPrev=i*l,this._offsetNext=o*l},interpolate_:function(e,t,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,c=s-a,l=this._offsetPrev,u=this._offsetNext,h=this._weightPrev,d=this._weightNext,p=(n-t)/(r-t),f=p*p,m=f*p,g=-h*m+2*h*f-h*p,y=(1+h)*m+(-1.5-2*h)*f+(-.5+h)*p+1,v=(-1-d)*m+(1.5+d)*f+.5*p,b=d*m-d*f,_=0;_!==a;++_)i[_]=g*o[l+_]+y*o[c+_]+v*o[s+_]+b*o[u+_];return i}}),oo.prototype=Object.assign(Object.create($i.prototype),{constructor:oo,interpolate_:function(e,t,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,c=s-a,l=(n-t)/(r-t),u=1-l,h=0;h!==a;++h)i[h]=o[c+h]*u+o[s+h]*l;return i}}),ao.prototype=Object.assign(Object.create($i.prototype),{constructor:ao,interpolate_:function(e){return this.copySampleValue_(e-1)}});var so={arraySlice:function(e,t,n){return so.isTypedArray(e)?new e.constructor(e.subarray(t,void 0!==n?n:e.length)):e.slice(t,n)},convertArray:function(e,t,n){return!e||!n&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)},isTypedArray:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},getKeyframeOrder:function(e){for(var t=e.length,n=new Array(t),r=0;r!==t;++r)n[r]=r;return n.sort((function(t,n){return e[t]-e[n]})),n},sortedArray:function(e,t,n){for(var r=e.length,i=new e.constructor(r),o=0,a=0;a!==r;++o)for(var s=n[o]*t,c=0;c!==t;++c)i[a++]=e[s+c];return i},flattenJSON:function(e,t,n,r){for(var i=1,o=e[0];void 0!==o&&void 0===o[r];)o=e[i++];if(void 0!==o){var a=o[r];if(void 0!==a)if(Array.isArray(a))do{void 0!==(a=o[r])&&(t.push(o.time),n.push.apply(n,a)),o=e[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{void 0!==(a=o[r])&&(t.push(o.time),a.toArray(n,n.length)),o=e[i++]}while(void 0!==o);else do{void 0!==(a=o[r])&&(t.push(o.time),n.push(a)),o=e[i++]}while(void 0!==o)}}};function co(e,t,n,r){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=so.convertArray(t,this.TimeBufferType),this.values=so.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation),this.validate(),this.optimize()}function lo(e,t,n,r){co.call(this,e,t,n,r)}function uo(e,t,n){this.name=e,this.tracks=n,this.duration=void 0!==t?t:-1,this.uuid=m.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function ho(e){this.manager=void 0!==e?e:hi,this.textures={}}function po(e){this.manager=void 0!==e?e:hi}Object.assign(co,{parse:function(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var t=co._getTrackTypeForValueTypeName(e.type);if(void 0===e.times){var n=[],r=[];so.flattenJSON(e.keys,n,r,"value"),e.times=n,e.values=r}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)},toJSON:function(e){var t,n=e.constructor;if(void 0!==n.toJSON)t=n.toJSON(e);else{t={name:e.name,times:so.convertArray(e.times,Array),values:so.convertArray(e.values,Array)};var r=e.getInterpolation();r!==e.DefaultInterpolation&&(t.interpolation=r)}return t.type=e.ValueTypeName,t},_getTrackTypeForValueTypeName:function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return ro;case"vector":case"vector2":case"vector3":case"vector4":return lo;case"color":return no;case"quaternion":return to;case"bool":case"boolean":return Ki;case"string":return Qi}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}}),Object.assign(co.prototype,{constructor:co,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(e){return new ao(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodLinear:function(e){return new oo(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:function(e){return new io(this.times,this.values,this.getValueSize(),e)},setInterpolation:function(e){var t;switch(e){case 2300:t=this.InterpolantFactoryMethodDiscrete;break;case 2301:t=this.InterpolantFactoryMethodLinear;break;case 2302:t=this.InterpolantFactoryMethodSmooth}if(void 0!==t)this.createInterpolant=t;else{var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}console.warn("THREE.KeyframeTrack:",n)}},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(e){if(0!==e)for(var t=this.times,n=0,r=t.length;n!==r;++n)t[n]+=e;return this},scale:function(e){if(1!==e)for(var t=this.times,n=0,r=t.length;n!==r;++n)t[n]*=e;return this},trim:function(e,t){for(var n=this.times,r=n.length,i=0,o=r-1;i!==r&&n[i]<e;)++i;for(;-1!==o&&n[o]>t;)--o;if(++o,0!==i||o!==r){i>=o&&(i=(o=Math.max(o,1))-1);var a=this.getValueSize();this.times=so.arraySlice(n,i,o),this.values=so.arraySlice(this.values,i*a,o*a)}return this},validate:function(){var e=!0,t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);for(var o=null,a=0;a!==i;a++){var s=n[a];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,s),e=!1;break}if(null!==o&&o>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,s,o),e=!1;break}o=s}if(void 0!==r&&so.isTypedArray(r)){a=0;for(var c=r.length;a!==c;++a){var l=r[a];if(isNaN(l)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,l),e=!1;break}}}return e},optimize:function(){for(var e=this.times,t=this.values,n=this.getValueSize(),r=2302===this.getInterpolation(),i=1,o=e.length-1,a=1;a<o;++a){var s=!1,c=e[a];if(c!==e[a+1]&&(1!==a||c!==c[0]))if(r)s=!0;else for(var l=a*n,u=l-n,h=l+n,d=0;d!==n;++d){var p=t[l+d];if(p!==t[u+d]||p!==t[h+d]){s=!0;break}}if(s){if(a!==i){e[i]=e[a];var f=a*n,m=i*n;for(d=0;d!==n;++d)t[m+d]=t[f+d]}++i}}if(o>0){e[i]=e[o];for(f=o*n,m=i*n,d=0;d!==n;++d)t[m+d]=t[f+d];++i}return i!==e.length&&(this.times=so.arraySlice(e,0,i),this.values=so.arraySlice(t,0,i*n)),this}}),lo.prototype=Object.assign(Object.create(co.prototype),{constructor:lo,ValueTypeName:"vector"}),Object.assign(uo,{parse:function(e){for(var t=[],n=e.tracks,r=1/(e.fps||1),i=0,o=n.length;i!==o;++i)t.push(co.parse(n[i]).scale(r));return new uo(e.name,e.duration,t)},toJSON:function(e){for(var t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t},i=0,o=n.length;i!==o;++i)t.push(co.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(e,t,n,r){for(var i=t.length,o=[],a=0;a<i;a++){var s=[],c=[];s.push((a+i-1)%i,a,(a+1)%i),c.push(0,1,0);var l=so.getKeyframeOrder(s);s=so.sortedArray(s,1,l),c=so.sortedArray(c,1,l),r||0!==s[0]||(s.push(i),c.push(c[0])),o.push(new ro(".morphTargetInfluences["+t[a].name+"]",s,c).scale(1/n))}return new uo(e,-1,o)},findByName:function(e,t){var n=e;if(!Array.isArray(e)){var r=e;n=r.geometry&&r.geometry.animations||r.animations}for(var i=0;i<n.length;i++)if(n[i].name===t)return n[i];return null},CreateClipsFromMorphTargetSequences:function(e,t,n){for(var r={},i=/^([\w-]*?)([\d]+)$/,o=0,a=e.length;o<a;o++){var s=e[o],c=s.name.match(i);if(c&&c.length>1){var l=r[h=c[1]];l||(r[h]=l=[]),l.push(s)}}var u=[];for(var h in r)u.push(uo.CreateFromMorphTargetSequence(h,r[h],t,n));return u},parseAnimation:function(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(e,t,n,r,i){if(0!==n.length){var o=[],a=[];so.flattenJSON(n,o,a,r),0!==o.length&&i.push(new e(t,o,a))}},r=[],i=e.name||"default",o=e.length||-1,a=e.fps||30,s=e.hierarchy||[],c=0;c<s.length;c++){var l=s[c].keys;if(l&&0!==l.length)if(l[0].morphTargets){for(var u={},h=0;h<l.length;h++)if(l[h].morphTargets)for(var d=0;d<l[h].morphTargets.length;d++)u[l[h].morphTargets[d]]=-1;for(var p in u){var f=[],m=[];for(d=0;d!==l[h].morphTargets.length;++d){var g=l[h];f.push(g.time),m.push(g.morphTarget===p?1:0)}r.push(new ro(".morphTargetInfluence["+p+"]",f,m))}o=u.length*(a||1)}else{var y=".bones["+t[c].name+"]";n(lo,y+".position",l,"pos",r),n(to,y+".quaternion",l,"rot",r),n(lo,y+".scale",l,"scl",r)}}return 0===r.length?null:new uo(i,o,r)}}),Object.assign(uo.prototype,{resetDuration:function(){for(var e=0,t=0,n=this.tracks.length;t!==n;++t){var r=this.tracks[t];e=Math.max(e,r.times[r.times.length-1])}this.duration=e},trim:function(){for(var e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this},optimize:function(){for(var e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}}),Object.assign(ho.prototype,{load:function(e,t,n,r){var i=this;new pi(i.manager).load(e,(function(e){t(i.parse(JSON.parse(e)))}),n,r)},setTextures:function(e){this.textures=e},parse:function(e){var t=this.textures;function n(e){return void 0===t[e]&&console.warn("THREE.MaterialLoader: Undefined texture",e),t[e]}var r=new ci[e.type];if(void 0!==e.uuid&&(r.uuid=e.uuid),void 0!==e.name&&(r.name=e.name),void 0!==e.color&&r.color.setHex(e.color),void 0!==e.roughness&&(r.roughness=e.roughness),void 0!==e.metalness&&(r.metalness=e.metalness),void 0!==e.emissive&&r.emissive.setHex(e.emissive),void 0!==e.specular&&r.specular.setHex(e.specular),void 0!==e.shininess&&(r.shininess=e.shininess),void 0!==e.clearCoat&&(r.clearCoat=e.clearCoat),void 0!==e.clearCoatRoughness&&(r.clearCoatRoughness=e.clearCoatRoughness),void 0!==e.uniforms&&(r.uniforms=e.uniforms),void 0!==e.vertexShader&&(r.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(r.fragmentShader=e.fragmentShader),void 0!==e.vertexColors&&(r.vertexColors=e.vertexColors),void 0!==e.fog&&(r.fog=e.fog),void 0!==e.flatShading&&(r.flatShading=e.flatShading),void 0!==e.blending&&(r.blending=e.blending),void 0!==e.side&&(r.side=e.side),void 0!==e.opacity&&(r.opacity=e.opacity),void 0!==e.transparent&&(r.transparent=e.transparent),void 0!==e.alphaTest&&(r.alphaTest=e.alphaTest),void 0!==e.depthTest&&(r.depthTest=e.depthTest),void 0!==e.depthWrite&&(r.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(r.colorWrite=e.colorWrite),void 0!==e.wireframe&&(r.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(r.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(r.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(r.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(r.rotation=e.rotation),1!==e.linewidth&&(r.linewidth=e.linewidth),void 0!==e.dashSize&&(r.dashSize=e.dashSize),void 0!==e.gapSize&&(r.gapSize=e.gapSize),void 0!==e.scale&&(r.scale=e.scale),void 0!==e.skinning&&(r.skinning=e.skinning),void 0!==e.morphTargets&&(r.morphTargets=e.morphTargets),void 0!==e.dithering&&(r.dithering=e.dithering),void 0!==e.visible&&(r.visible=e.visible),void 0!==e.userData&&(r.userData=e.userData),void 0!==e.shading&&(r.flatShading=1===e.shading),void 0!==e.size&&(r.size=e.size),void 0!==e.sizeAttenuation&&(r.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(r.map=n(e.map)),void 0!==e.alphaMap&&(r.alphaMap=n(e.alphaMap),r.transparent=!0),void 0!==e.bumpMap&&(r.bumpMap=n(e.bumpMap)),void 0!==e.bumpScale&&(r.bumpScale=e.bumpScale),void 0!==e.normalMap&&(r.normalMap=n(e.normalMap)),void 0!==e.normalScale){var i=e.normalScale;!1===Array.isArray(i)&&(i=[i,i]),r.normalScale=(new g).fromArray(i)}return void 0!==e.displacementMap&&(r.displacementMap=n(e.displacementMap)),void 0!==e.displacementScale&&(r.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(r.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(r.roughnessMap=n(e.roughnessMap)),void 0!==e.metalnessMap&&(r.metalnessMap=n(e.metalnessMap)),void 0!==e.emissiveMap&&(r.emissiveMap=n(e.emissiveMap)),void 0!==e.emissiveIntensity&&(r.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(r.specularMap=n(e.specularMap)),void 0!==e.envMap&&(r.envMap=n(e.envMap)),void 0!==e.reflectivity&&(r.reflectivity=e.reflectivity),void 0!==e.lightMap&&(r.lightMap=n(e.lightMap)),void 0!==e.lightMapIntensity&&(r.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(r.aoMap=n(e.aoMap)),void 0!==e.aoMapIntensity&&(r.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(r.gradientMap=n(e.gradientMap)),r}}),Object.assign(po.prototype,{load:function(e,t,n,r){var i=this;new pi(i.manager).load(e,(function(e){t(i.parse(JSON.parse(e)))}),n,r)},parse:function(e){var t=new vt,n=e.data.index;if(void 0!==n){var r=new vo[n.type](n.array);t.setIndex(new Ke(r,1))}var i=e.data.attributes;for(var o in i){var a=i[o];r=new vo[a.type](a.array);t.addAttribute(o,new Ke(r,a.itemSize,a.normalized))}var s=e.data.groups||e.data.drawcalls||e.data.offsets;if(void 0!==s)for(var c=0,l=s.length;c!==l;++c){var u=s[c];t.addGroup(u.start,u.count,u.materialIndex)}var h=e.data.boundingSphere;if(void 0!==h){var d=new b;void 0!==h.center&&d.fromArray(h.center),t.boundingSphere=new Oe(d,h.radius)}return t}});var fo,mo,go,yo,vo={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function bo(){this.onLoadStart=function(){},this.onLoadProgress=function(){},this.onLoadComplete=function(){}}bo.Handlers={handlers:[],add:function(e,t){this.handlers.push(e,t)},get:function(e){for(var t=this.handlers,n=0,r=t.length;n<r;n+=2){var i=t[n],o=t[n+1];if(i.test(e))return o}return null}},Object.assign(bo.prototype,{crossOrigin:void 0,initMaterials:function(e,t,n){for(var r=[],i=0;i<e.length;++i)r[i]=this.createMaterial(e[i],t,n);return r},createMaterial:(fo={NoBlending:0,NormalBlending:1,AdditiveBlending:2,SubtractiveBlending:3,MultiplyBlending:4,CustomBlending:5},mo=new fe,go=new yi,yo=new ho,function(e,t,n){var r={};function i(e,i,o,a,s){var c,l=t+e,u=bo.Handlers.get(l);null!==u?c=u.load(l):(go.setCrossOrigin(n),c=go.load(l)),void 0!==i&&(c.repeat.fromArray(i),1!==i[0]&&(c.wrapS=1e3),1!==i[1]&&(c.wrapT=1e3)),void 0!==o&&c.offset.fromArray(o),void 0!==a&&("repeat"===a[0]&&(c.wrapS=1e3),"mirror"===a[0]&&(c.wrapS=1002),"repeat"===a[1]&&(c.wrapT=1e3),"mirror"===a[1]&&(c.wrapT=1002)),void 0!==s&&(c.anisotropy=s);var h=m.generateUUID();return r[h]=c,h}var o={uuid:m.generateUUID(),type:"MeshLambertMaterial"};for(var a in e){var s=e[a];switch(a){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":o.name=s;break;case"blending":o.blending=fo[s];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",a,"is no longer supported.");break;case"colorDiffuse":o.color=mo.fromArray(s).getHex();break;case"colorSpecular":o.specular=mo.fromArray(s).getHex();break;case"colorEmissive":o.emissive=mo.fromArray(s).getHex();break;case"specularCoef":o.shininess=s;break;case"shading":"basic"===s.toLowerCase()&&(o.type="MeshBasicMaterial"),"phong"===s.toLowerCase()&&(o.type="MeshPhongMaterial"),"standard"===s.toLowerCase()&&(o.type="MeshStandardMaterial");break;case"mapDiffuse":o.map=i(s,e.mapDiffuseRepeat,e.mapDiffuseOffset,e.mapDiffuseWrap,e.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":o.emissiveMap=i(s,e.mapEmissiveRepeat,e.mapEmissiveOffset,e.mapEmissiveWrap,e.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":o.lightMap=i(s,e.mapLightRepeat,e.mapLightOffset,e.mapLightWrap,e.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":o.aoMap=i(s,e.mapAORepeat,e.mapAOOffset,e.mapAOWrap,e.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":o.bumpMap=i(s,e.mapBumpRepeat,e.mapBumpOffset,e.mapBumpWrap,e.mapBumpAnisotropy);break;case"mapBumpScale":o.bumpScale=s;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":o.normalMap=i(s,e.mapNormalRepeat,e.mapNormalOffset,e.mapNormalWrap,e.mapNormalAnisotropy);break;case"mapNormalFactor":o.normalScale=[s,s];break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":o.specularMap=i(s,e.mapSpecularRepeat,e.mapSpecularOffset,e.mapSpecularWrap,e.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":o.metalnessMap=i(s,e.mapMetalnessRepeat,e.mapMetalnessOffset,e.mapMetalnessWrap,e.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":o.roughnessMap=i(s,e.mapRoughnessRepeat,e.mapRoughnessOffset,e.mapRoughnessWrap,e.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":o.alphaMap=i(s,e.mapAlphaRepeat,e.mapAlphaOffset,e.mapAlphaWrap,e.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":o.side=1;break;case"doubleSided":o.side=2;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),o.opacity=s;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":o[a]=s;break;case"vertexColors":!0===s&&(o.vertexColors=2),"face"===s&&(o.vertexColors=1);break;default:console.error("THREE.Loader.createMaterial: Unsupported",a,s)}}return"MeshBasicMaterial"===o.type&&delete o.emissive,"MeshPhongMaterial"!==o.type&&delete o.specular,o.opacity<1&&(o.transparent=!0),yo.setTextures(r),yo.parse(o)})});var _o=function(e){var t=e.split("/");return 1===t.length?"./":(t.pop(),t.join("/")+"/")};function wo(e){"boolean"==typeof e&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),e=void 0),this.manager=void 0!==e?e:hi,this.withCredentials=!1}Object.assign(wo.prototype,{load:function(e,t,n,r){var i=this,o=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:_o(e),a=new pi(this.manager);a.setWithCredentials(this.withCredentials),a.load(e,(function(n){var r=JSON.parse(n),a=r.metadata;if(void 0!==a){var s=a.type;if(void 0!==s){if("object"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+e+" should be loaded with THREE.ObjectLoader instead.");if("scene"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+e+" should be loaded with THREE.SceneLoader instead.")}}var c=i.parse(r,o);t(c.geometry,c.materials)}),n,r)},setTexturePath:function(e){this.texturePath=e},parse:function(e,t){void 0!==e.data&&(e=e.data),void 0!==e.scale?e.scale=1/e.scale:e.scale=1;var n=new Qe;return function(e,t){function n(e,t){return e&1<<t}var r,i,o,a,s,c,l,u,h,d,p,f,m,y,v,_,w,E,A,x,S,T,M,R,C,k=e.faces,I=e.vertices,P=e.normals,O=e.colors,N=e.scale,D=0;if(void 0!==e.uvs){for(r=0;r<e.uvs.length;r++)e.uvs[r].length&&D++;for(r=0;r<D;r++)t.faceVertexUvs[r]=[]}for(a=0,s=I.length;a<s;)(E=new b).x=I[a++]*N,E.y=I[a++]*N,E.z=I[a++]*N,t.vertices.push(E);for(a=0,s=k.length;a<s;)if(p=n(d=k[a++],0),f=n(d,1),m=n(d,3),y=n(d,4),v=n(d,5),_=n(d,6),w=n(d,7),p){if((x=new Ze).a=k[a],x.b=k[a+1],x.c=k[a+3],(S=new Ze).a=k[a+1],S.b=k[a+2],S.c=k[a+3],a+=4,f&&(h=k[a++],x.materialIndex=h,S.materialIndex=h),o=t.faces.length,m)for(r=0;r<D;r++)for(R=e.uvs[r],t.faceVertexUvs[r][o]=[],t.faceVertexUvs[r][o+1]=[],i=0;i<4;i++)C=new g(R[2*(u=k[a++])],R[2*u+1]),2!==i&&t.faceVertexUvs[r][o].push(C),0!==i&&t.faceVertexUvs[r][o+1].push(C);if(y&&(l=3*k[a++],x.normal.set(P[l++],P[l++],P[l]),S.normal.copy(x.normal)),v)for(r=0;r<4;r++)l=3*k[a++],M=new b(P[l++],P[l++],P[l]),2!==r&&x.vertexNormals.push(M),0!==r&&S.vertexNormals.push(M);if(_&&(T=O[c=k[a++]],x.color.setHex(T),S.color.setHex(T)),w)for(r=0;r<4;r++)T=O[c=k[a++]],2!==r&&x.vertexColors.push(new fe(T)),0!==r&&S.vertexColors.push(new fe(T));t.faces.push(x),t.faces.push(S)}else{if((A=new Ze).a=k[a++],A.b=k[a++],A.c=k[a++],f&&(h=k[a++],A.materialIndex=h),o=t.faces.length,m)for(r=0;r<D;r++)for(R=e.uvs[r],t.faceVertexUvs[r][o]=[],i=0;i<3;i++)C=new g(R[2*(u=k[a++])],R[2*u+1]),t.faceVertexUvs[r][o].push(C);if(y&&(l=3*k[a++],A.normal.set(P[l++],P[l++],P[l])),v)for(r=0;r<3;r++)l=3*k[a++],M=new b(P[l++],P[l++],P[l]),A.vertexNormals.push(M);if(_&&(c=k[a++],A.color.setHex(O[c])),w)for(r=0;r<3;r++)c=k[a++],A.vertexColors.push(new fe(O[c]));t.faces.push(A)}}(e,n),function(e,t){var n=void 0!==e.influencesPerVertex?e.influencesPerVertex:2;if(e.skinWeights)for(var r=0,i=e.skinWeights.length;r<i;r+=n){var o=e.skinWeights[r],a=n>1?e.skinWeights[r+1]:0,s=n>2?e.skinWeights[r+2]:0,c=n>3?e.skinWeights[r+3]:0;t.skinWeights.push(new A(o,a,s,c))}if(e.skinIndices)for(r=0,i=e.skinIndices.length;r<i;r+=n){var l=e.skinIndices[r],u=n>1?e.skinIndices[r+1]:0,h=n>2?e.skinIndices[r+2]:0,d=n>3?e.skinIndices[r+3]:0;t.skinIndices.push(new A(l,u,h,d))}t.bones=e.bones,t.bones&&t.bones.length>0&&(t.skinWeights.length!==t.skinIndices.length||t.skinIndices.length!==t.vertices.length)&&console.warn("When skinning, number of vertices ("+t.vertices.length+"), skinIndices ("+t.skinIndices.length+"), and skinWeights ("+t.skinWeights.length+") should match.")}(e,n),function(e,t){var n=e.scale;if(void 0!==e.morphTargets)for(var r=0,i=e.morphTargets.length;r<i;r++){t.morphTargets[r]={},t.morphTargets[r].name=e.morphTargets[r].name,t.morphTargets[r].vertices=[];for(var o=t.morphTargets[r].vertices,a=e.morphTargets[r].vertices,s=0,c=a.length;s<c;s+=3){var l=new b;l.x=a[s]*n,l.y=a[s+1]*n,l.z=a[s+2]*n,o.push(l)}}if(void 0!==e.morphColors&&e.morphColors.length>0){console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.');var u=t.faces,h=e.morphColors[0].colors;for(r=0,i=u.length;r<i;r++)u[r].color.fromArray(h,3*r)}}(e,n),function(e,t){var n=[],r=[];void 0!==e.animation&&r.push(e.animation),void 0!==e.animations&&(e.animations.length?r=r.concat(e.animations):r.push(e.animations));for(var i=0;i<r.length;i++){var o=uo.parseAnimation(r[i],t.bones);o&&n.push(o)}if(t.morphTargets){var a=uo.CreateClipsFromMorphTargetSequences(t.morphTargets,10);n=n.concat(a)}n.length>0&&(t.animations=n)}(e,n),n.computeFaceNormals(),n.computeBoundingSphere(),void 0===e.materials||0===e.materials.length?{geometry:n}:{geometry:n,materials:bo.prototype.initMaterials(e.materials,t,this.crossOrigin)}}}),Object.assign(function(e){this.manager=void 0!==e?e:hi,this.texturePath=""}.prototype,{load:function(e,t,n,r){""===this.texturePath&&(this.texturePath=e.substring(0,e.lastIndexOf("/")+1));var i=this;new pi(i.manager).load(e,(function(n){var o=null;try{o=JSON.parse(n)}catch(t){return void 0!==r&&r(t),void console.error("THREE:ObjectLoader: Can't parse "+e+".",t.message)}var a=o.metadata;void 0!==a&&void 0!==a.type&&"geometry"!==a.type.toLowerCase()?i.parse(o,t):console.error("THREE.ObjectLoader: Can't load "+e+". Use THREE.JSONLoader instead.")}),n,r)},setTexturePath:function(e){this.texturePath=e},setCrossOrigin:function(e){this.crossOrigin=e},parse:function(e,t){var n=this.parseShape(e.shapes),r=this.parseGeometries(e.geometries,n),i=this.parseImages(e.images,(function(){void 0!==t&&t(s)})),o=this.parseTextures(e.textures,i),a=this.parseMaterials(e.materials,o),s=this.parseObject(e.object,r,a);return e.animations&&(s.animations=this.parseAnimations(e.animations)),void 0!==e.images&&0!==e.images.length||void 0!==t&&t(s),s},parseShape:function(e){var t={};if(void 0!==e)for(var n=0,r=e.length;n<r;n++){var i=(new Bi).fromJSON(e[n]);t[i.uuid]=i}return t},parseGeometries:function(e,t){var n={};if(void 0!==e)for(var r=new wo,i=new po,o=0,a=e.length;o<a;o++){var s,c=e[o];switch(c.type){case"PlaneGeometry":case"PlaneBufferGeometry":s=new Kr[c.type](c.width,c.height,c.widthSegments,c.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":s=new Kr[c.type](c.width,c.height,c.depth,c.widthSegments,c.heightSegments,c.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":s=new Kr[c.type](c.radius,c.segments,c.thetaStart,c.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":s=new Kr[c.type](c.radiusTop,c.radiusBottom,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":s=new Kr[c.type](c.radius,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":s=new Kr[c.type](c.radius,c.widthSegments,c.heightSegments,c.phiStart,c.phiLength,c.thetaStart,c.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":s=new Kr[c.type](c.radius,c.detail);break;case"RingGeometry":case"RingBufferGeometry":s=new Kr[c.type](c.innerRadius,c.outerRadius,c.thetaSegments,c.phiSegments,c.thetaStart,c.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":s=new Kr[c.type](c.radius,c.tube,c.radialSegments,c.tubularSegments,c.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":s=new Kr[c.type](c.radius,c.tube,c.tubularSegments,c.radialSegments,c.p,c.q);break;case"LatheGeometry":case"LatheBufferGeometry":s=new Kr[c.type](c.points,c.segments,c.phiStart,c.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":s=new Kr[c.type](c.vertices,c.indices,c.radius,c.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":var l=[];for(o=0,a=c.shapes.length;o<a;o++){var u=t[c.shapes[o]];l.push(u)}s=new Kr[c.type](l,c.curveSegments);break;case"BufferGeometry":s=i.parse(c);break;case"Geometry":s=r.parse(c,this.texturePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+c.type+'"');continue}s.uuid=c.uuid,void 0!==c.name&&(s.name=c.name),n[c.uuid]=s}return n},parseMaterials:function(e,t){var n={};if(void 0!==e){var r=new ho;r.setTextures(t);for(var i=0,o=e.length;i<o;i++){var a=e[i];if("MultiMaterial"===a.type){for(var s=[],c=0;c<a.materials.length;c++)s.push(r.parse(a.materials[c]));n[a.uuid]=s}else n[a.uuid]=r.parse(a)}}return n},parseAnimations:function(e){for(var t=[],n=0;n<e.length;n++){var r=uo.parse(e[n]);t.push(r)}return t},parseImages:function(e,t){var n=this,r={};function i(e){return n.manager.itemStart(e),o.load(e,(function(){n.manager.itemEnd(e)}),void 0,(function(){n.manager.itemEnd(e),n.manager.itemError(e)}))}if(void 0!==e&&e.length>0){var o=new mi(new ui(t));o.setCrossOrigin(this.crossOrigin);for(var a=0,s=e.length;a<s;a++){var c=e[a],l=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(c.url)?c.url:n.texturePath+c.url;r[c.uuid]=i(l)}}return r},parseTextures:function(e,t){function n(e,t){return"number"==typeof e?e:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",e),t[e])}var r={};if(void 0!==e)for(var i=0,o=e.length;i<o;i++){var a=e[i];void 0===a.image&&console.warn('THREE.ObjectLoader: No "image" specified for',a.uuid),void 0===t[a.image]&&console.warn("THREE.ObjectLoader: Undefined image",a.image);var s=new E(t[a.image]);s.needsUpdate=!0,s.uuid=a.uuid,void 0!==a.name&&(s.name=a.name),void 0!==a.mapping&&(s.mapping=n(a.mapping,Ao)),void 0!==a.offset&&s.offset.fromArray(a.offset),void 0!==a.repeat&&s.repeat.fromArray(a.repeat),void 0!==a.center&&s.center.fromArray(a.center),void 0!==a.rotation&&(s.rotation=a.rotation),void 0!==a.wrap&&(s.wrapS=n(a.wrap[0],xo),s.wrapT=n(a.wrap[1],xo)),void 0!==a.minFilter&&(s.minFilter=n(a.minFilter,So)),void 0!==a.magFilter&&(s.magFilter=n(a.magFilter,So)),void 0!==a.anisotropy&&(s.anisotropy=a.anisotropy),void 0!==a.flipY&&(s.flipY=a.flipY),r[a.uuid]=s}return r},parseObject:function(e,t,n){var r;function i(e){return void 0===t[e]&&console.warn("THREE.ObjectLoader: Undefined geometry",e),t[e]}function o(e){if(void 0!==e){if(Array.isArray(e)){for(var t=[],r=0,i=e.length;r<i;r++){var o=e[r];void 0===n[o]&&console.warn("THREE.ObjectLoader: Undefined material",o),t.push(n[o])}return t}return void 0===n[e]&&console.warn("THREE.ObjectLoader: Undefined material",e),n[e]}}switch(e.type){case"Scene":r=new Sn,void 0!==e.background&&Number.isInteger(e.background)&&(r.background=new fe(e.background)),void 0!==e.fog&&("Fog"===e.fog.type?r.fog=new xn(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(r.fog=new An(e.fog.color,e.fog.density)));break;case"PerspectiveCamera":r=new nn(e.fov,e.aspect,e.near,e.far),void 0!==e.focus&&(r.focus=e.focus),void 0!==e.zoom&&(r.zoom=e.zoom),void 0!==e.filmGauge&&(r.filmGauge=e.filmGauge),void 0!==e.filmOffset&&(r.filmOffset=e.filmOffset),void 0!==e.view&&(r.view=Object.assign({},e.view));break;case"OrthographicCamera":r=new Je(e.left,e.right,e.top,e.bottom,e.near,e.far);break;case"AmbientLight":r=new Yi(e.color,e.intensity);break;case"DirectionalLight":r=new Zi(e.color,e.intensity);break;case"PointLight":r=new Wi(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":r=new Xi(e.color,e.intensity,e.width,e.height);break;case"SpotLight":r=new Gi(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":r=new Hi(e.color,e.groundColor,e.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":var a=i(e.geometry),s=o(e.material);r=a.bones&&a.bones.length>0?new In(a,s):new Rt(a,s);break;case"LOD":r=new Rn;break;case"Line":r=new On(i(e.geometry),o(e.material),e.mode);break;case"LineLoop":r=new Dn(i(e.geometry),o(e.material));break;case"LineSegments":r=new Nn(i(e.geometry),o(e.material));break;case"PointCloud":case"Points":r=new Fn(i(e.geometry),o(e.material));break;case"Sprite":r=new Mn(o(e.material));break;case"Group":r=new jn;break;default:r=new Ge}if(r.uuid=e.uuid,void 0!==e.name&&(r.name=e.name),void 0!==e.matrix?(r.matrix.fromArray(e.matrix),r.matrix.decompose(r.position,r.quaternion,r.scale)):(void 0!==e.position&&r.position.fromArray(e.position),void 0!==e.rotation&&r.rotation.fromArray(e.rotation),void 0!==e.quaternion&&r.quaternion.fromArray(e.quaternion),void 0!==e.scale&&r.scale.fromArray(e.scale)),void 0!==e.castShadow&&(r.castShadow=e.castShadow),void 0!==e.receiveShadow&&(r.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(r.shadow.bias=e.shadow.bias),void 0!==e.shadow.radius&&(r.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&r.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(r.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(r.visible=e.visible),void 0!==e.userData&&(r.userData=e.userData),void 0!==e.children)for(var c=e.children,l=0;l<c.length;l++)r.add(this.parseObject(c[l],t,n));if("LOD"===e.type)for(var u=e.levels,h=0;h<u.length;h++){var d=u[h],p=r.getObjectByProperty("uuid",d.object);void 0!==p&&r.addLevel(p,d.distance)}return r}});var Eo,Ao={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,SphericalReflectionMapping:305,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307},xo={RepeatWrapping:1e3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},So={NearestFilter:1003,NearestMipMapNearestFilter:1004,NearestMipMapLinearFilter:1005,LinearFilter:1006,LinearMipMapNearestFilter:1007,LinearMipMapLinearFilter:1008};function To(e){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=void 0!==e?e:hi,this.options=void 0}function Mo(){this.type="ShapePath",this.subPaths=[],this.currentPath=null}function Ro(e){this.type="Font",this.data=e}function Co(e,t,n,r,i,o){var a=o.glyphs[e]||o.glyphs["?"];if(a){var s,c,l,u,h,d,p,f,m=new Mo;if(a.o)for(var g=a._cachedOutline||(a._cachedOutline=a.o.split(" ")),y=0,v=g.length;y<v;){switch(g[y++]){case"m":s=g[y++]*n+r,c=g[y++]*n+i,m.moveTo(s,c);break;case"l":s=g[y++]*n+r,c=g[y++]*n+i,m.lineTo(s,c);break;case"q":l=g[y++]*n+r,u=g[y++]*n+i,h=g[y++]*n+r,d=g[y++]*n+i,m.quadraticCurveTo(h,d,l,u);break;case"b":l=g[y++]*n+r,u=g[y++]*n+i,h=g[y++]*n+r,d=g[y++]*n+i,p=g[y++]*n+r,f=g[y++]*n+i,m.bezierCurveTo(h,d,p,f,l,u)}}return{offsetX:a.ha*n,path:m}}}To.prototype={constructor:To,setOptions:function(e){return this.options=e,this},load:function(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e);var i=this,o=li.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;fetch(e).then((function(e){return e.blob()})).then((function(e){return createImageBitmap(e,i.options)})).then((function(n){li.add(e,n),t&&t(n),i.manager.itemEnd(e)})).catch((function(t){r&&r(t),i.manager.itemEnd(e),i.manager.itemError(e)}))},setCrossOrigin:function(){return this},setPath:function(e){return this.path=e,this}},Object.assign(Mo.prototype,{moveTo:function(e,t){this.currentPath=new Ui,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t)},lineTo:function(e,t){this.currentPath.lineTo(e,t)},quadraticCurveTo:function(e,t,n,r){this.currentPath.quadraticCurveTo(e,t,n,r)},bezierCurveTo:function(e,t,n,r,i,o){this.currentPath.bezierCurveTo(e,t,n,r,i,o)},splineThru:function(e){this.currentPath.splineThru(e)},toShapes:function(e,t){function n(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e[n],o=new Bi;o.curves=i.curves,t.push(o)}return t}function r(e,t){for(var n=t.length,r=!1,i=n-1,o=0;o<n;i=o++){var a=t[i],s=t[o],c=s.x-a.x,l=s.y-a.y;if(Math.abs(l)>Number.EPSILON){if(l<0&&(a=t[o],c=-c,s=t[i],l=-l),e.y<a.y||e.y>s.y)continue;if(e.y===a.y){if(e.x===a.x)return!0}else{var u=l*(e.x-a.x)-c*(e.y-a.y);if(0===u)return!0;if(u<0)continue;r=!r}}else{if(e.y!==a.y)continue;if(s.x<=e.x&&e.x<=a.x||a.x<=e.x&&e.x<=s.x)return!0}}return r}var i=Cr.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===t)return n(o);var a,s,c,l=[];if(1===o.length)return s=o[0],(c=new Bi).curves=s.curves,l.push(c),l;var u=!i(o[0].getPoints());u=e?!u:u;var h,d,p=[],f=[],m=[],g=0;f[g]=void 0,m[g]=[];for(var y=0,v=o.length;y<v;y++)a=i(h=(s=o[y]).getPoints()),(a=e?!a:a)?(!u&&f[g]&&g++,f[g]={s:new Bi,p:h},f[g].s.curves=s.curves,u&&g++,m[g]=[]):m[g].push({h:s,p:h[0]});if(!f[0])return n(o);if(f.length>1){for(var b=!1,_=[],w=0,E=f.length;w<E;w++)p[w]=[];for(w=0,E=f.length;w<E;w++)for(var A=m[w],x=0;x<A.length;x++){for(var S=A[x],T=!0,M=0;M<f.length;M++)r(S.p,f[M].p)&&(w!==M&&_.push({froms:w,tos:M,hole:x}),T?(T=!1,p[M].push(S)):b=!0);T&&p[w].push(S)}_.length>0&&(b||(m=p))}y=0;for(var R=f.length;y<R;y++){c=f[y].s,l.push(c);for(var C=0,k=(d=m[y]).length;C<k;C++)c.holes.push(d[C].h)}return l}}),Object.assign(Ro.prototype,{isFont:!0,generateShapes:function(e,t,n){void 0===t&&(t=100),void 0===n&&(n=4);for(var r=[],i=function(e,t,n,r){for(var i=String(e).split(""),o=t/r.resolution,a=(r.boundingBox.yMax-r.boundingBox.yMin+r.underlineThickness)*o,s=[],c=0,l=0,u=0;u<i.length;u++){var h=i[u];if("\n"===h)c=0,l-=a;else{var d=Co(h,n,o,c,l,r);c+=d.offsetX,s.push(d.path)}}return s}(e,t,n,this.data),o=0,a=i.length;o<a;o++)Array.prototype.push.apply(r,i[o].toShapes());return r}}),Object.assign(function(e){this.manager=void 0!==e?e:hi}.prototype,{load:function(e,t,n,r){var i=this,o=new pi(this.manager);o.setPath(this.path),o.load(e,(function(e){var n;try{n=JSON.parse(e)}catch(t){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(e.substring(65,e.length-2))}var r=i.parse(n);t&&t(r)}),n,r)},parse:function(e){return new Ro(e)},setPath:function(e){return this.path=e,this}});var ko,Io,Po,Oo,No,Do,Lo,Fo,jo,Uo,Bo=function(){return void 0===Eo&&(Eo=new(window.AudioContext||window.webkitAudioContext)),Eo};function Vo(e){this.manager=void 0!==e?e:hi}function Ho(e,t,n){Ge.call(this),this.type="CubeCamera";var r=new nn(90,1,e,t);r.up.set(0,-1,0),r.lookAt(new b(1,0,0)),this.add(r);var i=new nn(90,1,e,t);i.up.set(0,-1,0),i.lookAt(new b(-1,0,0)),this.add(i);var o=new nn(90,1,e,t);o.up.set(0,0,1),o.lookAt(new b(0,1,0)),this.add(o);var a=new nn(90,1,e,t);a.up.set(0,0,-1),a.lookAt(new b(0,-1,0)),this.add(a);var s=new nn(90,1,e,t);s.up.set(0,-1,0),s.lookAt(new b(0,0,1)),this.add(s);var c=new nn(90,1,e,t);c.up.set(0,-1,0),c.lookAt(new b(0,0,-1)),this.add(c);var l={format:1022,magFilter:1006,minFilter:1006};this.renderTarget=new S(n,n,l),this.renderTarget.texture.name="CubeCamera",this.update=function(e,t){null===this.parent&&this.updateMatrixWorld();var n=this.renderTarget,l=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,n.activeCubeFace=0,e.render(t,r,n),n.activeCubeFace=1,e.render(t,i,n),n.activeCubeFace=2,e.render(t,o,n),n.activeCubeFace=3,e.render(t,a,n),n.activeCubeFace=4,e.render(t,s,n),n.texture.generateMipmaps=l,n.activeCubeFace=5,e.render(t,c,n),e.setRenderTarget(null)},this.clear=function(e,t,n,r){for(var i=this.renderTarget,o=0;o<6;o++)i.activeCubeFace=o,e.setRenderTarget(i),e.clear(t,n,r);e.setRenderTarget(null)}}function zo(){Ge.call(this),this.type="AudioListener",this.context=Bo(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function qo(e){Ge.call(this),this.type="Audio",this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.startTime=0,this.offset=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function Go(e){qo.call(this,e),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function Wo(e,t){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=void 0!==t?t:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}function Jo(e,t,n){this.binding=e,this.valueSize=n;var r,i=Float64Array;switch(t){case"quaternion":r=this._slerp;break;case"string":case"bool":i=Array,r=this._select;break;default:r=this._lerp}this.buffer=new i(4*n),this._mixBufferRegion=r,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}Object.assign(Vo.prototype,{load:function(e,t,n,r){var i=new pi(this.manager);i.setResponseType("arraybuffer"),i.load(e,(function(e){Bo().decodeAudioData(e,(function(e){t(e)}))}),n,r)}}),Object.assign(function(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new nn,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new nn,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}.prototype,{update:(jo=new y,Uo=new y,function(e){if(ko!==this||Io!==e.focus||Po!==e.fov||Oo!==e.aspect*this.aspect||No!==e.near||Do!==e.far||Lo!==e.zoom||Fo!==this.eyeSep){ko=this,Io=e.focus,Po=e.fov,Oo=e.aspect*this.aspect,No=e.near,Do=e.far,Lo=e.zoom;var t,n,r=e.projectionMatrix.clone(),i=(Fo=this.eyeSep/2)*No/Io,o=No*Math.tan(m.DEG2RAD*Po*.5)/Lo;Uo.elements[12]=-Fo,jo.elements[12]=Fo,t=-o*Oo+i,n=o*Oo+i,r.elements[0]=2*No/(n-t),r.elements[8]=(n+t)/(n-t),this.cameraL.projectionMatrix.copy(r),t=-o*Oo-i,n=o*Oo-i,r.elements[0]=2*No/(n-t),r.elements[8]=(n+t)/(n-t),this.cameraR.projectionMatrix.copy(r)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(Uo),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(jo)})}),Ho.prototype=Object.create(Ge.prototype),Ho.prototype.constructor=Ho,zo.prototype=Object.assign(Object.create(Ge.prototype),{constructor:zo,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(e){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(e){this.gain.gain.value=e},updateMatrixWorld:function(){var e=new b,t=new v,n=new b,r=new b;return function(i){Ge.prototype.updateMatrixWorld.call(this,i);var o=this.context.listener,a=this.up;this.matrixWorld.decompose(e,t,n),r.set(0,0,-1).applyQuaternion(t),o.positionX?(o.positionX.setValueAtTime(e.x,this.context.currentTime),o.positionY.setValueAtTime(e.y,this.context.currentTime),o.positionZ.setValueAtTime(e.z,this.context.currentTime),o.forwardX.setValueAtTime(r.x,this.context.currentTime),o.forwardY.setValueAtTime(r.y,this.context.currentTime),o.forwardZ.setValueAtTime(r.z,this.context.currentTime),o.upX.setValueAtTime(a.x,this.context.currentTime),o.upY.setValueAtTime(a.y,this.context.currentTime),o.upZ.setValueAtTime(a.z,this.context.currentTime)):(o.setPosition(e.x,e.y,e.z),o.setOrientation(r.x,r.y,r.z,a.x,a.y,a.z))}}()}),qo.prototype=Object.assign(Object.create(Ge.prototype),{constructor:qo,getOutput:function(){return this.gain},setNodeSource:function(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this},setBuffer:function(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){var e=this.context.createBufferSource();return e.buffer=this.buffer,e.loop=this.loop,e.onended=this.onEnded.bind(this),e.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,e.start(this.startTime,this.offset),this.isPlaying=!0,this.source=e,this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},pause:function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this.source.stop(),this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(!1!==this.hasPlaybackControl)return this.source.stop(),this.offset=0,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},connect:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(e){return e||(e=[]),!0===this.isPlaying?(this.disconnect(),this.filters=e,this.connect()):this.filters=e,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(e){return this.setFilters(e?[e]:[])},setPlaybackRate:function(e){if(!1!==this.hasPlaybackControl)return this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this;console.warn("THREE.Audio: this Audio has no playback control.")},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(e){if(!1!==this.hasPlaybackControl)return this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},getVolume:function(){return this.gain.gain.value},setVolume:function(e){return this.gain.gain.value=e,this}}),Go.prototype=Object.assign(Object.create(qo.prototype),{constructor:Go,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(e){this.panner.refDistance=e},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(e){this.panner.rolloffFactor=e},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(e){this.panner.distanceModel=e},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(e){this.panner.maxDistance=e},updateMatrixWorld:function(){var e=new b;return function(t){Ge.prototype.updateMatrixWorld.call(this,t),e.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(e.x,e.y,e.z)}}()}),Object.assign(Wo.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var e=0,t=this.getFrequencyData(),n=0;n<t.length;n++)e+=t[n];return e/t.length}}),Object.assign(Jo.prototype,{accumulate:function(e,t){var n=this.buffer,r=this.valueSize,i=e*r+r,o=this.cumulativeWeight;if(0===o){for(var a=0;a!==r;++a)n[i+a]=n[a];o=t}else{var s=t/(o+=t);this._mixBufferRegion(n,i,0,s,r)}this.cumulativeWeight=o},apply:function(e){var t=this.valueSize,n=this.buffer,r=e*t+t,i=this.cumulativeWeight,o=this.binding;if(this.cumulativeWeight=0,i<1){var a=3*t;this._mixBufferRegion(n,r,a,1-i,t)}for(var s=t,c=t+t;s!==c;++s)if(n[s]!==n[s+t]){o.setValue(n,r);break}},saveOriginalState:function(){var e=this.binding,t=this.buffer,n=this.valueSize,r=3*n;e.getValue(t,r);for(var i=n,o=r;i!==o;++i)t[i]=t[r+i%n];this.cumulativeWeight=0},restoreOriginalState:function(){var e=3*this.valueSize;this.binding.setValue(this.buffer,e)},_select:function(e,t,n,r,i){if(r>=.5)for(var o=0;o!==i;++o)e[t+o]=e[n+o]},_slerp:function(e,t,n,r){v.slerpFlat(e,t,e,t,e,n,r)},_lerp:function(e,t,n,r,i){for(var o=1-r,a=0;a!==i;++a){var s=t+a;e[s]=e[s]*o+e[n+a]*r}}});var Zo,Yo,Xo,Qo,Ko,$o,ea,ta,na,ra,ia,oa;function aa(e,t,n){var r=n||sa.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}function sa(e,t,n){this.path=t,this.parsedPath=n||sa.parseTrackName(t),this.node=sa.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e}function ca(e,t,n){this._mixer=e,this._clip=t,this._localRoot=n||null;for(var r=t.tracks,i=r.length,o=new Array(i),a={endingStart:2400,endingEnd:2400},s=0;s!==i;++s){var c=r[s].createInterpolant(null);o[s]=c,c.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(i),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function la(e){this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function ua(e){"string"==typeof e&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),e=arguments[1]),this.value=e}function ha(){vt.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function da(e,t,n,r){this.uuid=m.generateUUID(),this.data=e,this.itemSize=t,this.offset=n,this.normalized=!0===r}function pa(e,t){this.uuid=m.generateUUID(),this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.onUploadCallback=function(){},this.version=0}function fa(e,t,n){pa.call(this,e,t),this.meshPerAttribute=n||1}function ma(e,t,n){Ke.call(this,e,t),this.meshPerAttribute=n||1}function ga(e,t){return e.distance-t.distance}function ya(e,t,n,r){if(!1!==e.visible&&(e.raycast(t,n),!0===r))for(var i=e.children,o=0,a=i.length;o<a;o++)ya(i[o],t,n,!0)}function va(e,t){this.min=void 0!==e?e:new g(1/0,1/0),this.max=void 0!==t?t:new g(-1/0,-1/0)}function ba(e){Ge.call(this),this.material=e,this.render=function(){}}function _a(e,t,n,r){this.object=e,this.size=void 0!==t?t:1;var i=void 0!==n?n:16711680,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=3*s.faces.length:s&&s.isBufferGeometry&&(a=s.attributes.normal.count);var c=new vt,l=new at(2*a*3,3);c.addAttribute("position",l),Nn.call(this,c,new Pn({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function wa(e,t){Ge.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t;for(var n=new vt,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],i=0,o=1;i<32;i++,o++){var a=i/32*Math.PI*2,s=o/32*Math.PI*2;r.push(Math.cos(a),Math.sin(a),1,Math.cos(s),Math.sin(s),1)}n.addAttribute("position",new at(r,3));var c=new Pn({fog:!1});this.cone=new Nn(n,c),this.add(this.cone),this.update()}function Ea(e){for(var t=function e(t){var n=[];t&&t.isBone&&n.push(t);for(var r=0;r<t.children.length;r++)n.push.apply(n,e(t.children[r]));return n}(e),n=new vt,r=[],i=[],o=new fe(0,0,1),a=new fe(0,1,0),s=0;s<t.length;s++){var c=t[s];c.parent&&c.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(a.r,a.g,a.b))}n.addAttribute("position",new at(r,3)),n.addAttribute("color",new at(i,3));var l=new Pn({vertexColors:2,depthTest:!1,depthWrite:!1,transparent:!0});Nn.call(this,n,l),this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}function Aa(e,t,n){this.light=e,this.light.updateMatrixWorld(),this.color=n;var r=new Fr(t,4,2),i=new At({wireframe:!0,fog:!1});Rt.call(this,r,i),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function xa(e,t){Ge.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t;var n=new Pn({fog:!1}),r=new vt;r.addAttribute("position",new Ke(new Float32Array(15),3)),this.line=new On(r,n),this.add(this.line),this.update()}function Sa(e,t,n){Ge.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;var r=new Xn(t);r.rotateY(.5*Math.PI),this.material=new At({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=2);var i=r.getAttribute("position"),o=new Float32Array(3*i.count);r.addAttribute("color",new Ke(o,3)),this.add(new Rt(r,this.material)),this.update()}function Ta(e,t,n,r){e=e||10,t=t||10,n=new fe(void 0!==n?n:4473924),r=new fe(void 0!==r?r:8947848);for(var i=t/2,o=e/t,a=e/2,s=[],c=[],l=0,u=0,h=-a;l<=t;l++,h+=o){s.push(-a,0,h,a,0,h),s.push(h,0,-a,h,0,a);var d=l===i?n:r;d.toArray(c,u),u+=3,d.toArray(c,u),u+=3,d.toArray(c,u),u+=3,d.toArray(c,u),u+=3}var p=new vt;p.addAttribute("position",new at(s,3)),p.addAttribute("color",new at(c,3));var f=new Pn({vertexColors:2});Nn.call(this,p,f)}function Ma(e,t,n,r,i,o){e=e||10,t=t||16,n=n||8,r=r||64,i=new fe(void 0!==i?i:4473924),o=new fe(void 0!==o?o:8947848);var a,s,c,l,u,h,d,p=[],f=[];for(l=0;l<=t;l++)c=l/t*(2*Math.PI),a=Math.sin(c)*e,s=Math.cos(c)*e,p.push(0,0,0),p.push(a,0,s),d=1&l?i:o,f.push(d.r,d.g,d.b),f.push(d.r,d.g,d.b);for(l=0;l<=n;l++)for(d=1&l?i:o,h=e-e/n*l,u=0;u<r;u++)c=u/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,p.push(a,0,s),f.push(d.r,d.g,d.b),c=(u+1)/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,p.push(a,0,s),f.push(d.r,d.g,d.b);var m=new vt;m.addAttribute("position",new at(p,3)),m.addAttribute("color",new at(f,3));var g=new Pn({vertexColors:2});Nn.call(this,m,g)}function Ra(e,t,n,r){this.object=e,this.size=void 0!==t?t:1;var i=void 0!==n?n:16776960,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=s.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var c=new vt,l=new at(2*a*3,3);c.addAttribute("position",l),Nn.call(this,c,new Pn({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function Ca(e,t,n){Ge.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===t&&(t=1);var r=new vt;r.addAttribute("position",new at([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));var i=new Pn({fog:!1});this.lightPlane=new On(r,i),this.add(this.lightPlane),(r=new vt).addAttribute("position",new at([0,0,0,0,0,1],3)),this.targetLine=new On(r,i),this.add(this.targetLine),this.update()}function ka(e){var t=new vt,n=new Pn({color:16777215,vertexColors:1}),r=[],i=[],o={},a=new fe(16755200),s=new fe(16711680),c=new fe(43775),l=new fe(16777215),u=new fe(3355443);function h(e,t,n){d(e,n),d(t,n)}function d(e,t){r.push(0,0,0),i.push(t.r,t.g,t.b),void 0===o[e]&&(o[e]=[]),o[e].push(r.length/3-1)}h("n1","n2",a),h("n2","n4",a),h("n4","n3",a),h("n3","n1",a),h("f1","f2",a),h("f2","f4",a),h("f4","f3",a),h("f3","f1",a),h("n1","f1",a),h("n2","f2",a),h("n3","f3",a),h("n4","f4",a),h("p","n1",s),h("p","n2",s),h("p","n3",s),h("p","n4",s),h("u1","u2",c),h("u2","u3",c),h("u3","u1",c),h("c","t",l),h("p","c",u),h("cn1","cn2",u),h("cn3","cn4",u),h("cf1","cf2",u),h("cf3","cf4",u),t.addAttribute("position",new at(r,3)),t.addAttribute("color",new at(i,3)),Nn.call(this,t,n),this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}function Ia(e,t){this.object=e,void 0===t&&(t=16776960);var n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),i=new vt;i.setIndex(new Ke(n,1)),i.addAttribute("position",new Ke(r,3)),Nn.call(this,i,new Pn({color:t})),this.matrixAutoUpdate=!1,this.update()}function Pa(e,t){this.type="Box3Helper",this.box=e;var n=void 0!==t?t:16776960,r=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new vt;i.setIndex(new Ke(r,1)),i.addAttribute("position",new at([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),Nn.call(this,i,new Pn({color:n})),this.geometry.computeBoundingSphere()}function Oa(e,t,n){this.type="PlaneHelper",this.plane=e,this.size=void 0===t?1:t;var r=void 0!==n?n:16776960,i=new vt;i.addAttribute("position",new at([1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3)),i.computeBoundingSphere(),On.call(this,i,new Pn({color:r}));var o=new vt;o.addAttribute("position",new at([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),o.computeBoundingSphere(),this.add(new Rt(o,new At({color:r,opacity:.2,transparent:!0,depthWrite:!1})))}function Na(e,t,n,r,i,o){Ge.call(this),void 0===r&&(r=16776960),void 0===n&&(n=1),void 0===i&&(i=.2*n),void 0===o&&(o=.2*i),void 0===na&&((na=new vt).addAttribute("position",new at([0,0,0,0,1,0],3)),(ra=new Jr(0,.5,1,5,1)).translate(0,-.5,0)),this.position.copy(t),this.line=new On(na,new Pn({color:r})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Rt(ra,new At({color:r})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(n,i,o)}function Da(e){var t=[0,0,0,e=e||1,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=new vt;n.addAttribute("position",new at(t,3)),n.addAttribute("color",new at([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));var r=new Pn({vertexColors:2});Nn.call(this,n,r)}Object.assign(aa.prototype,{getValue:function(e,t){this.bind();var n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(e,t)},setValue:function(e,t){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)},bind:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()},unbind:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}}),Object.assign(sa,{Composite:aa,create:function(e,t,n){return e&&e.isAnimationObjectGroup?new sa.Composite(e,t,n):new sa(e,t,n)},sanitizeNodeName:(ta=new RegExp("[\\[\\]\\.:\\/]","g"),function(e){return e.replace(/\s/g,"_").replace(ta,"")}),parseTrackName:(Zo="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",Yo=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]"),Xo=/(WCOD+)?/.source.replace("WCOD",Zo),Qo=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),Ko=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),$o=new RegExp("^"+Yo+Xo+Qo+Ko+"$"),ea=["material","materials","bones"],function(e){var t=$o.exec(e);if(!t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);var n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){var i=n.nodeName.substring(r+1);-1!==ea.indexOf(i)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=i)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}),findNode:function(e,t){if(!t||""===t||"root"===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){var n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){var r=function(e){for(var n=0;n<e.length;n++){var i=e[n];if(i.name===t||i.uuid===t)return i;var o=r(i.children);if(o)return o}return null},i=r(e.children);if(i)return i}return null}}),Object.assign(sa.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(e,t){e[t]=this.node[this.propertyName]},function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)e[t++]=n[r]},function(e,t){e[t]=this.resolvedProperty[this.propertyIndex]},function(e,t){this.resolvedProperty.toArray(e,t)}],SetterByBindingTypeAndVersioning:[[function(e,t){this.targetObject[this.propertyName]=e[t]},function(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0},function(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=e[t++]},function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0},function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){this.resolvedProperty[this.propertyIndex]=e[t]},function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0},function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){this.resolvedProperty.fromArray(e,t)},function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0},function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(e,t){this.bind(),this.getValue(e,t)},setValue:function(e,t){this.bind(),this.setValue(e,t)},bind:function(){var e=this.node,t=this.parsedPath,n=t.objectName,r=t.propertyName,i=t.propertyIndex;if(e||(e=sa.findNode(this.rootNode,t.nodeName)||this.rootNode,this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,e){if(n){var o=t.objectIndex;switch(n){case"materials":if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(var a=0;a<e.length;a++)if(e[a].name===o){o=a;break}break;default:if(void 0===e[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[n]}if(void 0!==o){if(void 0===e[o])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[o]}}var s=e[r];if(void 0!==s){var c=this.Versioning.None;void 0!==e.needsUpdate?(c=this.Versioning.NeedsUpdate,this.targetObject=e):void 0!==e.matrixWorldNeedsUpdate&&(c=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=e);var l=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!e.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(e.geometry.isBufferGeometry){if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(a=0;a<this.node.geometry.morphAttributes.position.length;a++)if(e.geometry.morphAttributes.position[a].name===i){i=a;break}}else{if(!e.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(a=0;a<this.node.geometry.morphTargets.length;a++)if(e.geometry.morphTargets[a].name===i){i=a;break}}}l=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}else void 0!==s.fromArray&&void 0!==s.toArray?(l=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(l=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=r;this.getValue=this.GetterByBindingType[l],this.setValue=this.SetterByBindingTypeAndVersioning[l][c]}else{var u=t.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+u+"."+r+" but it wasn't found.",e)}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),//!\ DECLARE ALIAS AFTER assign prototype !diff --git a/rider/build/zip.js b/rider/build/zip.jsindex 1983de569..d8c077c49 100644--- a/rider/build/zip.js+++ b/rider/build/zip.js@@ -1,4 +1,4 @@-!function(e){var t=this.webpackHotUpdate;this.webpackHotUpdate=function(e,n){!function(e,t){if(!w[e]||!v[e])return;for(var n in v[e]=!1,t)Object.prototype.hasOwnProperty.call(t,n)&&(p[n]=t[n]);0==--b&&0===y&&x()}(e,n),t&&t(e,n)};var n,r=!0,i="b6816b72f4b52c110a25",o={},a=[],s=[];function l(e){var t=R[e];if(!t)return O;var r=function(r){return t.hot.active?(R[r]?-1===R[r].parents.indexOf(e)&&R[r].parents.push(e):(a=[e],n=r),-1===t.children.indexOf(r)&&t.children.push(r)):(console.warn("[HMR] unexpected require("+r+") from disposed module "+e),a=[]),O(r)},i=function(e){return{configurable:!0,enumerable:!0,get:function(){return O[e]},set:function(t){O[e]=t}}};for(var o in O)Object.prototype.hasOwnProperty.call(O,o)&&"e"!==o&&"t"!==o&&Object.defineProperty(r,o,i(o));return r.e=function(e){return"ready"===h&&c("prepare"),y++,O.e(e).then(t,(function(e){throw t(),e}));function t(){y--,"prepare"===h&&(m[e]||S(e),0===y&&0===b&&x())}},r.t=function(e,t){return 1&t&&(e=r(e)),O.t(e,-2&t)},r}function u(t){var r={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:n!==t,active:!0,accept:function(e,t){if(void 0===e)r._selfAccepted=!0;else if("function"==typeof e)r._selfAccepted=e;else if("object"==typeof e)for(var n=0;n<e.length;n++)r._acceptedDependencies[e[n]]=t||function(){};else r._acceptedDependencies[e]=t||function(){}},decline:function(e){if(void 0===e)r._selfDeclined=!0;else if("object"==typeof e)for(var t=0;t<e.length;t++)r._declinedDependencies[e[t]]=!0;else r._declinedDependencies[e]=!0},dispose:function(e){r._disposeHandlers.push(e)},addDisposeHandler:function(e){r._disposeHandlers.push(e)},removeDisposeHandler:function(e){var t=r._disposeHandlers.indexOf(e);t>=0&&r._disposeHandlers.splice(t,1)},invalidate:function(){switch(this._selfInvalidated=!0,h){case"idle":(p={})[t]=e[t],c("ready");break;case"ready":A(t);break;case"prepare":case"check":case"dispose":case"apply":(g=g||[]).push(t)}},check:k,apply:T,status:function(e){if(!e)return h;f.push(e)},addStatusHandler:function(e){f.push(e)},removeStatusHandler:function(e){var t=f.indexOf(e);t>=0&&f.splice(t,1)},data:o[t]};return n=void 0,r}var f=[],h="idle";function c(e){h=e;for(var t=0;t<f.length;t++)f[t].call(null,e)}var d,p,_,g,b=0,y=0,m={},v={},w={};function E(e){return+e+""===e?+e:e}function k(e){if("idle"!==h)throw new Error("check() is only allowed in idle status");return r=e,c("check"),(t=1e4,t=t||1e4,new Promise((function(e,n){if("undefined"==typeof XMLHttpRequest)return n(new Error("No browser support"));try{var r=new XMLHttpRequest,o=O.p+""+i+".hot-update.json";r.open("GET",o,!0),r.timeout=t,r.send(null)}catch(e){return n(e)}r.onreadystatechange=function(){if(4===r.readyState)if(0===r.status)n(new Error("Manifest request to "+o+" timed out."));else if(404===r.status)e();else if(200!==r.status&&304!==r.status)n(new Error("Manifest request to "+o+" failed."));else{try{var t=JSON.parse(r.responseText)}catch(e){return void n(e)}e(t)}}}))).then((function(e){if(!e)return c(L()?"ready":"idle"),null;v={},m={},w=e.c,_=e.h,c("prepare");var t=new Promise((function(e,t){d={resolve:e,reject:t}}));p={};return S(1),"prepare"===h&&0===y&&0===b&&x(),t}));var t}function S(e){w[e]?(v[e]=!0,b++,function(e){var t=document.createElement("script");t.charset="utf-8",t.src=O.p+""+e+"."+i+".hot-update.js",document.head.appendChild(t)}(e)):m[e]=!0}function x(){c("ready");var e=d;if(d=null,e)if(r)Promise.resolve().then((function(){return T(r)})).then((function(t){e.resolve(t)}),(function(t){e.reject(t)}));else{var t=[];for(var n in p)Object.prototype.hasOwnProperty.call(p,n)&&t.push(E(n));e.resolve(t)}}function T(t){if("ready"!==h)throw new Error("apply() is only allowed in ready status");return function t(r){var s,l,u,f,h;function d(e){for(var t=[e],n={},r=t.map((function(e){return{chain:[e],id:e}}));r.length>0;){var i=r.pop(),o=i.id,a=i.chain;if((f=R[o])&&(!f.hot._selfAccepted||f.hot._selfInvalidated)){if(f.hot._selfDeclined)return{type:"self-declined",chain:a,moduleId:o};if(f.hot._main)return{type:"unaccepted",chain:a,moduleId:o};for(var s=0;s<f.parents.length;s++){var l=f.parents[s],u=R[l];if(u){if(u.hot._declinedDependencies[o])return{type:"declined",chain:a.concat([l]),moduleId:o,parentId:l};-1===t.indexOf(l)&&(u.hot._acceptedDependencies[o]?(n[l]||(n[l]=[]),b(n[l],[o])):(delete n[l],t.push(l),r.push({chain:a.concat([l]),id:l})))}}}}return{type:"accepted",moduleId:e,outdatedModules:t,outdatedDependencies:n}}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];-1===e.indexOf(r)&&e.push(r)}}L();var y={},m=[],v={},k=function(){console.warn("[HMR] unexpected require("+x.moduleId+") to disposed module")};for(var S in p)if(Object.prototype.hasOwnProperty.call(p,S)){var x;h=E(S),x=p[S]?d(h):{type:"disposed",moduleId:S};var T=!1,A=!1,I=!1,U="";switch(x.chain&&(U="\nUpdate propagation: "+x.chain.join(" -> ")),x.type){case"self-declined":r.onDeclined&&r.onDeclined(x),r.ignoreDeclined||(T=new Error("Aborted because of self decline: "+x.moduleId+U));break;case"declined":r.onDeclined&&r.onDeclined(x),r.ignoreDeclined||(T=new Error("Aborted because of declined dependency: "+x.moduleId+" in "+x.parentId+U));break;case"unaccepted":r.onUnaccepted&&r.onUnaccepted(x),r.ignoreUnaccepted||(T=new Error("Aborted because "+h+" is not accepted"+U));break;case"accepted":r.onAccepted&&r.onAccepted(x),A=!0;break;case"disposed":r.onDisposed&&r.onDisposed(x),I=!0;break;default:throw new Error("Unexception type "+x.type)}if(T)return c("abort"),Promise.reject(T);if(A)for(h in v[h]=p[h],b(m,x.outdatedModules),x.outdatedDependencies)Object.prototype.hasOwnProperty.call(x.outdatedDependencies,h)&&(y[h]||(y[h]=[]),b(y[h],x.outdatedDependencies[h]));I&&(b(m,[x.moduleId]),v[h]=k)}var z,D=[];for(l=0;l<m.length;l++)h=m[l],R[h]&&R[h].hot._selfAccepted&&v[h]!==k&&!R[h].hot._selfInvalidated&&D.push({module:h,parents:R[h].parents.slice(),errorHandler:R[h].hot._selfAccepted});c("dispose"),Object.keys(w).forEach((function(e){!1===w[e]&&function(e){delete installedChunks[e]}(e)}));var M,N,B=m.slice();for(;B.length>0;)if(h=B.pop(),f=R[h]){var P={},F=f.hot._disposeHandlers;for(u=0;u<F.length;u++)(s=F[u])(P);for(o[h]=P,f.hot.active=!1,delete R[h],delete y[h],u=0;u<f.children.length;u++){var C=R[f.children[u]];C&&((z=C.parents.indexOf(h))>=0&&C.parents.splice(z,1))}}for(h in y)if(Object.prototype.hasOwnProperty.call(y,h)&&(f=R[h]))for(N=y[h],u=0;u<N.length;u++)M=N[u],(z=f.children.indexOf(M))>=0&&f.children.splice(z,1);c("apply"),void 0!==_&&(i=_,_=void 0);for(h in p=void 0,v)Object.prototype.hasOwnProperty.call(v,h)&&(e[h]=v[h]);var Z=null;for(h in y)if(Object.prototype.hasOwnProperty.call(y,h)&&(f=R[h])){N=y[h];var j=[];for(l=0;l<N.length;l++)if(M=N[l],s=f.hot._acceptedDependencies[M]){if(-1!==j.indexOf(s))continue;j.push(s)}for(l=0;l<j.length;l++){s=j[l];try{s(N)}catch(e){r.onErrored&&r.onErrored({type:"accept-errored",moduleId:h,dependencyId:N[l],error:e}),r.ignoreErrored||Z||(Z=e)}}}for(l=0;l<D.length;l++){var H=D[l];h=H.module,a=H.parents,n=h;try{O(h)}catch(e){if("function"==typeof H.errorHandler)try{H.errorHandler(e)}catch(t){r.onErrored&&r.onErrored({type:"self-accept-error-handler-errored",moduleId:h,error:t,originalError:e}),r.ignoreErrored||Z||(Z=t),Z||(Z=e)}else r.onErrored&&r.onErrored({type:"self-accept-errored",moduleId:h,error:e}),r.ignoreErrored||Z||(Z=e)}}if(Z)return c("fail"),Promise.reject(Z);if(g)return t(r).then((function(e){return m.forEach((function(t){e.indexOf(t)<0&&e.push(t)})),e}));return c("idle"),new Promise((function(e){e(m)}))}(t=t||{})}function L(){if(g)return p||(p={}),g.forEach(A),g=void 0,!0}function A(t){Object.prototype.hasOwnProperty.call(p,t)||(p[t]=e[t])}var R={};function O(t){if(R[t])return R[t].exports;var n=R[t]={i:t,l:!1,exports:{},hot:u(t),parents:(s=a,a=[],s),children:[]};return e[t].call(n.exports,n,n.exports,l(t)),n.l=!0,n.exports}O.m=e,O.c=R,O.d=function(e,t,n){O.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},O.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},O.t=function(e,t){if(1&t&&(e=O(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(O.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)O.d(n,r,function(t){return e[t]}.bind(null,r));return n},O.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return O.d(t,"a",t),t},O.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},O.p="",O.h=function(){return i},l(209)(O.s=209)}([,function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l,u=[],f=!1,h=-1;function c(){f&&l&&(f=!1,l.length?u=l.concat(u):h=-1,u.length&&d())}function d(){if(!f){var e=s(c);f=!0;for(var t=u.length;t;){for(l=u,u=[];++h<t;)l&&l[h].run();h=-1,t=u.length}l=null,f=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function _(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new p(e,t)),1!==u.length||f||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=_,i.addListener=_,i.once=_,i.off=_,i.removeListener=_,i.removeAllListeners=_,i.emit=_,i.prependListener=_,i.prependOnceListener=_,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";(function(e){+!function(e){var t=this.webpackHotUpdate;this.webpackHotUpdate=function(e,n){!function(e,t){if(!w[e]||!v[e])return;for(var n in v[e]=!1,t)Object.prototype.hasOwnProperty.call(t,n)&&(p[n]=t[n]);0==--b&&0===y&&x()}(e,n),t&&t(e,n)};var n,r=!0,i="e05106e39985d875d321",o={},a=[],s=[];function l(e){var t=R[e];if(!t)return O;var r=function(r){return t.hot.active?(R[r]?-1===R[r].parents.indexOf(e)&&R[r].parents.push(e):(a=[e],n=r),-1===t.children.indexOf(r)&&t.children.push(r)):(console.warn("[HMR] unexpected require("+r+") from disposed module "+e),a=[]),O(r)},i=function(e){return{configurable:!0,enumerable:!0,get:function(){return O[e]},set:function(t){O[e]=t}}};for(var o in O)Object.prototype.hasOwnProperty.call(O,o)&&"e"!==o&&"t"!==o&&Object.defineProperty(r,o,i(o));return r.e=function(e){return"ready"===h&&c("prepare"),y++,O.e(e).then(t,(function(e){throw t(),e}));function t(){y--,"prepare"===h&&(m[e]||S(e),0===y&&0===b&&x())}},r.t=function(e,t){return 1&t&&(e=r(e)),O.t(e,-2&t)},r}function u(t){var r={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:n!==t,active:!0,accept:function(e,t){if(void 0===e)r._selfAccepted=!0;else if("function"==typeof e)r._selfAccepted=e;else if("object"==typeof e)for(var n=0;n<e.length;n++)r._acceptedDependencies[e[n]]=t||function(){};else r._acceptedDependencies[e]=t||function(){}},decline:function(e){if(void 0===e)r._selfDeclined=!0;else if("object"==typeof e)for(var t=0;t<e.length;t++)r._declinedDependencies[e[t]]=!0;else r._declinedDependencies[e]=!0},dispose:function(e){r._disposeHandlers.push(e)},addDisposeHandler:function(e){r._disposeHandlers.push(e)},removeDisposeHandler:function(e){var t=r._disposeHandlers.indexOf(e);t>=0&&r._disposeHandlers.splice(t,1)},invalidate:function(){switch(this._selfInvalidated=!0,h){case"idle":(p={})[t]=e[t],c("ready");break;case"ready":A(t);break;case"prepare":case"check":case"dispose":case"apply":(g=g||[]).push(t)}},check:k,apply:T,status:function(e){if(!e)return h;f.push(e)},addStatusHandler:function(e){f.push(e)},removeStatusHandler:function(e){var t=f.indexOf(e);t>=0&&f.splice(t,1)},data:o[t]};return n=void 0,r}var f=[],h="idle";function c(e){h=e;for(var t=0;t<f.length;t++)f[t].call(null,e)}var d,p,_,g,b=0,y=0,m={},v={},w={};function E(e){return+e+""===e?+e:e}function k(e){if("idle"!==h)throw new Error("check() is only allowed in idle status");return r=e,c("check"),(t=1e4,t=t||1e4,new Promise((function(e,n){if("undefined"==typeof XMLHttpRequest)return n(new Error("No browser support"));try{var r=new XMLHttpRequest,o=O.p+""+i+".hot-update.json";r.open("GET",o,!0),r.timeout=t,r.send(null)}catch(e){return n(e)}r.onreadystatechange=function(){if(4===r.readyState)if(0===r.status)n(new Error("Manifest request to "+o+" timed out."));else if(404===r.status)e();else if(200!==r.status&&304!==r.status)n(new Error("Manifest request to "+o+" failed."));else{try{var t=JSON.parse(r.responseText)}catch(e){return void n(e)}e(t)}}}))).then((function(e){if(!e)return c(L()?"ready":"idle"),null;v={},m={},w=e.c,_=e.h,c("prepare");var t=new Promise((function(e,t){d={resolve:e,reject:t}}));p={};return S(1),"prepare"===h&&0===y&&0===b&&x(),t}));var t}function S(e){w[e]?(v[e]=!0,b++,function(e){var t=document.createElement("script");t.charset="utf-8",t.src=O.p+""+e+"."+i+".hot-update.js",document.head.appendChild(t)}(e)):m[e]=!0}function x(){c("ready");var e=d;if(d=null,e)if(r)Promise.resolve().then((function(){return T(r)})).then((function(t){e.resolve(t)}),(function(t){e.reject(t)}));else{var t=[];for(var n in p)Object.prototype.hasOwnProperty.call(p,n)&&t.push(E(n));e.resolve(t)}}function T(t){if("ready"!==h)throw new Error("apply() is only allowed in ready status");return function t(r){var s,l,u,f,h;function d(e){for(var t=[e],n={},r=t.map((function(e){return{chain:[e],id:e}}));r.length>0;){var i=r.pop(),o=i.id,a=i.chain;if((f=R[o])&&(!f.hot._selfAccepted||f.hot._selfInvalidated)){if(f.hot._selfDeclined)return{type:"self-declined",chain:a,moduleId:o};if(f.hot._main)return{type:"unaccepted",chain:a,moduleId:o};for(var s=0;s<f.parents.length;s++){var l=f.parents[s],u=R[l];if(u){if(u.hot._declinedDependencies[o])return{type:"declined",chain:a.concat([l]),moduleId:o,parentId:l};-1===t.indexOf(l)&&(u.hot._acceptedDependencies[o]?(n[l]||(n[l]=[]),b(n[l],[o])):(delete n[l],t.push(l),r.push({chain:a.concat([l]),id:l})))}}}}return{type:"accepted",moduleId:e,outdatedModules:t,outdatedDependencies:n}}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];-1===e.indexOf(r)&&e.push(r)}}L();var y={},m=[],v={},k=function(){console.warn("[HMR] unexpected require("+x.moduleId+") to disposed module")};for(var S in p)if(Object.prototype.hasOwnProperty.call(p,S)){var x;h=E(S),x=p[S]?d(h):{type:"disposed",moduleId:S};var T=!1,A=!1,I=!1,U="";switch(x.chain&&(U="\nUpdate propagation: "+x.chain.join(" -> ")),x.type){case"self-declined":r.onDeclined&&r.onDeclined(x),r.ignoreDeclined||(T=new Error("Aborted because of self decline: "+x.moduleId+U));break;case"declined":r.onDeclined&&r.onDeclined(x),r.ignoreDeclined||(T=new Error("Aborted because of declined dependency: "+x.moduleId+" in "+x.parentId+U));break;case"unaccepted":r.onUnaccepted&&r.onUnaccepted(x),r.ignoreUnaccepted||(T=new Error("Aborted because "+h+" is not accepted"+U));break;case"accepted":r.onAccepted&&r.onAccepted(x),A=!0;break;case"disposed":r.onDisposed&&r.onDisposed(x),I=!0;break;default:throw new Error("Unexception type "+x.type)}if(T)return c("abort"),Promise.reject(T);if(A)for(h in v[h]=p[h],b(m,x.outdatedModules),x.outdatedDependencies)Object.prototype.hasOwnProperty.call(x.outdatedDependencies,h)&&(y[h]||(y[h]=[]),b(y[h],x.outdatedDependencies[h]));I&&(b(m,[x.moduleId]),v[h]=k)}var z,D=[];for(l=0;l<m.length;l++)h=m[l],R[h]&&R[h].hot._selfAccepted&&v[h]!==k&&!R[h].hot._selfInvalidated&&D.push({module:h,parents:R[h].parents.slice(),errorHandler:R[h].hot._selfAccepted});c("dispose"),Object.keys(w).forEach((function(e){!1===w[e]&&function(e){delete installedChunks[e]}(e)}));var M,N,B=m.slice();for(;B.length>0;)if(h=B.pop(),f=R[h]){var P={},F=f.hot._disposeHandlers;for(u=0;u<F.length;u++)(s=F[u])(P);for(o[h]=P,f.hot.active=!1,delete R[h],delete y[h],u=0;u<f.children.length;u++){var C=R[f.children[u]];C&&((z=C.parents.indexOf(h))>=0&&C.parents.splice(z,1))}}for(h in y)if(Object.prototype.hasOwnProperty.call(y,h)&&(f=R[h]))for(N=y[h],u=0;u<N.length;u++)M=N[u],(z=f.children.indexOf(M))>=0&&f.children.splice(z,1);c("apply"),void 0!==_&&(i=_,_=void 0);for(h in p=void 0,v)Object.prototype.hasOwnProperty.call(v,h)&&(e[h]=v[h]);var Z=null;for(h in y)if(Object.prototype.hasOwnProperty.call(y,h)&&(f=R[h])){N=y[h];var j=[];for(l=0;l<N.length;l++)if(M=N[l],s=f.hot._acceptedDependencies[M]){if(-1!==j.indexOf(s))continue;j.push(s)}for(l=0;l<j.length;l++){s=j[l];try{s(N)}catch(e){r.onErrored&&r.onErrored({type:"accept-errored",moduleId:h,dependencyId:N[l],error:e}),r.ignoreErrored||Z||(Z=e)}}}for(l=0;l<D.length;l++){var H=D[l];h=H.module,a=H.parents,n=h;try{O(h)}catch(e){if("function"==typeof H.errorHandler)try{H.errorHandler(e)}catch(t){r.onErrored&&r.onErrored({type:"self-accept-error-handler-errored",moduleId:h,error:t,originalError:e}),r.ignoreErrored||Z||(Z=t),Z||(Z=e)}else r.onErrored&&r.onErrored({type:"self-accept-errored",moduleId:h,error:e}),r.ignoreErrored||Z||(Z=e)}}if(Z)return c("fail"),Promise.reject(Z);if(g)return t(r).then((function(e){return m.forEach((function(t){e.indexOf(t)<0&&e.push(t)})),e}));return c("idle"),new Promise((function(e){e(m)}))}(t=t||{})}function L(){if(g)return p||(p={}),g.forEach(A),g=void 0,!0}function A(t){Object.prototype.hasOwnProperty.call(p,t)||(p[t]=e[t])}var R={};function O(t){if(R[t])return R[t].exports;var n=R[t]={i:t,l:!1,exports:{},hot:u(t),parents:(s=a,a=[],s),children:[]};return e[t].call(n.exports,n,n.exports,l(t)),n.l=!0,n.exports}O.m=e,O.c=R,O.d=function(e,t,n){O.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},O.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},O.t=function(e,t){if(1&t&&(e=O(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(O.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)O.d(n,r,function(t){return e[t]}.bind(null,r));return n},O.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return O.d(t,"a",t),t},O.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},O.p="",O.h=function(){return i},l(209)(O.s=209)}([,function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l,u=[],f=!1,h=-1;function c(){f&&l&&(f=!1,l.length?u=l.concat(u):h=-1,u.length&&d())}function d(){if(!f){var e=s(c);f=!0;for(var t=u.length;t;){for(l=u,u=[];++h<t;)l&&l[h].run();h=-1,t=u.length}l=null,f=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function _(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new p(e,t)),1!==u.length||f||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=_,i.addListener=_,i.once=_,i.off=_,i.removeListener=_,i.removeAllListeners=_,i.emit=_,i.prependListener=_,i.prependOnceListener=_,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";(function(e){/*!* The buffer module from node.js, for the browser.*diff --git a/rider/src/components/agent-dance.js b/rider/src/components/agent-dance.jsindex 0ac10b912..e17b3e496 100644--- a/rider/src/components/agent-dance.js+++ b/rider/src/components/agent-dance.js@@ -1,7 +1,7 @@const CLIPS = ['dance', 'rumba', 'capoeira', 'thriller', 'wave', 'celebrate', 'taunt','silly', 'jump', 'pray', 'reaction', 'sitclap', 'sitlaugh', 'kiss',- 'angry', 'defeated', 'falling', 'dying', 'idle'+ 'angry', 'defeated', 'falling', 'dying', 'idle', 'sitidle'];AFRAME.registerComponent('agent-dance', {diff --git a/rider/src/scene.html b/rider/src/scene.htmlindex 698894e53..32b078000 100644--- a/rider/src/scene.html+++ b/rider/src/scene.html@@ -144,7 +144,7 @@<a-entityid="agentCompanion"gltf-model="#agentGlb"- agent-dance="initial: idle"+ agent-dance="initial: sitidle"position="0.7 0.45 0.5"rotation="0 165 0"scale="0.9 0.9 0.9"></a-entity>